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