| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class PaginationParameterBag |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Request |
||
| 13 | */ |
||
| 14 | private $request; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var int |
||
| 18 | */ |
||
| 19 | private $numberOfResults; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | private $maxPerPage; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | private $currentPage; |
||
| 30 | |||
| 31 | public function __construct(Request $request, int $numberOfResults, int $maxPerPage, int $currentPage) |
||
| 32 | { |
||
| 33 | $this->request = $request; |
||
| 34 | $this->numberOfResults = $numberOfResults; |
||
| 35 | $this->maxPerPage = $maxPerPage; |
||
| 36 | $this->currentPage = $currentPage; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getRequest(): Request |
||
| 40 | { |
||
| 41 | return $this->request; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function getNumberOfResults(): int |
||
| 45 | { |
||
| 46 | return $this->numberOfResults; |
||
| 47 | } |
||
| 48 | |||
| 49 | public function getMaxPerPage(): int |
||
| 50 | { |
||
| 51 | return $this->maxPerPage; |
||
| 52 | } |
||
| 53 | |||
| 54 | public function getCurrentPage(): int |
||
| 57 | } |
||
| 58 | } |
||
| 59 |