Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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