| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 7 | public function enablePaginator($paginator = null) |
|
| 17 | { |
||
| 18 | 7 | $paginator = $paginator instanceof Paginator ? $paginator : Paginator::name($paginator); |
|
| 19 | 7 | $perPage = $this->request->input($paginator->getName()) ?: $paginator->getDefault(); |
|
| 20 | 7 | $this->getBuilder() |
|
|
|
|||
| 21 | 7 | ->getModel() |
|
| 22 | 7 | ->setPerPage($perPage); |
|
| 23 | |||
| 24 | 7 | return $this; |
|
| 25 | } |
||
| 27 |