Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
15 | 2 | public function __invoke(int $currentPageNo, int $rowsPerPage, int $totalRowCount, array $options = []): string |
|
16 | { |
||
17 | 2 | if (!$this->view || !$this->view->getRequest()) { |
|
18 | 1 | throw new \LogicException('View request is required for this view helper'); |
|
19 | } |
||
20 | |||
21 | 1 | $paginator = new Paginator($currentPageNo, $rowsPerPage, $totalRowCount, $this->view->getRequest(), $options); |
|
|
|||
22 | |||
23 | 1 | return $paginator->getHtml(); |
|
24 | } |
||
25 | } |
||
26 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: