mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-10 03:29:25 +03:00
do not set description if empty
This commit is contained in:
parent
3fa948aee8
commit
373516387f
@ -52,7 +52,7 @@ class PhpdocPropertyAnnotationReader
|
|||||||
if (!$title = $docBlock->getSummary()) {
|
if (!$title = $docBlock->getSummary()) {
|
||||||
/** @var Var_ $var */
|
/** @var Var_ $var */
|
||||||
foreach ($docBlock->getTagsByName('var') as $var) {
|
foreach ($docBlock->getTagsByName('var') as $var) {
|
||||||
if (null === $description = $var->getDescription()) continue;
|
if (!$description = $var->getDescription()) continue;
|
||||||
$title = $description->render();
|
$title = $description->render();
|
||||||
if ($title) break;
|
if ($title) break;
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ class PhpdocPropertyAnnotationReader
|
|||||||
if ($property->getTitle() === null && $title) {
|
if ($property->getTitle() === null && $title) {
|
||||||
$property->setTitle($title);
|
$property->setTitle($title);
|
||||||
}
|
}
|
||||||
if ($property->getDescription() === null && $docBlock->getDescription()) {
|
if ($property->getDescription() === null && $docBlock->getDescription() && $docBlock->getDescription()->render()) {
|
||||||
$property->setDescription($docBlock->getDescription()->render());
|
$property->setDescription($docBlock->getDescription()->render());
|
||||||
}
|
}
|
||||||
if ($property->getType() === null) {
|
if ($property->getType() === null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user