Skip to content

Commit d103774

Browse files
authored
Correcting an issue where there are two empty lines, first with an extra space, when there is no text to display on the first line. (#29)
1 parent 5a3e22c commit d103774

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Barryvdh/Reflection/DocBlock/Serializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function getDocComment(DocBlock $docblock)
207207
}
208208
$text = str_replace("\n", "\n{$indent} * ", $text);
209209

210-
$comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n";
210+
$comment = !empty($text)? "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n" : "{$firstIndent}/**\n";
211211

212212
$tags = array_values($docblock->getTags());
213213

0 commit comments

Comments
 (0)