-
-
Notifications
You must be signed in to change notification settings - Fork 78
[Documentation] Squiz: Member Var Spacing #373
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
[Documentation] Squiz: Member Var Spacing #373
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.
Hi @jon, thanks for working on this.
I've reviewed the PR and have the following feedback/questions:
- Interfaces are not allowed to declare properties, so some of the code samples in the docs are invalid. See: https://3v4l.org/mMMk6
- Is there a particular reason to show examples of each OO structure for each rule/standard ?
Would using variation, but not repetitiveness work ? What I mean by that is, for instance, for the first standard have just one OO code sample using an class structure, for the second, one OO code sample with a trait, for the third one OO code sample with an anonymous class. What do you think ? - The second standard, by its nature, includes a code sample for the first rule too. Would combining the first and the second standard be an viable option ? I'm not sure it that would work, but was wondering if you'd considered it/tried it.
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
Indeed! Removed in 34203fa.
I did originally have the standard & examples for the first two error codes combined (which is where the excessive quantity of examples originated from), but decided to split each error code into its own standard. I guess I've been leaning more towards having separate standard/code_comparison blocks for each error code, but with no real justification for doing so. Edit: |
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.
Hi @jonmcp Nearly there as far as I'm concerned. Just some small suggestions in-line to have a look at.
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
src/Standards/Squiz/Docs/WhiteSpace/MemberVarSpacingStandard.xml
Outdated
Show resolved
Hide resolved
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.
@jonmcp Thank you for your patience and for working with me to get this one ready. All good now.
I'm going to rebase the PR and will merge once the build has passed.
…berVarSpacing - Remove invalid structures - Clarify and improve wording (member var => property) - Remove excessive code examples - Clarify and improve wording (comment => DocBlock)
Show both too much and too little whitespace in one example
- Add anonymous class assignment and missing semi-colons
de993ca
to
a248603
Compare
* Docs: add documentation for Squiz.WhiteSpace.MemberVarSpacing * Docs: improve code examples and descriptions for Squiz.WhiteSpace.MemberVarSpacing - Remove invalid structures - Clarify and improve wording (member var => property) - Remove excessive code examples - Clarify and improve wording (comment => DocBlock) * Docs: add more specific wording to Squiz.WhiteSpace.MemberVarSpacing * Docs: update code example for Squiz.WhiteSpace.MemberVarSpacing Show both too much and too little whitespace in one example * Docs: adjust code example for Squiz.WhiteSpace.MemberVarSpacing - Add anonymous class assignment and missing semi-colons
Description
This PR adds documentation for the
Squiz.WhiteSpace.MemberVarSpacing
sniff.Suggested changelog entry
Add documentation for the Squiz Member Var Spacing sniff
Related issues/external references
Part of #148
Types of changes
PR checklist