| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 19 | 3 | public function build(ServerRequestInterface $request, $count) |
|
| 20 | { |
||
| 21 | 3 | $page = isset($request->getQueryParams()['page']) && |
|
| 22 | 3 | ($page = $request->getQueryParams()['page'] > 0) ? $page : 1; |
|
| 23 | |||
| 24 | 3 | return new Paginator( |
|
| 25 | 3 | $page, |
|
| 26 | 3 | $this->perPage, |
|
| 27 | 3 | ceil($count / $this->perPage), |
|
| 28 | 3 | $this->twig |
|
| 29 | 3 | ); |
|
| 30 | } |
||
| 31 | } |
||
| 32 |