-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Docs/WordPress.WhiteSpace.OperatorSpacing #1727
Docs/WordPress.WhiteSpace.OperatorSpacing #1727
Conversation
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.
@ckanitz Hi Christopher, mostly looking very good.
The docs are just missing the <em> ...</em>
tags to highlight good/bad code, but we weren't that clear about that in the initial explanation, so sorry about that!.
Other than that one more point:
It is customary to have a Valid | Invalid
code comparison.
The code comparisons you are doing here are Valid | Valid
/ Invalid | Invalid
.
Just thinking out loud: you could possibly combine the two "invalid" examples into one with an inline comment to separate them // Too little space
, // Too much space
and place that one to go with the first Valid
example.
For the second Valid
example, the same code sample as for the Valid
case can be used with some superfluous whitespace after the &&
on the second line.
What do you think ?
Sounds good to me! I applied the changes as suggested. |
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.
@ckanitz Hi Christopher, thank you for making those changes!
Nearly there. I've had a second look and saw some things I missed the first time around. Sorry about that.
Nothing major though, just some small tweaks to finish it off.
I look forward to being able to merge this soon.
@ckanitz Just wondering if you'll have a chance to finish this off in the near future. If you haven't got time or lost interest, please let us know and we'll see if we can find someone to take over. |
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
Co-Authored-By: Juliette <[email protected]>
* Be more explicit about which operators are covered by the sniff and what is expected. * Add a code sample showing that for assignment operators, only the space after the operator is checked (as the space before is determined by alignment).
I've rebased the PR and added one commit to make the last fixes needed. Let's get this merged! For whomever will merge this: probably squash/merge would be a good idea. |
Adds documentation for the WordPress.WhiteSpace.OperatorSpacing
Related to #1722