The expression return $val could return the type null which is incompatible with the type-hinted return array. Consider adding an additional type-check to rule them out.
Loading history...
37
}
38
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');