Total Complexity | 6 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
21 | final class MersenneTwisterRNGIteratorAggregate implements IteratorAggregate |
||
22 | { |
||
23 | private int $max = PHP_INT_MAX; |
||
24 | |||
25 | private int $min = PHP_INT_MIN; |
||
26 | |||
27 | private int $seed = 0; |
||
28 | |||
29 | /** |
||
30 | * @return Generator<int, int> |
||
31 | */ |
||
32 | 2 | public function getIterator(): Generator |
|
41 | } |
||
42 | } |
||
43 | |||
44 | 2 | public function withMax(int $max): self |
|
50 | } |
||
51 | |||
52 | 2 | public function withMin(int $min): self |
|
53 | { |
||
54 | 2 | $clone = clone $this; |
|
55 | 2 | $clone->min = $min; |
|
56 | |||
57 | 2 | return $clone; |
|
58 | } |
||
59 | |||
60 | 1 | public function withSeed(int $seed): self |
|
68 | } |
||
69 | } |
||
70 |