| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class Pagination |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | private $size; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | private $number; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @throws NonExistentPageNumberException |
||
| 23 | */ |
||
| 24 | public function __construct(int $size, ?int $page = 1) |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getSize(): int |
||
| 35 | { |
||
| 36 | return $this->size; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getNumber(): int |
||
| 40 | { |
||
| 41 | return $this->number; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getQueryOptions(): array |
||
| 50 | ] |
||
| 51 | ]; |
||
| 52 | } |
||
| 54 |