1 | <?php |
||
18 | class AuraSqlQueryPager implements AuraSqlQueryPagerInterface, \ArrayAccess |
||
19 | { |
||
20 | private $pdo; |
||
21 | |||
22 | /** |
||
23 | * @var ViewInterface |
||
24 | */ |
||
25 | private $view; |
||
26 | |||
27 | /** |
||
28 | * @var RouteGeneratorInterface |
||
29 | */ |
||
30 | private $routeGenerator; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | private $viewOptions; |
||
36 | |||
37 | /** |
||
38 | * @var SelectInterface |
||
39 | */ |
||
40 | private $select; |
||
41 | |||
42 | /** |
||
43 | * @var int |
||
44 | */ |
||
45 | private $paging; |
||
46 | |||
47 | /** |
||
48 | * @param ViewInterface $view |
||
49 | * @param array $viewOptions |
||
50 | * |
||
51 | * @PagerViewOption("viewOptions") |
||
52 | */ |
||
53 | 8 | public function __construct(ViewInterface $view, array $viewOptions) |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 3 | public function init(ExtendedPdoInterface $pdo, SelectInterface $select, $paging, RouteGeneratorInterface $routeGenerator) |
|
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | 6 | public function offsetGet($page) |
|
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | 1 | public function offsetExists($offset) |
|
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | 1 | public function offsetSet($offset, $value) |
|
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | 1 | public function offsetUnset($offset) |
|
124 | } |
||
125 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.