Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5868-5877 (lines=10) @@
5865
      return false;
5866
    }
5867
5868
    if (
5869
        $cleanUtf8 === true
5870
        ||
5871
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5872
    ) {
5873
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5874
5875
      $needle = self::clean($needle);
5876
      $haystack = self::clean($haystack);
5877
    }
5878
5879
    if (
5880
        $encoding === 'UTF-8'
@@ 5952-5961 (lines=10) @@
5949
      return false;
5950
    }
5951
5952
    if (
5953
        $cleanUtf8 === true
5954
        ||
5955
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5956
    ) {
5957
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5958
      $needle = self::clean($needle);
5959
      $haystack = self::clean($haystack);
5960
    }
5961
5962
    if (
5963
        $encoding === 'UTF-8'
5964
        ||