Skip to content

Commit 9504380

Browse files
authored
Merge pull request #10 from pfilsx/dev
fix nullable enum type convert to db value
2 parents 8adbdfd + 3414b8e commit 9504380

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)