Skip to content

Commit deade75

Browse files
committed
Clean up empty PHPDocs
1 parent 6d84e16 commit deade75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extractor/extract.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,11 @@ private function compareFunctions(Node\FunctionLike $old, Node\FunctionLike $new
491491

492492
return !$child->value instanceof ReturnTagValueNode;
493493
})));
494-
$new->setDocComment(new Comment\Doc((string) $newPhpDocNodeWithoutReturn));
494+
if (count($newPhpDocNodeWithoutReturn->children) === 0) {
495+
$new->setAttribute('comments', []);
496+
} else {
497+
$new->setDocComment(new Comment\Doc((string) $newPhpDocNodeWithoutReturn));
498+
}
495499
}
496500
}
497501
}

0 commit comments

Comments
 (0)