Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5089-5098 (lines=10) @@
5086
      return false;
5087
    }
5088
5089
    if (
5090
        $cleanUtf8 === true
5091
        ||
5092
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5093
    ) {
5094
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5095
5096
      $needle = self::clean($needle);
5097
      $haystack = self::clean($haystack);
5098
    }
5099
5100
    if (!isset(self::$support['already_checked_via_portable_utf8'])) {
5101
      self::checkForSupport();
@@ 5164-5173 (lines=10) @@
5161
      return false;
5162
    }
5163
5164
    if (
5165
        $cleanUtf8 === true
5166
        ||
5167
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5168
    ) {
5169
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5170
5171
      $needle = self::clean($needle);
5172
      $haystack = self::clean($haystack);
5173
    }
5174
5175
    if (!isset(self::$support['already_checked_via_portable_utf8'])) {
5176
      self::checkForSupport();