Skip to content

Commit 3414b8e

Browse files
committed
fix nullable enum type convert to db value
1 parent 8adbdfd commit 3414b8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DBAL/Type/EnumType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ public function getName(): string
4343
}
4444

4545
/**
46-
* @param int|string|\UnitEnum $value
46+
* @param null|int|string|\UnitEnum $value
4747
* @param AbstractPlatform $platform
4848
*
49-
* @return int|string
49+
* @return null|int|string
5050
*/
51-
public function convertToDatabaseValue($value, AbstractPlatform $platform): int|string
51+
public function convertToDatabaseValue($value, AbstractPlatform $platform): null|int|string
5252
{
5353
if ($value instanceof \BackedEnum) {
5454
return $value->value;

0 commit comments

Comments
 (0)