Lines
100.00%
11 / 11
Methods
100.00%
1 / 1
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| createFromRequestInput | 100.00% | 11 / 11 | 100.00% | 1 / 1 | 1 | ||
| 9 | class PaginationFactory | |
| 10 | { | |
| 11 | public function createFromRequestInput(?string $pageNumber): Pagination | |
| 12 | { | |
| 13 | $validPageNumber = filter_var( | |
| 14 | $pageNumber, | |
| 15 | FILTER_VALIDATE_INT, | |
| 16 | [ | |
| 17 | "options" => [ | |
| 18 | "default" => 1, | |
| 19 | "min_range" => 1, | |
| 20 | ], | |
| 21 | ] | |
| 22 | ); | |
| 23 | return new Pagination($validPageNumber, 20); | |
| 24 | } | |
| 25 | } |