Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5269-5278 (lines=10) @@
5266
      return false;
5267
    }
5268
5269
    if (
5270
        $cleanUtf8 === true
5271
        ||
5272
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5273
    ) {
5274
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5275
5276
      $needle = self::clean($needle);
5277
      $haystack = self::clean($haystack);
5278
    }
5279
5280
    if (
5281
        $encoding === 'UTF-8'
@@ 5350-5359 (lines=10) @@
5347
      return false;
5348
    }
5349
5350
    if (
5351
        $cleanUtf8 === true
5352
        ||
5353
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5354
    ) {
5355
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5356
      $needle = self::clean($needle);
5357
      $haystack = self::clean($haystack);
5358
    }
5359
5360
    if (
5361
        $encoding === 'UTF-8'
5362
        ||