Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5751-5760 (lines=10) @@
5748
      return false;
5749
    }
5750
5751
    if (
5752
        $cleanUtf8 === true
5753
        ||
5754
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5755
    ) {
5756
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5757
5758
      $needle = self::clean($needle);
5759
      $haystack = self::clean($haystack);
5760
    }
5761
5762
    if (
5763
        $encoding === 'UTF-8'
@@ 5835-5844 (lines=10) @@
5832
      return false;
5833
    }
5834
5835
    if (
5836
        $cleanUtf8 === true
5837
        ||
5838
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5839
    ) {
5840
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5841
      $needle = self::clean($needle);
5842
      $haystack = self::clean($haystack);
5843
    }
5844
5845
    if (
5846
        $encoding === 'UTF-8'
5847
        ||