Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.0416 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 2 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
|
37 | { |
||
38 | 2 | if ($value instanceof Money) { |
|
39 | return $value->getAmount(); |
||
40 | } |
||
41 | |||
42 | 2 | if ($value === null) { |
|
43 | 1 | return $value; |
|
44 | } |
||
45 | |||
46 | 1 | throw new \InvalidArgumentException('Cannot convert to dababase value: ' . var_export($value, true)); |
|
47 | } |
||
54 |