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
switch
should be followed by a space
#7906
Comments
@hirasso thanks for the report. Please use The interesting part is why it's not a part of PSR-2, it's only included in |
Thanks so much for the pointer towards How would I activate it? By just setting it to |
Well, it depends how you want it to work. As for any configurable rule you can use |
Thank you, also for this amazingly quick reaction time ⚡️🙏 |
some context about ruleset: #4435 (comment) probably set could be groomed, but we cannot add all constructs to PSR ruleset. |
Bug report
I just found a minor issue: PHP CS Fixer doesn't insert a space after the
switch
keyword, so this won't be fixed:PHP_CodeSniffer's
phpcbf
fixes the missing space as expected:Description
Following the relevant paragraph in PSR-2,
switch
statements should be treated similarly toif
statements and thus should be followed by a space.Runtime version
Used command
Configuration file
Code snippet that reproduces the problem
The text was updated successfully, but these errors were encountered: