protected function buildInheritanceChain()
{
$superTypes = array();
foreach ($this->declaredSuperTypes as $superTypeName => $superType) {
if ($superType !== null) {
$this->addInheritedSuperTypes($superTypes, $superType);
$superTypes[$superTypeName] = $superType;
}
}
foreach ($this->declaredSuperTypes as $superTypeName => $superType) {
if ($superType === null) {
unset($superTypes[$superTypeName]);
}
}
return array_unique($superTypes);
}