Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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