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