Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4694-4702 (lines=9) @@
4691
      $str = self::clean($str);
4692
    }
4693
4694
    if (
4695
        $encoding !== 'UTF-8'
4696
        &&
4697
        self::$SUPPORT['mbstring'] === false
4698
        &&
4699
        self::$SUPPORT['iconv'] === false
4700
    ) {
4701
      \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4702
    }
4703
4704
    if (
4705
        $encoding !== 'UTF-8'
@@ 4920-4928 (lines=9) @@
4917
      return \strpos($haystack, $needle, $offset);
4918
    }
4919
4920
    if (
4921
        $encoding !== 'UTF-8'
4922
        &&
4923
        self::$SUPPORT['iconv'] === false
4924
        &&
4925
        self::$SUPPORT['mbstring'] === false
4926
    ) {
4927
      \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4928
    }
4929
4930
    if (
4931
        $offset >= 0 // iconv_strpos() can't handle negative offset