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

Symfony.ControlStructure.YodaConditions.Invalid not working with static class variables #188

Open
Khartir opened this issue Feb 22, 2021 · 2 comments

Comments

@Khartir
Copy link
Contributor

Khartir commented Feb 22, 2021

Code like the following breaks the sniff, reporting an error either way:

if (foo::$bar === bar::$foo) {

}
@Khartir
Copy link
Contributor Author

Khartir commented Mar 2, 2021

As a workaroung, I'm using https://github.com/slevomat/coding-standard#slevomatcodingstandardcontrolstructuresdisallowyodacomparisonrequireyodacomparison- which can handle this and also brings an auto-fixer.

@mmoll
Copy link
Contributor

mmoll commented Mar 24, 2021

GH-183 would implicitly fix this.

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

No branches or pull requests

2 participants