/** * @param DocblockInterface $model * @return void */ protected function buildDocblock(DocblockInterface $model) { $this->ensureBlankLine(); if ($this->config->getGenerateDocblock()) { $model->generateDocblock(); } $docblock = $model->getDocblock(); if (!$docblock->isEmpty() || $this->config->getGenerateEmptyDocblock()) { $this->writer->writeln($docblock->toString()); } }
public function testGetUnindentedDocComment() { $writer = new Writer(); $comment = $writer->writeln('/**')->indent()->writeln(' * Foo.')->write(' */')->getContent(); $this->assertEquals("/**\n * Foo.\n */", ReflectionUtils::getUnindentedDocComment($comment)); }