Code Duplication    Length = 3-3 lines in 3 locations

src/voku/helper/UTF8.php 3 locations

@@ 677-679 (lines=3) @@
674
    // UTF-32 (BE)
675
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
676
    /** @noinspection SubStrUsedAsStrPosInspection */
677
    if (substr($str, 0, 4) == @pack('CCCC', 0x00, 0x00, 0xfe, 0xff)) {
678
      $str = substr($str, 4);
679
    }
680
681
    // UTF-32 (LE)
682
@@ 685-687 (lines=3) @@
682
683
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
684
    /** @noinspection SubStrUsedAsStrPosInspection */
685
    if (substr($str, 0, 4) == @pack('CCCC', 0xff, 0xfe, 0x00, 0x00)) {
686
      $str = substr($str, 4);
687
    }
688
689
    // UTF-8
690
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
@@ 692-694 (lines=3) @@
689
    // UTF-8
690
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
691
    /** @noinspection SubStrUsedAsStrPosInspection */
692
    if (substr($str, 0, 3) == @pack('CCC', 0xef, 0xbb, 0xbf)) {
693
      $str = substr($str, 3);
694
    }
695
696
    // UTF-16 (BE)
697
    /** @noinspection PhpUsageOfSilenceOperatorInspection */