From 7c261d7d1fa815230d61a50145a07e986e29db03 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sat, 16 Sep 2017 15:00:50 -0400 Subject: [PATCH] Add return after every special type --- src/Psalm/Checker/CommentChecker.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Psalm/Checker/CommentChecker.php b/src/Psalm/Checker/CommentChecker.php index d4e572afd..363adf786 100644 --- a/src/Psalm/Checker/CommentChecker.php +++ b/src/Psalm/Checker/CommentChecker.php @@ -520,10 +520,16 @@ class CommentChecker /** @var int */ $special_type_width = max($special_type_lengths) + 1; + $special_types = count($parsed_doc_comment['specials']); + foreach ($parsed_doc_comment['specials'] as $type => $lines) { foreach ($lines as $line) { $doc_comment_text .= $left_padding . ' * @' . str_pad($type, $special_type_width) . $line . PHP_EOL; } + + if ($special_types-- > 1) { + $doc_comment_text .= $left_padding . ' *'. PHP_EOL; + } } }