Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5245-5253 (lines=9) @@
5242
      self::checkForSupport();
5243
    }
5244
5245
    if (
5246
        $encoding !== 'UTF-8'
5247
        &&
5248
        self::$SUPPORT['mbstring'] === false
5249
        &&
5250
        self::$SUPPORT['iconv'] === false
5251
    ) {
5252
      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5253
    }
5254
5255
    if (
5256
        $encoding !== 'UTF-8'
@@ 5458-5466 (lines=9) @@
5455
      return strpos($haystack, $needle, $offset);
5456
    }
5457
5458
    if (
5459
        $encoding !== 'UTF-8'
5460
        &
5461
        self::$SUPPORT['iconv'] === true
5462
        &&
5463
        self::$SUPPORT['mbstring'] === false
5464
    ) {
5465
      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5466
    }
5467
5468
    if (
5469
        $offset >= 0 // iconv_strpos() can't handle negative offset