Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/UTF8.php 4 locations

@@ 3157-3161 (lines=5) @@
3154
      self::checkForSupport();
3155
    }
3156
3157
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3158
      $len = \mb_strlen($str, '8BIT');
3159
    } else {
3160
      $len = strlen($str);
3161
    }
3162
3163
    /** @noinspection ForeachInvariantsInspection */
3164
    for ($i = 0; $i < $len; $i++) {
@@ 4264-4268 (lines=5) @@
4261
        self::checkForSupport();
4262
      }
4263
4264
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4265
        $len = \mb_strlen($str, '8BIT');
4266
      } else {
4267
        $len = strlen($str);
4268
      }
4269
4270
      /** @noinspection ForeachInvariantsInspection */
4271
      for ($i = 0; $i < $len; $i++) {
@@ 7195-7199 (lines=5) @@
7192
      self::checkForSupport();
7193
    }
7194
7195
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7196
      $max = \mb_strlen($str, '8BIT');
7197
    } else {
7198
      $max = strlen($str);
7199
    }
7200
7201
    $buf = '';
7202
@@ 7762-7766 (lines=5) @@
7759
      self::checkForSupport();
7760
    }
7761
7762
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7763
      $len = \mb_strlen($str, '8BIT');
7764
    } else {
7765
      $len = strlen($str);
7766
    }
7767
7768
    /** @noinspection ForeachInvariantsInspection */
7769
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {