Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5480-5489 (lines=10) @@
5477
      return false;
5478
    }
5479
5480
    if (
5481
        $cleanUtf8 === true
5482
        ||
5483
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5484
    ) {
5485
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5486
5487
      $needle = self::clean($needle);
5488
      $haystack = self::clean($haystack);
5489
    }
5490
5491
    if (
5492
        $encoding === 'UTF-8'
@@ 5561-5570 (lines=10) @@
5558
      return false;
5559
    }
5560
5561
    if (
5562
        $cleanUtf8 === true
5563
        ||
5564
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5565
    ) {
5566
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5567
      $needle = self::clean($needle);
5568
      $haystack = self::clean($haystack);
5569
    }
5570
5571
    if (
5572
        $encoding === 'UTF-8'
5573
        ||