Conditions | 1 |
Paths | 1 |
Total Lines | 4 |
Code Lines | 2 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
19 | { |
||
20 | return new ZendLocator($container); |
||
1 ignored issue
–
show
|
|||
21 | } |
||
22 | } |
||
23 |
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.