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++) {
@@ 4317-4321 (lines=5) @@
4314
        self::checkForSupport();
4315
      }
4316
4317
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4318
        $len = \mb_strlen($str, '8BIT');
4319
      } else {
4320
        $len = strlen($str);
4321
      }
4322
4323
      /** @noinspection ForeachInvariantsInspection */
4324
      for ($i = 0; $i < $len; $i++) {
@@ 7253-7257 (lines=5) @@
7250
      self::checkForSupport();
7251
    }
7252
7253
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7254
      $max = \mb_strlen($str, '8BIT');
7255
    } else {
7256
      $max = strlen($str);
7257
    }
7258
7259
    $buf = '';
7260
@@ 7820-7824 (lines=5) @@
7817
      self::checkForSupport();
7818
    }
7819
7820
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7821
      $len = \mb_strlen($str, '8BIT');
7822
    } else {
7823
      $len = strlen($str);
7824
    }
7825
7826
    /** @noinspection ForeachInvariantsInspection */
7827
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {