Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5395-5404 (lines=10) @@
5392
      return false;
5393
    }
5394
5395
    if (
5396
        $cleanUtf8 === true
5397
        ||
5398
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5399
    ) {
5400
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5401
5402
      $needle = self::clean($needle);
5403
      $haystack = self::clean($haystack);
5404
    }
5405
5406
    if (
5407
        $encoding === 'UTF-8'
@@ 5476-5485 (lines=10) @@
5473
      return false;
5474
    }
5475
5476
    if (
5477
        $cleanUtf8 === true
5478
        ||
5479
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5480
    ) {
5481
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5482
      $needle = self::clean($needle);
5483
      $haystack = self::clean($haystack);
5484
    }
5485
5486
    if (
5487
        $encoding === 'UTF-8'
5488
        ||