Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5554-5563 (lines=10) @@
5551
      return false;
5552
    }
5553
5554
    if (
5555
        $cleanUtf8 === true
5556
        ||
5557
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5558
    ) {
5559
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5560
5561
      $needle = self::clean($needle);
5562
      $haystack = self::clean($haystack);
5563
    }
5564
5565
    if (
5566
        $encoding === 'UTF-8'
@@ 5635-5644 (lines=10) @@
5632
      return false;
5633
    }
5634
5635
    if (
5636
        $cleanUtf8 === true
5637
        ||
5638
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5639
    ) {
5640
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5641
      $needle = self::clean($needle);
5642
      $haystack = self::clean($haystack);
5643
    }
5644
5645
    if (
5646
        $encoding === 'UTF-8'
5647
        ||