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