| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 2 | public function write(OutputInterface $output, $data, FormatterOptions $options) |
|
| 19 | { |
||
| 20 | // Set Yaml\Dumper's default indentation for nested nodes/collections to |
||
| 21 | // 2 spaces for consistency with Drupal coding standards. |
||
| 22 | 2 | $indent = 2; |
|
| 23 | // The level where you switch to inline YAML is set to PHP_INT_MAX to |
||
| 24 | // ensure this does not occur. |
||
| 25 | 2 | $output->writeln(Yaml::dump($data, PHP_INT_MAX, $indent, false, true)); |
|
| 26 | 2 | } |
|
| 27 | } |
||
| 28 |
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: