Appends a tag at the end of the list of tags.
public appendTag ( |
||
$tag | The tag to add. | |
return | The newly added tag. |
/** * Get the description and get the inherited docs. * */ protected function normalizeDescription() { //Get the short + long description from the DocBlock $description = $this->phpdoc->getText(); //Loop through parents/interfaces, to fill in {@inheritdoc} if (strpos($description, '{@inheritdoc}') !== false) { $inheritdoc = $this->getInheritDoc($this->method); $inheritDescription = $inheritdoc->getText(); $description = str_replace('{@inheritdoc}', $inheritDescription, $description); $this->phpdoc->setText($description); //Add the tags that are inherited $inheritTags = $inheritdoc->getTags(); if ($inheritTags) { foreach ($inheritTags as $tag) { $tag->setDocBlock(); $this->phpdoc->appendTag($tag); } } } }
/** * @param string $existingDocBlock * @return string */ protected function mergeGeneratedTagsIntoDocBlock($existingDocBlock) { $docBlock = new DocBlock($this->removeExistingSupportedTags($existingDocBlock)); if (!$docBlock->getText()) { $docBlock->setText('Class ' . $this->className); } foreach ($this->getGeneratedTags() as $tag) { $docBlock->appendTag($tag); } $serializer = new DocBlockSerializer(); $docBlock = $serializer->getDocComment($docBlock); return $docBlock; }