Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
idbentley committed Jul 26, 2024
1 parent 687d62c commit 9532fb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Handler/UnionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

use JMS\Serializer\Context;
use JMS\Serializer\DeserializationContext;
use JMS\Serializer\Exception\NonVisitableTypeException;
use JMS\Serializer\Exception\RuntimeException;
use JMS\Serializer\GraphNavigatorInterface;
use JMS\Serializer\SerializationContext;
use JMS\Serializer\Visitor\DeserializationVisitorInterface;
use JMS\Serializer\Visitor\SerializationVisitorInterface;
use JMS\Serializer\Exception\NonVisitableTypeException;

final class UnionHandler implements SubscribingHandlerInterface
{
Expand Down Expand Up @@ -126,6 +126,7 @@ private function matchSimpleType(mixed $data, array $type, Context $context): mi

return null;
}

private function isPrimitiveType(string $type): bool
{
return in_array($type, ['int', 'integer', 'float', 'double', 'bool', 'boolean', 'string']);
Expand Down
1 change: 1 addition & 0 deletions src/Metadata/Driver/TypedPropertiesDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public function loadMetadataForClass(ReflectionClass $class): ?ClassMetadata
if ('union' === $propertyMetadata->type['name']) {
$propertyMetadata->setType($this->reorderTypes($propertyMetadata->type));
}

continue;
}

Expand Down

0 comments on commit 9532fb6

Please sign in to comment.