Code Duplication    Length = 3-3 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4799-4801 (lines=3) @@
4796
    }
4797
4798
    // iconv and mbstring do not support integer $needle
4799
    if ((int)$needle === $needle && $needle >= 0) {
4800
      $needle = (string)self::chr((int)$needle);
4801
    }
4802
4803
    if ($cleanUtf8 === true) {
4804
      // "\mb_strpos" and "\iconv_strpos" returns wrong position,
@@ 5027-5029 (lines=3) @@
5024
   */
5025
  public static function strripos(string $haystack, string $needle, int $offset = 0, string $encoding = 'UTF-8', bool $cleanUtf8 = false)
5026
  {
5027
    if ((int)$needle === $needle && $needle >= 0) {
5028
      $needle = (string)self::chr((int)$needle);
5029
    }
5030
5031
    if (!isset($haystack[0], $needle[0])) {
5032
      return false;