Skip to content
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

PHP 8.0 | Squiz.WhiteSpace.MemberVarSpacing: add support for attributes #3334

Closed
wants to merge 1 commit into from

Conversation

yariknechyporuk
Copy link

No description provided.



private $var3 = 'value';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Despite there is no PSR for Attributes for now, I suggest to always keep phpDoc before attributes.

@jrfnl
Copy link
Contributor

jrfnl commented Aug 31, 2021

For visibility: there's a discussion open about this PR here: #3419

@jrfnl
Copy link
Contributor

jrfnl commented Oct 10, 2021

FYI: PR #3440 tries to address the same issue, but without changing the base behaviour of the sniff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants