private function visitSimpleType(&$class, &$data, SimpleType $type, $name)
{
if ($restriction = $type->getRestriction()) {
$parent = $restriction->getBase();
if ($parent instanceof Type) {
$this->handleClassExtension($class, $data, $parent, $name);
}
} elseif ($unions = $type->getUnions()) {
foreach ($unions as $i => $unon) {
$this->handleClassExtension($class, $data, $unon, $name . $i);
break;
}
}
}