Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class RandomGenerator |
||
10 | { |
||
11 | /** |
||
12 | * Returns a random value between 0 and $max. |
||
13 | * |
||
14 | * @param float $max (optional) |
||
15 | * |
||
16 | * @return float |
||
17 | */ |
||
18 | public function randFloat($max = 1.0) |
||
19 | { |
||
20 | return \mt_rand() / \mt_getrandmax() * $max; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Returns a v4 UUID. |
||
25 | * |
||
26 | * @return string |
||
27 | */ |
||
28 | public function uuid() |
||
35 | } |
||
36 | } |