Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/UTF8.php 4 locations

@@ 3154-3158 (lines=5) @@
3151
      self::checkForSupport();
3152
    }
3153
3154
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3155
      $len = \mb_strlen($str, '8BIT');
3156
    } else {
3157
      $len = strlen($str);
3158
    }
3159
3160
    /** @noinspection ForeachInvariantsInspection */
3161
    for ($i = 0; $i < $len; $i++) {
@@ 4325-4329 (lines=5) @@
4322
        self::checkForSupport();
4323
      }
4324
4325
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4326
        $len = \mb_strlen($str, '8BIT');
4327
      } else {
4328
        $len = strlen($str);
4329
      }
4330
4331
      /** @noinspection ForeachInvariantsInspection */
4332
      for ($i = 0; $i < $len; $i++) {
@@ 7251-7255 (lines=5) @@
7248
      self::checkForSupport();
7249
    }
7250
7251
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7252
      $max = \mb_strlen($str, '8BIT');
7253
    } else {
7254
      $max = strlen($str);
7255
    }
7256
7257
    $buf = '';
7258
@@ 7818-7822 (lines=5) @@
7815
      self::checkForSupport();
7816
    }
7817
7818
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7819
      $len = \mb_strlen($str, '8BIT');
7820
    } else {
7821
      $len = strlen($str);
7822
    }
7823
7824
    /** @noinspection ForeachInvariantsInspection */
7825
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {