Code Duplication    Length = 3-3 lines in 2 locations

src/DrupalExtension/Component/RandomGeneratorComponent.php 2 locations

@@ 33-35 (lines=3) @@
30
   */
31
  public static function randomString($length = 8) {
32
    $str = '';
33
    for ($i = 0; $i < $length; $i++) {
34
      $str .= chr(mt_rand(32, 126));
35
    }
36
    return $str;
37
  }
38
@@ 63-65 (lines=3) @@
60
    $values = array_merge(range(65, 90), range(97, 122), range(48, 57));
61
    $max = count($values) - 1;
62
    $str = chr(mt_rand(97, 122));
63
    for ($i = 1; $i < $length; $i++) {
64
      $str .= chr($values[mt_rand(0, $max)]);
65
    }
66
    return $str;
67
  }
68