Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/UTF8.php 4 locations

@@ 3127-3131 (lines=5) @@
3124
      self::checkForSupport();
3125
    }
3126
3127
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3128
      $len = \mb_strlen($str, '8BIT');
3129
    } else {
3130
      $len = strlen($str);
3131
    }
3132
3133
    /** @noinspection ForeachInvariantsInspection */
3134
    for ($i = 0; $i < $len; $i++) {
@@ 4232-4236 (lines=5) @@
4229
        self::checkForSupport();
4230
      }
4231
4232
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4233
        $len = \mb_strlen($str, '8BIT');
4234
      } else {
4235
        $len = strlen($str);
4236
      }
4237
4238
      /** @noinspection ForeachInvariantsInspection */
4239
      for ($i = 0; $i < $len; $i++) {
@@ 7163-7167 (lines=5) @@
7160
      self::checkForSupport();
7161
    }
7162
7163
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7164
      $max = \mb_strlen($str, '8BIT');
7165
    } else {
7166
      $max = strlen($str);
7167
    }
7168
7169
    $buf = '';
7170
@@ 7730-7734 (lines=5) @@
7727
      self::checkForSupport();
7728
    }
7729
7730
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7731
      $len = \mb_strlen($str, '8BIT');
7732
    } else {
7733
      $len = strlen($str);
7734
    }
7735
7736
    /** @noinspection ForeachInvariantsInspection */
7737
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {