| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function write(OutputInterface $output, $data, FormatterOptions $options) |
||
| 22 | { |
||
| 23 | $dumper = new CliDumper(); |
||
| 24 | $cloned_data = (new VarCloner())->cloneVar($data); |
||
| 25 | |||
| 26 | if ($output instanceof StreamOutput) { |
||
| 27 | // When stream output is used the dumper is smart enough to |
||
| 28 | // determine whether or not to apply colors to the dump. |
||
| 29 | // @see Symfony\Component\VarDumper\Dumper\CliDumper::supportsColors |
||
| 30 | $dumper->dump($cloned_data, $output->getStream()); |
||
| 31 | } else { |
||
| 32 | $output->writeln($dumper->dump($cloned_data, true)); |
||
|
|
|||
| 33 | } |
||
| 34 | } |
||
| 35 | } |
||
| 36 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: