Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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