Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5405-5414 (lines=10) @@
5402
      return false;
5403
    }
5404
5405
    if (
5406
        $cleanUtf8 === true
5407
        ||
5408
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5409
    ) {
5410
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5411
5412
      $needle = self::clean($needle);
5413
      $haystack = self::clean($haystack);
5414
    }
5415
5416
    if (
5417
        $encoding === 'UTF-8'
@@ 5486-5495 (lines=10) @@
5483
      return false;
5484
    }
5485
5486
    if (
5487
        $cleanUtf8 === true
5488
        ||
5489
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5490
    ) {
5491
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5492
      $needle = self::clean($needle);
5493
      $haystack = self::clean($haystack);
5494
    }
5495
5496
    if (
5497
        $encoding === 'UTF-8'
5498
        ||