Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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