Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5685-5693 (lines=9) @@
5682
      $str = self::clean($str);
5683
    }
5684
5685
    if (
5686
        $encoding !== 'UTF-8'
5687
        &&
5688
        self::$SUPPORT['mbstring'] === false
5689
        &&
5690
        self::$SUPPORT['iconv'] === false
5691
    ) {
5692
      \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5693
    }
5694
5695
    if (
5696
        $encoding !== 'UTF-8'
@@ 5911-5919 (lines=9) @@
5908
      return \strpos($haystack, $needle, $offset);
5909
    }
5910
5911
    if (
5912
        $encoding !== 'UTF-8'
5913
        &&
5914
        self::$SUPPORT['iconv'] === false
5915
        &&
5916
        self::$SUPPORT['mbstring'] === false
5917
    ) {
5918
      \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5919
    }
5920
5921
    if (
5922
        $offset >= 0 // iconv_strpos() can't handle negative offset