Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5605-5614 (lines=10) @@
5602
      return false;
5603
    }
5604
5605
    if (
5606
        $cleanUtf8 === true
5607
        ||
5608
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5609
    ) {
5610
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5611
5612
      $needle = self::clean($needle);
5613
      $haystack = self::clean($haystack);
5614
    }
5615
5616
    if (
5617
        $encoding === 'UTF-8'
@@ 5689-5698 (lines=10) @@
5686
      return false;
5687
    }
5688
5689
    if (
5690
        $cleanUtf8 === true
5691
        ||
5692
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5693
    ) {
5694
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5695
      $needle = self::clean($needle);
5696
      $haystack = self::clean($haystack);
5697
    }
5698
5699
    if (
5700
        $encoding === 'UTF-8'
5701
        ||