Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5371-5380 (lines=10) @@
5368
      return false;
5369
    }
5370
5371
    if (
5372
        $cleanUtf8 === true
5373
        ||
5374
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5375
    ) {
5376
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5377
5378
      $needle = self::clean($needle);
5379
      $haystack = self::clean($haystack);
5380
    }
5381
5382
    if (
5383
        $encoding === 'UTF-8'
@@ 5452-5461 (lines=10) @@
5449
      return false;
5450
    }
5451
5452
    if (
5453
        $cleanUtf8 === true
5454
        ||
5455
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5456
    ) {
5457
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5458
      $needle = self::clean($needle);
5459
      $haystack = self::clean($haystack);
5460
    }
5461
5462
    if (
5463
        $encoding === 'UTF-8'
5464
        ||