Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5596-5605 (lines=10) @@
5593
      return false;
5594
    }
5595
5596
    if (
5597
        $cleanUtf8 === true
5598
        ||
5599
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5600
    ) {
5601
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5602
5603
      $needle = self::clean($needle);
5604
      $haystack = self::clean($haystack);
5605
    }
5606
5607
    if (
5608
        $encoding === 'UTF-8'
@@ 5680-5689 (lines=10) @@
5677
      return false;
5678
    }
5679
5680
    if (
5681
        $cleanUtf8 === true
5682
        ||
5683
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5684
    ) {
5685
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5686
      $needle = self::clean($needle);
5687
      $haystack = self::clean($haystack);
5688
    }
5689
5690
    if (
5691
        $encoding === 'UTF-8'
5692
        ||