| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Ray\AuraSqlModule\Pagerfanta; |
||
| 6 | |||
| 7 | use Iterator; |
||
| 8 | use IteratorAggregate; |
||
| 9 | use Override; |
||
|
0 ignored issues
–
show
|
|||
| 10 | use Pagerfanta\Pagerfanta; |
||
| 11 | use Pagerfanta\View\ViewInterface; |
||
| 12 | use Stringable; |
||
| 13 | |||
| 14 | /** @implements IteratorAggregate<int, Page> */ |
||
| 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( |
||
| 43 | /** @var Pagerfanta<mixed> */ |
||
| 44 | private readonly Pagerfanta $pagerfanta, |
||
| 45 | RouteGeneratorInterface $routeGenerator, |
||
| 46 | private readonly ViewInterface $view, |
||
| 47 | /** @var array<string, mixed> */ |
||
| 48 | private readonly array $viewOption |
||
| 49 | ) { |
||
| 50 | $this->routeGenerator = $routeGenerator; |
||
| 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 | * {@inheritDoc} |
||
| 65 | * |
||
| 66 | * @return Iterator<int, Page> |
||
| 67 | */ |
||
| 68 | #[Override] |
||
| 69 | public function getIterator(): Iterator |
||
| 70 | { |
||
| 71 | /** @var Iterator<int, Page> $iterator */ |
||
| 72 | $iterator = $this->pagerfanta->getIterator(); |
||
| 73 | |||
| 74 | return $iterator; |
||
| 75 | } |
||
| 76 | } |
||
| 77 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths