Skip to content

Commit

Permalink
style: use null-safe operator
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Dec 29, 2023
1 parent 82b702d commit 312e3a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GraphQl/Serializer/ItemNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public function normalize(mixed $object, string $format = null, array $context =
protected function normalizeCollectionOfRelations(ApiProperty $propertyMetadata, iterable $attributeValue, string $resourceClass, ?string $format, array $context): array
{
// check for nested collection
$operation = $this?->resourceMetadataCollectionFactory->create($resourceClass)->getOperation(forceCollection: true, forceGraphQl: true);
if ($operation && $operation instanceof Query && $operation->getNested() && !$operation->getResolver() && !$operation->getProvider()) {
$operation = $this->resourceMetadataCollectionFactory?->create($resourceClass)->getOperation(forceCollection: true, forceGraphQl: true);
if ($operation instanceof Query && $operation->getNested() && !$operation->getResolver() && !$operation->getProvider()) {
return [...$attributeValue];
}

Expand Down

0 comments on commit 312e3a1

Please sign in to comment.