@@ -52,8 +52,8 @@ discard block |
||
52 | 52 | setlocale(LC_ALL, "C"); |
53 | 53 | } |
54 | 54 | |
55 | - for ($i = 32; $i < 256; $i ++) { |
|
56 | - if (($allowed == RandomString::ASCII && ! ctype_alnum(chr($i))) || (! ctype_print(chr($i)))) { |
|
55 | + for ($i = 32; $i < 256; $i++) { |
|
56 | + if (($allowed == RandomString::ASCII && !ctype_alnum(chr($i))) || (!ctype_print(chr($i)))) { |
|
57 | 57 | continue; |
58 | 58 | } |
59 | 59 | $allowedChars[] = $i; |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | $i = $length; |
68 | 68 | while ($i > 0) { |
69 | 69 | $index = mt_rand(0, count($allowedChars) - 1); |
70 | - if (! $repeatable && in_array($index, $used)) { |
|
70 | + if (!$repeatable && in_array($index, $used)) { |
|
71 | 71 | continue; |
72 | 72 | } |
73 | 73 | $string .= chr($allowedChars[$index]); |
74 | 74 | $used[] = $i; |
75 | - $i --; |
|
75 | + $i--; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $string; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | if ($context !== null) { |
32 | 32 | foreach ($context as $key => $val) { |
33 | - $replace['{' . $key . '}'] = $val; |
|
33 | + $replace['{'.$key.'}'] = $val; |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 |