| 1 | <?php |
||
| 17 | class CliController extends AbstractActionController |
||
| 18 | { |
||
| 19 | /** @var Application */ |
||
| 20 | protected $cliApplication; |
||
| 21 | |||
| 22 | /** @var OutputInterface */ |
||
| 23 | protected $output; |
||
| 24 | |||
| 25 | 3 | public function __construct(Application $cliApplication) |
|
| 29 | |||
| 30 | 3 | public function setOutput(OutputInterface $output) : void |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Index action - runs the console application |
||
| 37 | * |
||
| 38 | * @return mixed |
||
| 39 | */ |
||
| 40 | 2 | public function cliAction() |
|
| 51 | } |
||
| 52 |
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.