Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5433-5441 (lines=9) @@
5430
      $str = self::clean($str);
5431
    }
5432
5433
    if (
5434
        $encoding !== 'UTF-8'
5435
        &&
5436
        self::$SUPPORT['mbstring'] === false
5437
        &&
5438
        self::$SUPPORT['iconv'] === false
5439
    ) {
5440
      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5441
    }
5442
5443
    if (
5444
        $encoding !== 'UTF-8'
@@ 5650-5658 (lines=9) @@
5647
      return strpos($haystack, $needle, $offset);
5648
    }
5649
5650
    if (
5651
        $encoding !== 'UTF-8'
5652
        &
5653
        self::$SUPPORT['iconv'] === true
5654
        &&
5655
        self::$SUPPORT['mbstring'] === false
5656
    ) {
5657
      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5658
    }
5659
5660
    if (
5661
        $offset >= 0 // iconv_strpos() can't handle negative offset