fix: corrupted logic of model transformer
This commit is contained in:
1 parent
0fcecc9c58
commit
ca5a604a3e
2 files changed
+10
-11
No files matched your search
@@ -59,12 +59,8 @@ class RoomSelectionToIdTransformer implements DataTransformerInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
if (is_int($value)) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if (is_string($value) && ctype_digit($value)) {
|
||||
return (int) $value;
|
||||
if ($value instanceof RoomSelectionDto) {
|
||||
return $value->id;
|
||||
}
|
||||
|
||||
throw new TransformationFailedException(sprintf(
|
||||
|
||||
Reference in new issue
Block a user