1 | <?php |
||
13 | class RecursivePagination |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $queue = []; |
||
20 | |||
21 | /** |
||
22 | * @var Parser |
||
23 | */ |
||
24 | protected $parser; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $elementSelector = []; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @param string|array $expression |
||
34 | * @throws \Exception |
||
35 | */ |
||
36 | 27 | public function __construct(ParserInterface $parser, $expression) |
|
41 | |||
42 | |||
43 | /** |
||
44 | * @param array|string $links |
||
45 | * @return $this |
||
46 | * @throws \InvalidArgumentException |
||
47 | */ |
||
48 | 18 | public function addToQueue($links, bool $state = false): self |
|
62 | |||
63 | |||
64 | /** |
||
65 | * @throws \Exception |
||
66 | * @throws \InvalidArgumentException |
||
67 | */ |
||
68 | 12 | public function getNextPage(): ?ElementFinderInterface |
|
91 | |||
92 | |||
93 | /** |
||
94 | * @param string|array $expression |
||
95 | * @throws \InvalidArgumentException |
||
96 | */ |
||
97 | 27 | private function setExpression($expression): void |
|
116 | |||
117 | } |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.