squizlabs / PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
BSD 3-Clause "New" or "Revised" License
10.66k stars 1.48k forks source link

Generic/SpreadOperatorSpacingAfter: minor message readability improvement #3647

Closed jrfnl closed 9 months ago

jrfnl commented 2 years ago

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

jrfnl commented 1 year ago

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

DannyvdSluijs commented 1 year ago

@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 commented 1 year ago

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

3881 is available as PR.

jrfnl commented 9 months ago

Closing as replaced by https://github.com/PHPCSStandards/PHP_CodeSniffer/pull/48

jrfnl commented 9 months ago

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