| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class PaginationDataHandler implements PaginationDataHandlerInterface |
||
| 16 | { |
||
| 17 | /** @var int */ |
||
| 18 | private $defaultLimit; |
||
| 19 | |||
| 20 | public function __construct(int $defaultLimit) |
||
| 21 | { |
||
| 22 | $this->defaultLimit = $defaultLimit; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function retrieveData(array $requestData): array |
||
| 26 | { |
||
| 27 | $data = []; |
||
| 28 | |||
| 29 | $this->resolvePage($requestData, $data); |
||
| 30 | $this->resolveLimit($requestData, $data); |
||
| 31 | |||
| 32 | return $data; |
||
| 33 | } |
||
| 34 | |||
| 35 | private function resolvePage(array $requestData, array &$data): void |
||
| 44 | } |
||
| 45 | |||
| 46 | private function resolveLimit(array $requestData, array &$data): void |
||
| 55 | } |
||
| 56 | } |
||
| 57 |