| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 4 | private function serializePaginator(Paginator $paginator, ?DataTransformerInterface $transformer = null): array |
|
| 17 | { |
||
| 18 | return [ |
||
| 19 | 4 | 'data' => $this->serializeItems(ArrayUtils::iteratorToArray($paginator->getCurrentItems()), $transformer), |
|
| 20 | 'pagination' => [ |
||
| 21 | 4 | 'currentPage' => $paginator->getCurrentPageNumber(), |
|
| 22 | 4 | 'pagesCount' => $paginator->count(), |
|
| 23 | 4 | 'itemsPerPage' => $paginator->getItemCountPerPage(), |
|
| 24 | 4 | 'itemsInCurrentPage' => $paginator->getCurrentItemCount(), |
|
| 25 | 4 | 'totalItems' => $paginator->getTotalItemCount(), |
|
| 26 | ], |
||
| 45 |