mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Ensure comment lines are terminated with a new line character (\n).
This commit is contained in:
parent
f378ef1cab
commit
c362dd5af7
@ -332,6 +332,9 @@ class CommentAnalyzer
|
||||
if ($char === '/' && $next_char === '/') {
|
||||
// Ignore the rest of the current line
|
||||
$i = strpos($return_block, "\n", $i);
|
||||
if ($i === false) {
|
||||
Throw new IncorrectDocblockException('Comment lines must be terminated with a new line character (\\n).');
|
||||
}
|
||||
|
||||
// Remove trailing whitespaces (needed for `sanitizeDocblockType`)
|
||||
$type = rtrim($type);
|
||||
|
Loading…
Reference in New Issue
Block a user