Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | private function __construct($interval) |
||
27 | { |
||
28 | if (!is_numeric($interval)) { |
||
29 | throw new InvalidArgumentException(sprintf('Provided interval %s is not numeric', $interval)); |
||
30 | } |
||
31 | |||
32 | if (!$interval) { |
||
33 | throw new InvalidArgumentException( |
||
34 | sprintf('Interval needs to be greater than 1 to make sense. "%s" provided', $interval) |
||
35 | ); |
||
36 | } |
||
37 | |||
38 | $this->interval = (int)$interval; |
||
39 | } |
||
40 | |||
82 | } |