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++) {
@@ 4112-4116 (lines=5) @@
4109
        self::checkForSupport();
4110
      }
4111
4112
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4113
        $len = \mb_strlen($str, '8BIT');
4114
      } else {
4115
        $len = strlen($str);
4116
      }
4117
4118
      /** @noinspection ForeachInvariantsInspection */
4119
      for ($i = 0; $i < $len; $i++) {
@@ 6776-6780 (lines=5) @@
6773
      self::checkForSupport();
6774
    }
6775
6776
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
6777
      $max = \mb_strlen($str, '8BIT');
6778
    } else {
6779
      $max = strlen($str);
6780
    }
6781
6782
    $buf = '';
6783
@@ 7306-7310 (lines=5) @@
7303
      self::checkForSupport();
7304
    }
7305
7306
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7307
      $len = \mb_strlen($str, '8BIT');
7308
    } else {
7309
      $len = strlen($str);
7310
    }
7311
7312
    /** @noinspection ForeachInvariantsInspection */
7313
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {