1 | <?php |
||
8 | class ZendLocatorFactory implements FactoryInterface |
||
9 | { |
||
10 | /** |
||
11 | * Create service |
||
12 | * |
||
13 | * @param ContainerInterface $container |
||
14 | * @param string $requestedName |
||
15 | * @param array $options |
||
16 | * @return ZendLocator |
||
17 | */ |
||
18 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
||
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.