Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function __construct(int $page, int $limit) |
||
24 | { |
||
25 | if ($page < self::MIN_PAGE_NUMBER) { |
||
26 | throw new InvalidArgumentException(sprintf("Invalid page number (%s).", $page)); |
||
27 | } |
||
28 | |||
29 | if ($limit < self::MIN_PAGE_LIMIT) { |
||
30 | throw new InvalidArgumentException(sprintf("Invalid page limit (%s).", $limit)); |
||
31 | } |
||
32 | |||
33 | $this->page = $page; |
||
34 | $this->limit = $limit; |
||
35 | } |
||
52 |