Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
19 | public function export($value, int $indentationLevel = 0) : string |
||
20 | { |
||
21 | /** @var LocalColumnMetadata $value */ |
||
22 | $indentation = str_repeat(self::INDENTATION, $indentationLevel); |
||
23 | $objectReference = $indentation . self::VARIABLE; |
||
24 | $lines = []; |
||
25 | |||
26 | $lines[] = parent::export($value, $indentationLevel); |
||
27 | |||
28 | $lines[] = $objectReference . '->setLength(' . $value->getLength() . ');'; |
||
29 | $lines[] = $objectReference . '->setScale(' . $value->getScale() . ');'; |
||
30 | $lines[] = $objectReference . '->setPrecision(' . $value->getPrecision() . ');'; |
||
31 | |||
32 | if ($value->hasValueGenerator()) { |
||
33 | $lines[] = sprintf( |
||
34 | $objectReference . '->setValueGenerator(new ValueGenerator(%s, %s));', |
||
35 | var_export($value->getValueGenerator()->getType(), true), |
||
36 | var_export($value->getValueGenerator()->getDefinition(), true) |
||
|
|||
37 | ); |
||
38 | } |
||
39 | |||
40 | return implode(PHP_EOL, $lines); |
||
41 | } |
||
43 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.