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 |
||
29 | 2 | public function convertToDatabaseValue($value, AbstractPlatform $platform) |
|
30 | { |
||
31 | 2 | if ($value instanceof Money) { |
|
32 | return $value->getAmount(); |
||
33 | } |
||
34 | |||
35 | 2 | if ($value === null) { |
|
36 | 1 | return $value; |
|
37 | } |
||
38 | |||
39 | 1 | throw new \InvalidArgumentException('Cannot convert to dababase value: ' . var_export($value, true)); |
|
40 | } |
||
47 |