protected function prepareAnnotations(DocBlock $block) { if (!$block->hasDescription()) { $block->setInline(true); } if ($block->hasAnnotations()) { $block->unshiftAnnotation(null); } $block->unshiftAnnotation('var', $this->type); }
/** * {@inheritdoc} */ protected function prepareObjDoc(DocBlock $doc) { if (null !== ($parent = $this->getParent())) { $resolver = $this->getImportResolver(); $doc->unshiftAnnotation('see', $resolver->hasAlias($parent) ? $resolver->getAlias($parent) : $resolver->getImport($parent)); } $doc->unshiftAnnotation($this->getType(), $this->getName()); }
/** * {@inheritdoc} */ protected function prepareObjDoc(DocBlock $block) { $block->unshiftAnnotation($this->getType(), $this->getName()); }
/** * writeDoc * * @param Writer $writer * * @return void */ protected function prepareDoc(DocBlock $doc) { if ($this->tagAutogenerated()) { $doc->setDescription($this->getAutoGenerateTag() . ($doc->hasDescription() ? PHP_EOL . $doc->getDescription() : '')); } }
/** * setLongDescription * * @return void */ public function setLongDescription($description) { $this->docBlock->setLongDescription($description); }
/** * {@inheritdoc} */ protected function prepareObjDoc(DocBlock $doc) { $resolver = $this->getImportResolver(); if (!empty($this->interfaces)) { foreach (array_reverse($this->interfaces) as $interface) { $name = $resolver->hasAlias($interface) ? $resolver->getAlias($interface) : $interface; $doc->unshiftAnnotation('see', self::trimNs($name)); } } if ($this->parent) { $name = $resolver->hasAlias($this->getParent()) ? $resolver->getAlias($this->getParent()) : $this->getParent(); $doc->unshiftAnnotation('see', self::trimNs($name)); } $doc->unshiftAnnotation($this->getType(), $this->getName()); }
/** * {@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); } }
/** @test */ public function itShouldGetLongDescription() { $doc = new DocBlock(); $doc->setLongDescription('Long description.'); $this->assertSame('Long description.', $doc->getLongDescription()); }