| Total Complexity | 3 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | final class Page implements IteratorAggregate, Stringable |
||
| 16 | { |
||
| 17 | /** @var int */ |
||
| 18 | public $maxPerPage; |
||
| 19 | |||
| 20 | /** @var int */ |
||
| 21 | public $current; |
||
| 22 | |||
| 23 | /** @var int */ |
||
| 24 | public $total; |
||
| 25 | |||
| 26 | /** @var bool */ |
||
| 27 | public $hasNext; |
||
| 28 | |||
| 29 | /** @var bool */ |
||
| 30 | public $hasPrevious; |
||
| 31 | |||
| 32 | /** @var mixed */ |
||
| 33 | public $data; |
||
| 34 | |||
| 35 | /** @var callable */ |
||
| 36 | private $routeGenerator; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @phpstan-param Pagerfanta<mixed> $pagerfanta |
||
| 40 | * @phpstan-param array<string, mixed> $viewOption |
||
| 41 | */ |
||
| 42 | public function __construct( |
||
| 51 | } |
||
| 52 | |||
| 53 | #[Override] |
||
| 54 | public function __toString(): string |
||
| 55 | { |
||
| 56 | return (string) $this->view->render( |
||
| 57 | $this->pagerfanta, |
||
| 58 | $this->routeGenerator, |
||
| 59 | $this->viewOption, |
||
| 60 | ); |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | 9 | * {@inheritDoc} |
|
| 65 | * |
||
| 66 | * @return Iterator<int, Page> |
||
| 67 | */ |
||
| 68 | #[Override] |
||
| 75 | } |
||
| 76 | } |
||
| 77 |