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++) {
@@ 7072-7076 (lines=5) @@
7069
      self::checkForSupport();
7070
    }
7071
7072
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7073
      $max = \mb_strlen($str, '8BIT');
7074
    } else {
7075
      $max = strlen($str);
7076
    }
7077
7078
    $buf = '';
7079
@@ 7613-7617 (lines=5) @@
7610
      self::checkForSupport();
7611
    }
7612
7613
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7614
      $len = \mb_strlen($str, '8BIT');
7615
    } else {
7616
      $len = strlen($str);
7617
    }
7618
7619
    /** @noinspection ForeachInvariantsInspection */
7620
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {