slevomat / coding-standard

Slevomat Coding Standard for PHP_CodeSniffer provides many useful sniffs
MIT License
1.39k stars 171 forks source link

issue: DocCommentSpacingSniff - same line #1666

Open michalbundyra opened 7 months ago

michalbundyra commented 7 months ago

When we have two PHPDocs in a single line we are getting an error:

| ERROR | [x] Expected 1 line between annotations groups, found -1. (SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectLinesCountBetweenAnnotationsGroups)

but it is not possible to fix it automatically.

And I am not sure how to fix in in the code atm, so just providing the failing example... Thanks!

kukulich commented 6 months ago

The main problem is that PHPCS itself cannot parse the tags on same line - PHPCS things it is only one tag with description self::method() @link https://example.com. Please report the bug to PHPCS first.