Conditions | 2 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | 2 | public function paginate(int $perPage = 15, ?int $page = null, string $pageName = 'page'): static |
|
12 | { |
||
13 | 2 | $page = $page ?: Paginator::resolveCurrentPage($pageName); |
|
14 | |||
15 | 2 | $this->addParameterToQuery('per_page', $perPage) |
|
16 | 2 | ->addParameterToQuery('page', $page); |
|
17 | |||
18 | 2 | return $this; |
|
19 | } |
||
21 |