Closed tvdijen closed 10 months ago
@tvdijen Eh... that's because that is not valid PHP.... ? https://3v4l.org/KeO3Z
Sorry, but sniffs should not have to deal with fantasy code which isn't supported by PHP itself.
You are right, I don't know what I was thinking.
Describe the bug
PSR2.Classes.PropertyDeclaration.Multiple throws false positives when the default value is a variable.
Code sample
PHPCS output here
Expected behavior
I expect the test to pass. Instead the following error is displayed: There must not be more than one property declared per statement (PSR2.Classes.PropertyDeclaration.Multiple)
Versions (please complete the following information)
Additional context
Add any other context about the problem here.
Please confirm:
master
branch of PHP_CodeSniffer.