protected function generateTypeTag(AbstractTag $tag)
{
$docblock = $this->getDocblock();
$type = $this->getType();
if (!empty($type)) {
// try to find tag at first and update
$tags = $docblock->getTags($tag->getTagName());
if ($tags->size() > 0) {
$ttag = $tags->get(0);
$ttag->setType($this->getType());
$ttag->setDescription($this->getTypeDescription());
} else {
$docblock->appendTag($tag->setType($this->getType())->setDescription($this->getTypeDescription()));
}
}
}