Skip to content

Commit 312e3a1

Browse files
committed
style: use null-safe operator
1 parent 82b702d commit 312e3a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GraphQl/Serializer/ItemNormalizer.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ public function normalize(mixed $object, string $format = null, array $context =
112112
protected function normalizeCollectionOfRelations(ApiProperty $propertyMetadata, iterable $attributeValue, string $resourceClass, ?string $format, array $context): array
113113
{
114114
// check for nested collection
115-
$operation = $this?->resourceMetadataCollectionFactory->create($resourceClass)->getOperation(forceCollection: true, forceGraphQl: true);
116-
if ($operation && $operation instanceof Query && $operation->getNested() && !$operation->getResolver() && !$operation->getProvider()) {
115+
$operation = $this->resourceMetadataCollectionFactory?->create($resourceClass)->getOperation(forceCollection: true, forceGraphQl: true);
116+
if ($operation instanceof Query && $operation->getNested() && !$operation->getResolver() && !$operation->getProvider()) {
117117
return [...$attributeValue];
118118
}
119119

0 commit comments

Comments
 (0)