/**
* @param AttributeHandler $tagAttribute
* @param AbstractModel $model
* @param StructAttribute $structAttribute
*/
protected function parseTagAttributeType(AttributeHandler $tagAttribute, AbstractModel $model, StructAttribute $structAttribute = null)
{
if ($structAttribute instanceof StructAttribute) {
$type = $tagAttribute->getValue();
if ($type !== null) {
$typeModel = $this->generator->getStruct($type);
$modelAttributeType = $structAttribute->getType();
if ($typeModel instanceof Struct && (empty($modelAttributeType) || strtolower($modelAttributeType) === 'unknown')) {
if ($typeModel->getIsRestriction()) {
$structAttribute->setType($typeModel->getName());
} elseif (!$typeModel->getIsStruct() && $typeModel->getInheritance()) {
$structAttribute->setType($typeModel->getInheritance());
}
}
}
} else {
$model->addMeta($tagAttribute->getName(), $tagAttribute->getValue(true));
}
}