-
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
Avoid incompatibility between Generic
and PSR2
standards for function call indentation
#3631
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
Yes, see #2078 (comment).
I've been working on this, and it's difficult. I expect to update the pull request with this soon.
I agree. Can you suggest a viable alternative in this case? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Generic
and PSR2
standards for function call indentation
635cd00
to
33a4d33
Compare
@jrfnl I've revisited this and written something completely different to the first attempt. I don't seem to be able to request your review via the GitHub web interface. Please can you take a look at this and let me know what you think.
|
1a2e643
to
507294a
Compare
507294a
to
b94ac08
Compare
Superseded by PHPCSStandards/PHP_CodeSniffer#38 |
Generic.WhiteSpace.ScopeIndent
andPSR2.Methods.FunctionCallSignature
both try to fix indentation differently. This results in files not being able to be fixed automatically withphpcbf
.See #2078 (comment) where @gsherwood says that
Generic.WhiteSpace.ScopeIndent
should win in these cases.This pull request fixes #2078
by eliminating the incompatibility when both sniffs are being run. When.Generic.WhiteSpace.ScopeIndent
is not active, thenPSR2.Methods.FunctionCallSignature
will continue to work as normal. WhenGeneric.WhiteSpace.ScopeIndent
is active, then this particular code-path will be ignored/skipped