Code Duplication    Length = 5-5 lines in 4 locations

includes/libraries/protect/AntiXSS/UTF8.php 4 locations

@@ 3117-3121 (lines=5) @@
3114
      self::checkForSupport();
3115
    }
3116
3117
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
3118
      $len = \mb_strlen($str, '8BIT');
3119
    } else {
3120
      $len = strlen($str);
3121
    }
3122
3123
    /** @noinspection ForeachInvariantsInspection */
3124
    for ($i = 0; $i < $len; $i++) {
@@ 4222-4226 (lines=5) @@
4219
        self::checkForSupport();
4220
      }
4221
4222
      if (self::$SUPPORT['mbstring_func_overload'] === true) {
4223
        $len = \mb_strlen($str, '8BIT');
4224
      } else {
4225
        $len = strlen($str);
4226
      }
4227
4228
      /** @noinspection ForeachInvariantsInspection */
4229
      for ($i = 0; $i < $len; $i++) {
@@ 7110-7114 (lines=5) @@
7107
      self::checkForSupport();
7108
    }
7109
7110
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7111
      $max = \mb_strlen($str, '8BIT');
7112
    } else {
7113
      $max = strlen($str);
7114
    }
7115
7116
    $buf = '';
7117
@@ 7652-7656 (lines=5) @@
7649
      self::checkForSupport();
7650
    }
7651
7652
    if (self::$SUPPORT['mbstring_func_overload'] === true) {
7653
      $len = \mb_strlen($str, '8BIT');
7654
    } else {
7655
      $len = strlen($str);
7656
    }
7657
7658
    /** @noinspection ForeachInvariantsInspection */
7659
    for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) {