Total Complexity | 6 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 0 |
1 | <?php |
||
8 | class StuRandom |
||
9 | { |
||
10 | 1 | public function rand(int $min, int $max, bool $useStandardNormalDistribution = false): int |
|
11 | { |
||
12 | 1 | if ($useStandardNormalDistribution) { |
|
13 | 1 | return $this->generateRandomValueStandardNormalDistribution($min, $max); |
|
14 | } |
||
15 | |||
16 | return random_int($min, $max); |
||
17 | } |
||
18 | |||
19 | public function array_rand(array $array): string|int |
||
22 | } |
||
23 | |||
24 | 1 | private function generateRandomValueStandardNormalDistribution(int $min, int $max): int |
|
38 | } |
||
39 | } |
||
40 |