Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.1755 |
Changes | 0 |
1 | <?php |
||
44 | 5 | public function convert($value) |
|
45 | { |
||
46 | 5 | if ($value === null) { |
|
47 | return "NULL"; |
||
48 | } |
||
49 | |||
50 | 5 | if ($value instanceof Buildable) { |
|
51 | 5 | $className = get_class($value); |
|
52 | 5 | if (isset($this->converters[$className])) { |
|
53 | 5 | return $this->converters[$className]->convert($value); |
|
54 | } |
||
55 | } |
||
56 | |||
57 | 3 | return strval($value); |
|
58 | } |
||
59 | } |
||
60 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..