1 | <?php |
||
10 | class Submit extends AbstractElement implements ClickRequestInterface |
||
11 | { |
||
12 | private $form; |
||
13 | |||
14 | /** |
||
15 | * @return DOMElement |
||
16 | */ |
||
17 | 1 | public function getForm() |
|
21 | |||
22 | /** |
||
23 | * @return Form |
||
24 | */ |
||
25 | 1 | public function getFormElement() |
|
33 | |||
34 | 1 | public function getDefaultData() |
|
44 | |||
45 | /** |
||
46 | * @return Request |
||
47 | */ |
||
48 | 1 | public function clickRequest() |
|
58 | } |
||
59 |
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.