Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/UTF8.php 4 locations

@@ 4321-4325 (lines=5) @@
4318
        self::checkForSupport();
4319
      }
4320
4321
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4322
        $len = \mb_strlen($str, '8BIT');
4323
      } else {
4324
        $len = strlen($str);
4325
      }
4326
4327
      /** @noinspection ForeachInvariantsInspection */
4328
      for ($i = 0; $i < $len; $i++) {
@@ 3163-3167 (lines=5) @@
3160
      self::checkForSupport();
3161
    }
3162
3163
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3164
      $len = \mb_strlen($str, '8BIT');
3165
    } else {
3166
      $len = strlen($str);
3167
    }
3168
3169
    /** @noinspection ForeachInvariantsInspection */
3170
    for ($i = 0; $i < $len; $i++) {
@@ 7247-7251 (lines=5) @@
7244
      self::checkForSupport();
7245
    }
7246
7247
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7248
      $max = \mb_strlen($str, '8BIT');
7249
    } else {
7250
      $max = strlen($str);
7251
    }
7252
7253
    $buf = '';
7254
@@ 7814-7818 (lines=5) @@
7811
      self::checkForSupport();
7812
    }
7813
7814
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7815
      $len = \mb_strlen($str, '8BIT');
7816
    } else {
7817
      $len = strlen($str);
7818
    }
7819
7820
    /** @noinspection ForeachInvariantsInspection */
7821
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {