Skip to content

Commit 01baf0a

Browse files
soyukamtarld
andauthored
feat(serializer): type info (#7104)
Co-authored-by: Mathias Arlaud <[email protected]>
1 parent 0139d2f commit 01baf0a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Serializer/ItemNormalizer.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,8 @@ private function getComponents(object $object, ?string $format, array $context):
193193

194194
// prevent declaring $attribute as attribute if it's already declared as relationship
195195
$isRelationship = false;
196-
$typeIsResourceClass = function (Type $type) use (&$typeIsResourceClass, &$className): bool {
197-
return match (true) {
198-
$type instanceof WrappingTypeInterface => $type->wrappedTypeIsSatisfiedBy($typeIsResourceClass),
199-
$type instanceof CompositeTypeInterface => $type->composedTypesAreSatisfiedBy($typeIsResourceClass),
200-
default => $type instanceof ObjectType && $this->resourceClassResolver->isResourceClass($className = $type->getClassName()),
201-
};
196+
$typeIsResourceClass = function (Type $type) use (&$className): bool {
197+
return $type instanceof ObjectType && $this->resourceClassResolver->isResourceClass($className = $type->getClassName());
202198
};
203199

204200
foreach ($types as $type) {

0 commit comments

Comments
 (0)