1 | <?php |
||
12 | class PhpGenerator implements Generator |
||
13 | { |
||
14 | /** |
||
15 | * The maximum random number |
||
16 | * |
||
17 | * @var int |
||
18 | */ |
||
19 | protected $max = PHP_INT_MAX; |
||
20 | |||
21 | /** |
||
22 | * The minimum random number |
||
23 | * |
||
24 | * @var int |
||
25 | */ |
||
26 | protected $min = 1; |
||
27 | |||
28 | /** |
||
29 | * Constructor |
||
30 | * |
||
31 | * @param int $max The maximum random number |
||
32 | * @param int $min The minimum random number (must be positive) |
||
33 | */ |
||
34 | 69 | public function __construct($max = PHP_INT_MAX, $min = 1) |
|
43 | |||
44 | /** |
||
45 | * @inheritdoc |
||
46 | */ |
||
47 | 20 | public function getRandomInt() |
|
59 | } |
||
60 |