| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | 3 | public function build(ServerRequestInterface $request, $count) |
|
| 30 | { |
||
| 31 | 3 | $page = isset($request->getQueryParams()['page']) && |
|
| 32 | 3 | (($page = $request->getQueryParams()['page']) > 0) ? $page : 1; |
|
| 33 | |||
| 34 | 3 | return new Paginator( |
|
| 35 | 3 | $page, |
|
| 36 | 3 | $this->perPage, |
|
| 37 | 3 | $count, |
|
| 38 | 3 | $this->twig |
|
| 39 | 3 | ); |
|
| 40 | } |
||
| 41 | } |
||
| 42 |