Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
46 | public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string |
||
47 | { |
||
48 | 1 | if ($value instanceof Money) { |
|
49 | return $value->getAmount(); |
||
50 | 1 | } |
|
51 | |||
52 | if ($value === null) { |
||
53 | return null; |
||
54 | } |
||
55 | |||
56 | throw new InvalidArgumentException('Cannot convert to database value: ' . var_export($value, true)); |
||
57 | } |
||
59 |