| 1 | <?php |
||
| 16 | class GraphvizDumpCommand extends Command |
||
| 17 | { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Rebuild |
||
| 21 | */ |
||
| 22 | private $rebuild; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritdoc} |
||
| 26 | */ |
||
| 27 | protected function configure() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param Rebuild $rebuild |
||
| 35 | */ |
||
| 36 | public function __construct(Rebuild $rebuild) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * {@inheritdoc} |
||
| 45 | */ |
||
| 46 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 59 | } |
||
| 60 |
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.