| 1 | <?php |
||
| 17 | class PhakeMockingStrategy extends AbstractMockingStrategy |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * PhakeMockingStrategy constructor. |
||
| 21 | */ |
||
| 22 | 2 | public function __construct() |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $fqcn |
||
| 29 | * @return PhakeMock |
||
| 30 | */ |
||
| 31 | 21 | protected function doBuild(string $fqcn) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param PhakeMock $mock |
||
| 38 | * @param Stub $stub |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | 21 | protected function doDecorate($mock, Stub $stub) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @param PhakeMock $mock |
||
| 55 | * @return PhakeMock |
||
| 56 | */ |
||
| 57 | 10 | protected function doGet($mock) |
|
| 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.