Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5771-5780 (lines=10) @@
5768
      return false;
5769
    }
5770
5771
    if (
5772
        $cleanUtf8 === true
5773
        ||
5774
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5775
    ) {
5776
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5777
5778
      $needle = self::clean($needle);
5779
      $haystack = self::clean($haystack);
5780
    }
5781
5782
    if (
5783
        $encoding === 'UTF-8'
@@ 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_strrpos && iconv_strrpos is not tolerant to invalid characters
5861
      $needle = self::clean($needle);
5862
      $haystack = self::clean($haystack);
5863
    }
5864
5865
    if (
5866
        $encoding === 'UTF-8'
5867
        ||