/** * writeDoc * * @param Writer $writer * * @return void */ protected function prepareDoc(DocBlock $doc) { if ($this->tagAutogenerated()) { $doc->setDescription($this->getAutoGenerateTag() . ($doc->hasDescription() ? PHP_EOL . $doc->getDescription() : '')); } }
/** * {@inheritdoc} */ protected function prepareAnnotations(DocBlock $block) { if (!$block->hasDescription()) { $block->setDescription($this->name); } foreach ($this->arguments as $argument) { $block->addParam($argument->getType(), $argument->getName()); } if ('__construct' !== $this->name) { $block->setReturn($this->type); } }
/** * Set the doc block comment * * @param mixed $comment * * @return void */ public function setDescription($description) { $this->docBlock->setDescription($description); }
/** @test */ public function itShouldGetDescription() { $doc = new DocBlock(); $doc->setDescription('FooBar'); $this->assertSame('FooBar', $doc->getDescription()); }