Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/UTF8.php 4 locations

@@ 3112-3116 (lines=5) @@
3109
      self::checkForSupport();
3110
    }
3111
3112
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3113
      $len = \mb_strlen($str, '8BIT');
3114
    } else {
3115
      $len = strlen($str);
3116
    }
3117
3118
    /** @noinspection ForeachInvariantsInspection */
3119
    for ($i = 0; $i < $len; $i++) {
@@ 4224-4228 (lines=5) @@
4221
        self::checkForSupport();
4222
      }
4223
4224
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4225
        $len = \mb_strlen($str, '8BIT');
4226
      } else {
4227
        $len = strlen($str);
4228
      }
4229
4230
      /** @noinspection ForeachInvariantsInspection */
4231
      for ($i = 0; $i < $len; $i++) {
@@ 7116-7120 (lines=5) @@
7113
      self::checkForSupport();
7114
    }
7115
7116
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7117
      $max = \mb_strlen($str, '8BIT');
7118
    } else {
7119
      $max = strlen($str);
7120
    }
7121
7122
    $buf = '';
7123
@@ 7657-7661 (lines=5) @@
7654
      self::checkForSupport();
7655
    }
7656
7657
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7658
      $len = \mb_strlen($str, '8BIT');
7659
    } else {
7660
      $len = strlen($str);
7661
    }
7662
7663
    /** @noinspection ForeachInvariantsInspection */
7664
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {