do not set description if empty

This commit is contained in:
David Buchmann 2017-12-19 08:52:36 +01:00
parent 3fa948aee8
commit 373516387f

View File

@ -52,7 +52,7 @@ class PhpdocPropertyAnnotationReader
if (!$title = $docBlock->getSummary()) {
/** @var Var_ $var */
foreach ($docBlock->getTagsByName('var') as $var) {
if (null === $description = $var->getDescription()) continue;
if (!$description = $var->getDescription()) continue;
$title = $description->render();
if ($title) break;
}
@ -60,7 +60,7 @@ class PhpdocPropertyAnnotationReader
if ($property->getTitle() === null && $title) {
$property->setTitle($title);
}
if ($property->getDescription() === null && $docBlock->getDescription()) {
if ($property->getDescription() === null && $docBlock->getDescription() && $docBlock->getDescription()->render()) {
$property->setDescription($docBlock->getDescription()->render());
}
if ($property->getType() === null) {