Skip to content

Commit 0cb67ce

Browse files
committed
cs(jsonld): non-nullable not needed
1 parent 988f08b commit 0cb67ce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/JsonLd/Serializer/ItemNormalizer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use ApiPlatform\Metadata\IriConverterInterface;
2323
use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
2424
use ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface;
25-
use ApiPlatform\Metadata\Put;
2625
use ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface;
2726
use ApiPlatform\Metadata\ResourceAccessCheckerInterface;
2827
use ApiPlatform\Metadata\ResourceClassResolverInterface;
@@ -178,7 +177,7 @@ public function denormalize(mixed $data, string $class, ?string $format = null,
178177
} catch (ItemNotFoundException $e) {
179178
$operation = $context['operation'] ?? null;
180179

181-
if (!($operation?->getMethod() === 'PUT' && ($operation?->getExtraProperties()['standard_put'] ?? false))) {
180+
if (!('PUT' === $operation?->getMethod() && ($operation->getExtraProperties()['standard_put'] ?? false))) {
182181
throw $e;
183182
}
184183
}

0 commit comments

Comments
 (0)