Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5496-5505 (lines=10) @@
5493
      return false;
5494
    }
5495
5496
    if (
5497
        $cleanUtf8 === true
5498
        ||
5499
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5500
    ) {
5501
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5502
5503
      $needle = self::clean($needle);
5504
      $haystack = self::clean($haystack);
5505
    }
5506
5507
    if (
5508
        $encoding === 'UTF-8'
@@ 5577-5586 (lines=10) @@
5574
      return false;
5575
    }
5576
5577
    if (
5578
        $cleanUtf8 === true
5579
        ||
5580
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5581
    ) {
5582
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5583
      $needle = self::clean($needle);
5584
      $haystack = self::clean($haystack);
5585
    }
5586
5587
    if (
5588
        $encoding === 'UTF-8'
5589
        ||