PHP 8.0 | Squiz.WhiteSpace.MemberVarSpacing: add support for attributes#3334
Closed
mandarinian wants to merge 1 commit intosquizlabs:masterfrom
mandarinian:master
Closed
PHP 8.0 | Squiz.WhiteSpace.MemberVarSpacing: add support for attributes#3334mandarinian wants to merge 1 commit intosquizlabs:masterfrom mandarinian:master
mandarinian wants to merge 1 commit intosquizlabs:masterfrom
mandarinian:master
Conversation
jrfnl
reviewed
May 6, 2021
|
|
||
|
|
||
| private $var3 = 'value'; | ||
| } |
Contributor
There was a problem hiding this comment.
Just some suggestions:
- What about a test case where the attribute is before the docblock ?
- What about a test case with one attribute on the same line as the property ?
- What about a test case with two attributes on the same line as the property ?
Would be good to verify that the sniff will handle those cases correctly as well.
Author
There was a problem hiding this comment.
Despite there is no PSR for Attributes for now, I suggest to always keep phpDoc before attributes.
Contributor
|
For visibility: there's a discussion open about this PR here: #3419 |
Contributor
|
FYI: PR #3440 tries to address the same issue, but without changing the base behaviour of the sniff. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.