You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looks like a similar issue to #368 which was fixed by #369 and #379, which were included in the 3.9.1 release.
I've checked and the fixes in the 3.9.1 release are not directly related to this issue. This issue can be reproduced both with PHPCS 3.9.0 as well as master.
The problem is largely that as soon as something is excluded from that sniff, the sniff is broken. This is a design flaw in the sniff.
I've been building up a (highly configurable) NormalizedArrays standard in PHPCSExtra to replace it, but that's not complete yet. Would be lovely if I could find some time to finish that at some point.
With that in mind, I will not be working on this issue.
If someone would submit a PR with a small/simple fix for this issue, I will accept it, but other than that, this sniff is out of bounds for large fixes/rewrites as it is just not worth the time.
Describe the bug
Squiz.Arrays.ArrayDeclaration.ValueNoNewline
triggers false positive atstatic fn
.Code sample
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php ...
Expected behavior
No error
Versions (please complete the following information)
Additional context
Add any other context about the problem here.
Please confirm
master
branch of PHP_CodeSniffer.The text was updated successfully, but these errors were encountered: