Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5848-5857 (lines=10) @@
5845
      return false;
5846
    }
5847
5848
    if (
5849
        $cleanUtf8 === true
5850
        ||
5851
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5852
    ) {
5853
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5854
5855
      $needle = self::clean($needle);
5856
      $haystack = self::clean($haystack);
5857
    }
5858
5859
    if (
5860
        $encoding === 'UTF-8'
@@ 5932-5941 (lines=10) @@
5929
      return false;
5930
    }
5931
5932
    if (
5933
        $cleanUtf8 === true
5934
        ||
5935
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5936
    ) {
5937
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5938
      $needle = self::clean($needle);
5939
      $haystack = self::clean($haystack);
5940
    }
5941
5942
    if (
5943
        $encoding === 'UTF-8'
5944
        ||