-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Squiz/DisallowMultipleAssignments: fix ignoring of property declarations #2788
Squiz/DisallowMultipleAssignments: fix ignoring of property declarations #2788
Conversation
The `Squiz.PHP.DisallowMultipleAssignments` intended to ignore property declarations, but did not allow for typed properties. I've now moved the "is this a property ?" check up to bow out earlier for all properties. Includes unit test. I've also added tests for multi-property declarations. While it is debatable whether or not this sniff should report on these, the existing behaviour was to ignore them. This behaviour has been maintained and is now documented and safeguarded via the test. Fixes 2787
Any ideas when we'll see this merged in/released? |
Bump. I could use this as well. |
@gsherwood Could this PR please be milestoned for |
I'm running into this one too. Would be great if this could make it into |
Thanks for this fix. |
You're welcome ;-) |
Thanks @jrfnl! @gsherwood, do you have an eta for the release of |
I did, but then I had to begin working from home (along with the rest of the company) and now I'm swamped with work again. So I'm no longer sure. |
The
Squiz.PHP.DisallowMultipleAssignments
intended to ignore property declarations, but did not allow for PHP 7.4 typed properties.I've now moved the "is this a property ?" check up to bow out earlier for all properties.
Includes unit test.
I've also added tests for multi-property declarations. While it is debatable whether or not this sniff should report on these, the existing behaviour was to ignore them. This behaviour has been maintained and is now documented and safeguarded via the test.
Fixes #2787