-
Notifications
You must be signed in to change notification settings - Fork 3
Resolve incompatibility between standards #9
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
I'm not sure if we still need to exclude the FirstExpressionLine if multi-line if-statements are formatted following PSR-12 regardless, e.g.
// PSR-12: // Expressions in parentheses MAY be split across multiple lines, where each subsequent line is indented at least once. // When doing so, the first condition MUST be on the next line. if ( $firstExpression || $secondExpression || $thirdExpression ) { // Do something }
But this is not blocking for me.
As per #6, we have to two inherited rulesets in YouweMagento2
, which conflict with each other.
Youwe
pulls inPSR12.ControlStructures.ControlStructureSpacing
Magento2
pulls inPSR2.ControlStructures.ControlStructureSpacing
This pull request removes the PSR-2 rule; the PSR-12 rule is still in this standard.
References:
- https://github.com/YouweGit/coding-standard-magento2/blob/2.1.0/src/YouweMagento2/ruleset.xml#L16 -> https://github.com/YouweGit/coding-standard/blob/3.5.1/src/Youwe/ruleset.xml#L11 -> https://github.com/YouweGit/coding-standard/blob/3.5.1/src/GlobalCommon/ruleset.xml#L16
- https://github.com/YouweGit/coding-standard-magento2/blob/2.1.0/src/YouweMagento2/ruleset.xml#L33 -> https://github.com/magento/magento-coding-standard/blob/v31/Magento2/ruleset.xml#L582
- Upgrade PSR2 -> PSR12 for ControlStructureSpacing magento/magento-coding-standard#416
Uh oh!
There was an error while loading. Please reload this page.
This will fix #6 while we wait for the
Magento2
standard to adopt PSR-12.