Ejemplo n.º 1
0
 /**
  * writeDoc
  *
  * @param Writer $writer
  *
  * @return void
  */
 protected function prepareDoc(DocBlock $doc)
 {
     if ($this->tagAutogenerated()) {
         $doc->setDescription($this->getAutoGenerateTag() . ($doc->hasDescription() ? PHP_EOL . $doc->getDescription() : ''));
     }
 }
Ejemplo n.º 2
0
 /**
  * {@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);
     }
 }
Ejemplo n.º 3
0
 /**
  * Set the doc block comment
  *
  * @param mixed $comment
  *
  * @return void
  */
 public function setDescription($description)
 {
     $this->docBlock->setDescription($description);
 }
Ejemplo n.º 4
0
 /** @test */
 public function itShouldGetDescription()
 {
     $doc = new DocBlock();
     $doc->setDescription('FooBar');
     $this->assertSame('FooBar', $doc->getDescription());
 }