Commit 602cdf19 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

N'indique que les enfants directs des interfaces.

Showing with 8 additions and 6 deletions
+8 -6
...@@ -181,12 +181,6 @@ final class SerializationMapper implements TypeFactoryInterface ...@@ -181,12 +181,6 @@ final class SerializationMapper implements TypeFactoryInterface
$properties = $this->mapProperties($classInfo->getProperties()); $properties = $this->mapProperties($classInfo->getProperties());
$children = [];
/** @var PHPClass $class */
foreach ($classInfo->iterateDescendants(ClassInfo::INTERFACE) as $class => $descendant) {
$children[] = $this->get($class->getFullName());
}
if ($this->withAtFields) { if ($this->withAtFields) {
$resources = $this->getResourceClassesOf($resourceClass); $resources = $this->getResourceClassesOf($resourceClass);
$resourceTypes = array_map([Placeholder::class, 'get'], array_keys($resources)); $resourceTypes = array_map([Placeholder::class, 'get'], array_keys($resources));
...@@ -216,6 +210,14 @@ final class SerializationMapper implements TypeFactoryInterface ...@@ -216,6 +210,14 @@ final class SerializationMapper implements TypeFactoryInterface
$desc[] = sprintf('Serialization groups: %s', implode(', ', $this->serialization->getGroups()) ?: '-'); $desc[] = sprintf('Serialization groups: %s', implode(', ', $this->serialization->getGroups()) ?: '-');
$desc = trim(implode("\n", $desc)); $desc = trim(implode("\n", $desc));
$children = [];
/* @var PHPClass $class */
foreach ($classInfo->getChildren() as $child) {
if ($child->isInterface()) {
$children[] = $this->get($child->getResource()->getFullName());
}
}
return new InterfaceType($repr->getName(), $parent, $properties, $desc, $children); return new InterfaceType($repr->getName(), $parent, $properties, $desc, $children);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment