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++) {
@@ 4314-4318 (lines=5) @@
4311
        self::checkForSupport();
4312
      }
4313
4314
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4315
        $len = \mb_strlen($str, '8BIT');
4316
      } else {
4317
        $len = strlen($str);
4318
      }
4319
4320
      /** @noinspection ForeachInvariantsInspection */
4321
      for ($i = 0; $i < $len; $i++) {
@@ 7246-7250 (lines=5) @@
7243
      self::checkForSupport();
7244
    }
7245
7246
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7247
      $max = \mb_strlen($str, '8BIT');
7248
    } else {
7249
      $max = strlen($str);
7250
    }
7251
7252
    $buf = '';
7253
@@ 7813-7817 (lines=5) @@
7810
      self::checkForSupport();
7811
    }
7812
7813
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7814
      $len = \mb_strlen($str, '8BIT');
7815
    } else {
7816
      $len = strlen($str);
7817
    }
7818
7819
    /** @noinspection ForeachInvariantsInspection */
7820
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {