Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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