Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | 3 | public function convertToDatabaseValue($value, AbstractPlatform $platform): string |
|
40 | { |
||
41 | 3 | if (!is_array($value)) { |
|
42 | 2 | throw ConversionException::conversionFailedSerialization($value, 'json', 'value must be a PHP array'); |
|
43 | } |
||
44 | |||
45 | 1 | if (!$value) { |
|
46 | 1 | return ''; |
|
47 | } |
||
48 | |||
49 | 1 | return parent::convertToDatabaseValue($value, $platform); |
|
50 | } |
||
52 |