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++) {
@@ 7058-7062 (lines=5) @@
7055
      self::checkForSupport();
7056
    }
7057
7058
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7059
      $max = \mb_strlen($str, '8BIT');
7060
    } else {
7061
      $max = strlen($str);
7062
    }
7063
7064
    $buf = '';
7065
@@ 7599-7603 (lines=5) @@
7596
      self::checkForSupport();
7597
    }
7598
7599
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7600
      $len = \mb_strlen($str, '8BIT');
7601
    } else {
7602
      $len = strlen($str);
7603
    }
7604
7605
    /** @noinspection ForeachInvariantsInspection */
7606
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {