Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/UTF8.php 4 locations

@@ 3158-3162 (lines=5) @@
3155
      self::checkForSupport();
3156
    }
3157
3158
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3159
      $len = \mb_strlen($str, '8BIT');
3160
    } else {
3161
      $len = strlen($str);
3162
    }
3163
3164
    /** @noinspection ForeachInvariantsInspection */
3165
    for ($i = 0; $i < $len; $i++) {
@@ 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++) {
@@ 7257-7261 (lines=5) @@
7254
      self::checkForSupport();
7255
    }
7256
7257
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7258
      $max = \mb_strlen($str, '8BIT');
7259
    } else {
7260
      $max = strlen($str);
7261
    }
7262
7263
    $buf = '';
7264
@@ 7824-7828 (lines=5) @@
7821
      self::checkForSupport();
7822
    }
7823
7824
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7825
      $len = \mb_strlen($str, '8BIT');
7826
    } else {
7827
      $len = strlen($str);
7828
    }
7829
7830
    /** @noinspection ForeachInvariantsInspection */
7831
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {