| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 42 | { |
||
| 43 | $this->stateReader->read(); |
||
| 44 | |||
| 45 | $output->writeln('Start writing files.'); |
||
| 46 | |||
| 47 | foreach ($this->stateReader as $state) { |
||
| 48 | $output->write($state->getClassName() . ' ... '); |
||
| 49 | |||
| 50 | $this->writer->write($input->getArgument('path'), $state); |
||
| 51 | |||
| 52 | $output->writeln('done!'); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 |
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: