Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5220-5229 (lines=10) @@
5217
      return false;
5218
    }
5219
5220
    if (
5221
        $cleanUtf8 === true
5222
        ||
5223
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5224
    ) {
5225
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5226
5227
      $needle = self::clean($needle);
5228
      $haystack = self::clean($haystack);
5229
    }
5230
5231
    if (
5232
        $encoding === 'UTF-8'
@@ 5301-5310 (lines=10) @@
5298
      return false;
5299
    }
5300
5301
    if (
5302
        $cleanUtf8 === true
5303
        ||
5304
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5305
    ) {
5306
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5307
5308
      $needle = self::clean($needle);
5309
      $haystack = self::clean($haystack);
5310
    }
5311
5312
    if (
5313
        $encoding === 'UTF-8'