Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5576-5585 (lines=10) @@
5573
      return false;
5574
    }
5575
5576
    if (
5577
        $cleanUtf8 === true
5578
        ||
5579
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5580
    ) {
5581
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5582
5583
      $needle = self::clean($needle);
5584
      $haystack = self::clean($haystack);
5585
    }
5586
5587
    if (
5588
        $encoding === 'UTF-8'
@@ 5660-5669 (lines=10) @@
5657
      return false;
5658
    }
5659
5660
    if (
5661
        $cleanUtf8 === true
5662
        ||
5663
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5664
    ) {
5665
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5666
      $needle = self::clean($needle);
5667
      $haystack = self::clean($haystack);
5668
    }
5669
5670
    if (
5671
        $encoding === 'UTF-8'
5672
        ||