Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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