You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a phpDoc template (example) is followed by a method without a docblock, then the "Squiz.Commenting.FunctionComment" sniff mistakenly attributes the closing template block to the method and marks it as invalid:
$ phpcs Test.php
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
14 | ERROR | There must be no blank lines after the function comment
| | (Squiz.Commenting.FunctionComment.SpacingAfter)
------------------------------------------------------------------------------------------------
Although this specific rule is implemented using a component from the "Squiz" standard,
Consider the code example:
If a phpDoc template (example) is followed by a method without a docblock, then the "Squiz.Commenting.FunctionComment" sniff mistakenly attributes the closing template block to the method and marks it as invalid:
Although this specific rule is implemented using a component from the "Squiz" standard,
coding-standard/lib/Doctrine/ruleset.xml
Line 436 in 931c039
As per squizlabs/PHP_CodeSniffer#2838 (comment), the "Squiz" standard enforces docblocks and doesn't support docblock templates.
I'm filing the issue here to see if this specific rule can be reimplemented using some Slevomat building blocks which are better composable by design.
The text was updated successfully, but these errors were encountered: