File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
lib/Doctrine/ODM/MongoDB/Types Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -60,18 +60,13 @@ public function closureToPHP(): string
6060 return <<<'PHP'
6161 if ($value instanceof \Symfony\Component\Uid\Uuid) {
6262 $return = $value;
63- return;
64- }
65-
66- if (! $value instanceof \MongoDB\BSON\Binary) {
63+ } elseif (! $value instanceof \MongoDB\BSON\Binary) {
6764 throw new \InvalidArgumentException(sprintf('Invalid data of type "%s" received for Uuid', get_debug_type($value)));
68- }
69-
70- if ($value->getType() !== \MongoDB\BSON\Binary::TYPE_UUID) {
65+ } elseif ($value->getType() !== \MongoDB\BSON\Binary::TYPE_UUID) {
7166 throw new \InvalidArgumentException(sprintf('Invalid binary data of type %d received for Uuid', $value->getType()));
67+ } else {
68+ $return = \Symfony\Component\Uid\Uuid::fromBinary($value->getData());
7269 }
73-
74- $return = \Symfony\Component\Uid\Uuid::fromBinary($value->getData());
7570PHP;
7671 }
7772}
You can’t perform that action at this time.
0 commit comments