Ejemplo n.º 1
0
 /**
  * Get the description and get the inherited docs.
  *
  * @param DocBlock $phpdoc
  */
 protected function normalizeDescription(DocBlock $phpdoc)
 {
     //Get the short + long description from the DocBlock
     $description = $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);
         $phpdoc->setText($description);
         $this->normalizeParams($inheritdoc);
         $this->normalizeReturn($inheritdoc);
         //Add the tags that are inherited
         $inheritTags = $inheritdoc->getTags();
         if ($inheritTags) {
             /** @var Tag $tag */
             foreach ($inheritTags as $tag) {
                 $tag->setDocBlock();
                 $phpdoc->appendTag($tag);
             }
         }
     }
 }