-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generic/SpreadOperatorSpacingAfter: minor message readability improvement #3647
Generic/SpreadOperatorSpacingAfter: minor message readability improvement #3647
Conversation
…ment Use `space`/`spaces` depending on the value of the `$spacing` property instead of using `space(s)` in the error message.
771f60a
to
9d087b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm.
During my check I did find usages of the space(s)
message in other sniffs (DocCommentAlignmentSniff
, SpaceAfterCastSniff
, SpaceAfterNotSniff
, ArrayDeclarationSniff
, ControlSignatureSniff
) but seeing the title of this PR is all about the SpreadOperatorSpacingAfterSniff
so should be fine to not involve the other sniffs.
@DannyvdSluijs Nice find. Would you be up for creating PRs to fix this up for those other sniffs ? |
Definitely. Will try and see if I can create them today/tomorrow. |
#3881 is available as PR. |
Closing as replaced by PHPCSStandards/PHP_CodeSniffer#48 |
FYI: this fix is included in today's PHP_CodeSniffer 3.8.0 release. As per #3932, development on PHP_CodeSniffer will continue in the PHPCSStandards/PHP_CodeSniffer repository. If you want to stay informed, you may want to start "watching" that repo (or watching releases from that repo). |
Use
space
/spaces
depending on the value of the$spacing
property instead of usingspace(s)
in the error message.Original output:
Improved output: