Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5803-5812 (lines=10) @@
5800
      return false;
5801
    }
5802
5803
    if (
5804
        $cleanUtf8 === true
5805
        ||
5806
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5807
    ) {
5808
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5809
5810
      $needle = self::clean($needle);
5811
      $haystack = self::clean($haystack);
5812
    }
5813
5814
    if (
5815
        $encoding === 'UTF-8'
@@ 5887-5896 (lines=10) @@
5884
      return false;
5885
    }
5886
5887
    if (
5888
        $cleanUtf8 === true
5889
        ||
5890
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5891
    ) {
5892
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5893
      $needle = self::clean($needle);
5894
      $haystack = self::clean($haystack);
5895
    }
5896
5897
    if (
5898
        $encoding === 'UTF-8'
5899
        ||