Skip to content

Commit

Permalink
Fix for spaces after , in multiline docblock types
Browse files Browse the repository at this point in the history
  • Loading branch information
robchett committed Oct 26, 2023
1 parent f401153 commit 9de8b4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/CommentAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private static function decorateVarDocblockComment(
public static function sanitizeDocblockType(string $docblock_type): string
{
$docblock_type = (string) preg_replace('@^[ \t]*\*@m', '', $docblock_type);
$docblock_type = (string) preg_replace('/,\n\s+}/', '}', $docblock_type);
$docblock_type = (string) preg_replace('/,[\n\s]+}/', '}', $docblock_type);
$docblock_type = (string) preg_replace('/[ \t]+/', ' ', $docblock_type);

return trim(str_replace("\n", '', $docblock_type));
Expand Down

0 comments on commit 9de8b4f

Please sign in to comment.