Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function generate($length) |
||
15 | { |
||
16 | $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; |
||
17 | $randomString = ''; |
||
18 | for ($i = 0; $i < $length; $i++) { |
||
19 | $randomString .= $characters[rand(0, strlen($characters) - 1)]; |
||
20 | } |
||
21 | |||
22 | return $randomString; |
||
23 | } |
||
24 | } |
||
25 |