Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class TotalPagesAwarePagination extends Pagination |
||
14 | { |
||
15 | use YieldsItemsByLength; |
||
|
|||
16 | |||
17 | /** |
||
18 | * Determine whether this pagination matches the configuration. |
||
19 | */ |
||
20 | 30 | public function matches(): bool |
|
21 | { |
||
22 | 30 | return $this->config->totalPagesKey !== null; |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * Yield the paginated items. |
||
27 | * |
||
28 | * @return Traversable<int, mixed> |
||
29 | */ |
||
30 | 33 | public function getIterator(): Traversable |
|
33 | } |
||
34 | } |
||
35 |