| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function paginate(PaginationParamsInterface $paginationParams, $object) |
||
| 33 | { |
||
| 34 | $query = null; |
||
| 35 | if ($object instanceof QueryInterface) { |
||
| 36 | $query = $object; |
||
| 37 | $object = $query->getRepository(); |
||
|
|
|||
| 38 | } |
||
| 39 | |||
| 40 | $count = $query->count(); |
||
| 41 | $paginationParams->setCount($count); |
||
| 42 | |||
| 43 | return $query |
||
| 44 | ->limit($paginationParams->getLimit()) |
||
| 45 | ->offSet($paginationParams->getOffSet()) |
||
| 46 | ->all(); |
||
| 47 | } |
||
| 49 |