Code Duplication    Length = 5-5 lines in 4 locations

src/voku/helper/UTF8.php 4 locations

@@ 3104-3108 (lines=5) @@
3101
      self::checkForSupport();
3102
    }
3103
3104
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3105
      $len = \mb_strlen($str, '8BIT');
3106
    } else {
3107
      $len = strlen($str);
3108
    }
3109
3110
    /** @noinspection ForeachInvariantsInspection */
3111
    for ($i = 0; $i < $len; $i++) {
@@ 4133-4137 (lines=5) @@
4130
        self::checkForSupport();
4131
      }
4132
4133
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4134
        $len = \mb_strlen($str, '8BIT');
4135
      } else {
4136
        $len = strlen($str);
4137
      }
4138
4139
      /** @noinspection ForeachInvariantsInspection */
4140
      for ($i = 0; $i < $len; $i++) {
@@ 6850-6854 (lines=5) @@
6847
      self::checkForSupport();
6848
    }
6849
6850
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
6851
      $max = \mb_strlen($str, '8BIT');
6852
    } else {
6853
      $max = strlen($str);
6854
    }
6855
6856
    $buf = '';
6857
@@ 7380-7384 (lines=5) @@
7377
      self::checkForSupport();
7378
    }
7379
7380
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7381
      $len = \mb_strlen($str, '8BIT');
7382
    } else {
7383
      $len = strlen($str);
7384
    }
7385
7386
    /** @noinspection ForeachInvariantsInspection */
7387
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {