Skip to content
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

Generic/FunctionCallArgumentSpacing: remove assignment operator spacing checks #2399

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Feb 5, 2019

As discussed in #2387, there are dedicated sniffs for checking the spacing around assignment operators:

  • PSR12.Operators.OperatorSpacing
  • Squiz.WhiteSpace.OperatorSpacing

Both of these are more comprehensive and more appropriate to use than the limited assignment operator spacing check in this sniff.

Removing the assignment operator spacing checks from this sniff, lowers the risk of fixer conflicts regarding operator spacing and gets rid of duplicate notices in the PSR12 and Squiz standard and inappropriate notices for the PEAR, PSR2 and Zend standard.

Includes adjusted unit tests.

…ng checks

As discussed in 2387, there are dedicated sniffs for checking the spacing around assignment operators:
* `PSR12.Operators.OperatorSpacing`
* `Squiz.WhiteSpace.OperatorSpacing`

Both of these are more comprehensive and more appropriate to use than the limited assignment operator spacing check in this sniff.

Removing the assignment operator spacing checks from this sniff, lowers the risk of fixer conflicts regarding operator spacing and gets rid of duplicate notices in the `PSR12` and `Squiz` standard and inappropriate notices for the `PEAR`, `PSR2` and `Zend` standard.

Includes adjusted unit tests.
@sertand
Copy link
Member

sertand commented May 23, 2019

Thanks for the patch.

@gsherwood
Copy link
Member

An unintended benefit of this change was that the PEAR, PSR2, and PSR12 standard are no longer checking assignment operators inside function calls. They should never have been doing this, but the Squiz standard was, and so they inherited it.

@jrfnl jrfnl deleted the feature/generic-functioncallargumentspacing-remove-equal-sign-checks branch May 23, 2019 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants