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