Code Duplication    Length = 3-3 lines in 3 locations

src/voku/helper/UTF8.php 3 locations

@@ 3556-3558 (lines=3) @@
3553
    // UTF-32 (BE)
3554
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
3555
    /** @noinspection SubStrUsedAsStrPosInspection */
3556
    if (substr($str, 0, 4) == @pack('CCCC', 0x00, 0x00, 0xfe, 0xff)) {
3557
      $str = substr($str, 4);
3558
    }
3559
3560
    // UTF-32 (LE)
3561
@@ 3564-3566 (lines=3) @@
3561
3562
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
3563
    /** @noinspection SubStrUsedAsStrPosInspection */
3564
    if (substr($str, 0, 4) == @pack('CCCC', 0xff, 0xfe, 0x00, 0x00)) {
3565
      $str = substr($str, 4);
3566
    }
3567
3568
    // UTF-8
3569
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
@@ 3571-3573 (lines=3) @@
3568
    // UTF-8
3569
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
3570
    /** @noinspection SubStrUsedAsStrPosInspection */
3571
    if (substr($str, 0, 3) == @pack('CCC', 0xef, 0xbb, 0xbf)) {
3572
      $str = substr($str, 3);
3573
    }
3574
3575
    // UTF-16 (BE)
3576
    /** @noinspection PhpUsageOfSilenceOperatorInspection */