Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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