Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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