| 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 |
||
| 46 | 2 | public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string |
|
| 47 | { |
||
| 48 | 2 | if ($value instanceof Money) { |
|
| 49 | return $value->getAmount(); |
||
| 50 | } |
||
| 51 | |||
| 52 | 2 | if ($value === null) { |
|
| 53 | 1 | return null; |
|
| 54 | } |
||
| 55 | |||
| 56 | 1 | throw new InvalidArgumentException('Cannot convert to database value: ' . var_export($value, true)); |
|
| 57 | } |
||
| 59 |