diff --git a/src/Barryvdh/Reflection/DocBlock/Serializer.php b/src/Barryvdh/Reflection/DocBlock/Serializer.php index aabe06ac..46662b80 100644 --- a/src/Barryvdh/Reflection/DocBlock/Serializer.php +++ b/src/Barryvdh/Reflection/DocBlock/Serializer.php @@ -207,7 +207,7 @@ public function getDocComment(DocBlock $docblock) } $text = str_replace("\n", "\n{$indent} * ", $text); - $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n"; + $comment = !empty($text)? "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n" : "{$firstIndent}/**\n"; $tags = array_values($docblock->getTags());