-
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.Functions.FunctionDeclarationArgumentSpacing bug when no space between type hint and argument #900
Comments
Actually, it reports it, but fixes it incorrectly:
Result: I made sure to run it with This is most likely the reason there is an exclude in PSR2: |
…ug when no space between type hint and argument
There were a couple of bugs in there, and PSR2 shouldn't have been reporting any errors with this sniff. With the fix, this code now produces the following errors for the Squiz standard:
and the diff for the fixes is this:
Thanks for reporting this. |
👍 |
This does only recognize the 2nd and 3rd:
in
The
array$a
should be detected and fixed toarray $a
.I assume it has to do with the beginning of the argument list.
The text is also a bit misleading, should maybe say "between typehint and argument". Or let the other rule take care of it, that does correctly use this terminology.
The text was updated successfully, but these errors were encountered: