1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Don’t add unnecessary space between paras

This commit is contained in:
Matt Brown 2018-01-29 13:42:04 -05:00
parent 4099bf24ce
commit 8ad863614c
2 changed files with 9 additions and 1 deletions

View File

@ -561,7 +561,7 @@ class CommentChecker
$description_lines = explode(PHP_EOL, $parsed_doc_comment['description']);
foreach ($description_lines as $line) {
$doc_comment_text .= $left_padding . ' * ' . $line . PHP_EOL;
$doc_comment_text .= $left_padding . ' *' . (trim($line) ? ' ' . $line : '') . PHP_EOL;
}
}

View File

@ -709,6 +709,10 @@ class FileManipulationTest extends TestCase
'preserveFormat' => [
'<?php
/**
* Here is a paragraph
*
* And another one
*
* @other is
* a friend of mine
* + Members
@ -720,6 +724,10 @@ class FileManipulationTest extends TestCase
}',
'<?php
/**
* Here is a paragraph
*
* And another one
*
* @other is
* a friend of mine
* + Members