getAnnotationsOfType([AnnotationSchema::class, AttributeSchema::class], true); foreach ($schemas as $schema) { if ($schema->_context->is('class')) { $anchestors = $analysis->getSuperClasses($schema->_context->fullyQualifiedName($schema->_context->class)); $existing = []; foreach ($anchestors as $anchestor) { $anchestorSchema = $analysis->getSchemaForSource($anchestor['context']->fullyQualifiedName($anchestor['class'])); if ($anchestorSchema) { $refPath = !Generator::isDefault($anchestorSchema->schema) ? $anchestorSchema->schema : $anchestor['class']; $this->inheritFrom($schema, $anchestorSchema, $refPath, $anchestor['context']); // one anchestor is enough break; } else { $this->mergeAnnotations($schema, $anchestor, $existing); $this->mergeMethods($schema, $anchestor, $existing); $this->mergeProperties($schema, $anchestor, $existing); } } } } } }