Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5167-5175 (lines=9) @@
5164
      self::checkForSupport();
5165
    }
5166
5167
    if (
5168
        $encoding !== 'UTF-8'
5169
        &&
5170
        self::$SUPPORT['mbstring'] === false
5171
        &&
5172
        self::$SUPPORT['iconv'] === false
5173
    ) {
5174
      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5175
    }
5176
5177
    if (
5178
        $encoding !== 'UTF-8'
@@ 5380-5388 (lines=9) @@
5377
      return strpos($haystack, $needle, $offset);
5378
    }
5379
5380
    if (
5381
        $encoding !== 'UTF-8'
5382
        &
5383
        self::$SUPPORT['iconv'] === true
5384
        &&
5385
        self::$SUPPORT['mbstring'] === false
5386
    ) {
5387
      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5388
    }
5389
5390
    if (
5391
        $offset >= 0 // iconv_strpos() can't handle negative offset