| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | private function validatePositiveInteger($number) |
||
| 35 | { |
||
| 36 | $positiveInteger = filter_var($number, FILTER_VALIDATE_INT, array('options' => array('min_range' => 1))); |
||
| 37 | |||
| 38 | if ($positiveInteger === false) { |
||
| 39 | throw new \InvalidArgumentException('Invalid positive integer: ' . print_r($number, true)); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 52 |