Code Duplication    Length = 3-3 lines in 3 locations

src/voku/helper/UTF8.php 3 locations

@@ 3512-3514 (lines=3) @@
3509
    // UTF-32 (BE)
3510
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
3511
    /** @noinspection SubStrUsedAsStrPosInspection */
3512
    if (substr($str, 0, 4) == @pack('CCCC', 0x00, 0x00, 0xfe, 0xff)) {
3513
      $str = substr($str, 4);
3514
    }
3515
3516
    // UTF-32 (LE)
3517
@@ 3520-3522 (lines=3) @@
3517
3518
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
3519
    /** @noinspection SubStrUsedAsStrPosInspection */
3520
    if (substr($str, 0, 4) == @pack('CCCC', 0xff, 0xfe, 0x00, 0x00)) {
3521
      $str = substr($str, 4);
3522
    }
3523
3524
    // UTF-8
3525
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
@@ 3527-3529 (lines=3) @@
3524
    // UTF-8
3525
    /** @noinspection PhpUsageOfSilenceOperatorInspection */
3526
    /** @noinspection SubStrUsedAsStrPosInspection */
3527
    if (substr($str, 0, 3) == @pack('CCC', 0xef, 0xbb, 0xbf)) {
3528
      $str = substr($str, 3);
3529
    }
3530
3531
    // UTF-16 (BE)
3532
    /** @noinspection PhpUsageOfSilenceOperatorInspection */