From 373516387faf0492cea86df41231b40a5da4f825 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Tue, 19 Dec 2017 08:52:36 +0100 Subject: [PATCH] do not set description if empty --- ModelDescriber/PhpdocPropertyAnnotationReader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ModelDescriber/PhpdocPropertyAnnotationReader.php b/ModelDescriber/PhpdocPropertyAnnotationReader.php index 9c5bebc..9b97423 100644 --- a/ModelDescriber/PhpdocPropertyAnnotationReader.php +++ b/ModelDescriber/PhpdocPropertyAnnotationReader.php @@ -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) {