| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 47 | { |
||
| 48 | $dic = $this->rebuild->buildContainer(); |
||
| 49 | |||
| 50 | $dumper = new GraphvizDumper($dic); |
||
|
|
|||
| 51 | $content = $dumper->dump(); |
||
| 52 | |||
| 53 | file_put_contents(ROOT . 'cache/dic.gv', $content); |
||
| 54 | exec('dot -Tpng cache/dic.gv -o cache/graph.png; rm cache/dic.gv'); |
||
| 55 | |||
| 56 | $output->writeln('PNG: <info>cache/graph.png</info>'); |
||
| 57 | $output->writeln('GV: <info>cache/dic.gv</info>'); |
||
| 58 | } |
||
| 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.