1 | <?php |
||
19 | class ControllerMethodName extends AbstractRule implements ClassAware |
||
20 | { |
||
21 | /** |
||
22 | * @param AbstractNode|ClassNode $node |
||
23 | */ |
||
24 | 3 | public function apply(AbstractNode $node) |
|
43 | |||
44 | /** |
||
45 | * @param ClassNode|ASTClass $node |
||
46 | * |
||
47 | * @return bool |
||
48 | */ |
||
49 | 3 | private function isController(ClassNode $node) |
|
61 | } |
||
62 |
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.