Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5654-5663 (lines=10) @@
5651
      return false;
5652
    }
5653
5654
    if (
5655
        $cleanUtf8 === true
5656
        ||
5657
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5658
    ) {
5659
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5660
5661
      $needle = self::clean($needle);
5662
      $haystack = self::clean($haystack);
5663
    }
5664
5665
    if (
5666
        $encoding === 'UTF-8'
@@ 5738-5747 (lines=10) @@
5735
      return false;
5736
    }
5737
5738
    if (
5739
        $cleanUtf8 === true
5740
        ||
5741
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5742
    ) {
5743
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5744
      $needle = self::clean($needle);
5745
      $haystack = self::clean($haystack);
5746
    }
5747
5748
    if (
5749
        $encoding === 'UTF-8'
5750
        ||