Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5187-5195 (lines=9) @@
5184
      self::checkForSupport();
5185
    }
5186
5187
    if (
5188
        $encoding !== 'UTF-8'
5189
        &&
5190
        self::$SUPPORT['mbstring'] === false
5191
        &&
5192
        self::$SUPPORT['iconv'] === false
5193
    ) {
5194
      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5195
    }
5196
5197
    if (
5198
        $encoding !== 'UTF-8'
@@ 5400-5408 (lines=9) @@
5397
      return strpos($haystack, $needle, $offset);
5398
    }
5399
5400
    if (
5401
        $encoding !== 'UTF-8'
5402
        &
5403
        self::$SUPPORT['iconv'] === true
5404
        &&
5405
        self::$SUPPORT['mbstring'] === false
5406
    ) {
5407
      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5408
    }
5409
5410
    if (
5411
        $offset >= 0 // iconv_strpos() can't handle negative offset