1 | <?php |
||
11 | class ContextServiceProvider extends AbstractServiceProvider |
||
12 | { |
||
13 | protected $provides = [ |
||
14 | ContextManager::class, |
||
15 | ]; |
||
16 | |||
17 | /** |
||
18 | * Use the register method to register items with the container via the |
||
19 | * protected $this->container property or the `getContainer` method |
||
20 | * from the ContainerAwareTrait. |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | public function register(): void |
||
33 | } |
||
34 |
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.