Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4596-4604 (lines=9) @@
4593
      $str = self::clean($str);
4594
    }
4595
4596
    if (
4597
        $encoding !== 'UTF-8'
4598
        &&
4599
        self::$SUPPORT['mbstring'] === false
4600
        &&
4601
        self::$SUPPORT['iconv'] === false
4602
    ) {
4603
      \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4604
    }
4605
4606
    if (
4607
        $encoding !== 'UTF-8'
@@ 4822-4830 (lines=9) @@
4819
      return \strpos($haystack, $needle, $offset);
4820
    }
4821
4822
    if (
4823
        $encoding !== 'UTF-8'
4824
        &&
4825
        self::$SUPPORT['iconv'] === false
4826
        &&
4827
        self::$SUPPORT['mbstring'] === false
4828
    ) {
4829
      \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4830
    }
4831
4832
    if (
4833
        $offset >= 0 // iconv_strpos() can't handle negative offset