Skip to content
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

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Aug 12, 2022

Use space/spaces depending on the value of the $spacing property instead of using space(s) in the error message.

Original output:
image

Improved output:
image

…ment

Use `space`/`spaces` depending on the value of the `$spacing` property instead of using `space(s)` in the error message.
@jrfnl jrfnl force-pushed the feature/generic-spreadoperatorspacing-after-msg-improvement branch from 771f60a to 9d087b2 Compare March 2, 2023 04:13
Copy link

@DannyvdSluijs DannyvdSluijs left a 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.

@jrfnl
Copy link
Contributor Author

jrfnl commented Aug 24, 2023

@DannyvdSluijs Nice find. Would you be up for creating PRs to fix this up for those other sniffs ?

@DannyvdSluijs
Copy link

@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.

@DannyvdSluijs
Copy link

Definitely. Will try and see if I can create them today/tomorrow.

#3881 is available as PR.

@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 2, 2023

Closing as replaced by PHPCSStandards/PHP_CodeSniffer#48

@jrfnl jrfnl closed this Dec 2, 2023
@jrfnl jrfnl deleted the feature/generic-spreadoperatorspacing-after-msg-improvement branch December 2, 2023 02:11
@jrfnl
Copy link
Contributor Author

jrfnl commented Dec 8, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready for Release
Development

Successfully merging this pull request may close these issues.

3 participants