Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Most of the errors in coding standards in coder were
Squiz.Operators.ComparisonOperatorUsage.ImplicitTrue and Squiz.Operators.ComparisonOperatorUsage.NotAllowed
I am going to attempt to fix all of these in this issue.
Comment | File | Size | Author |
---|---|---|---|
#3 | interdiff-2742801-2-3.txt | 1.73 KB | anoopjohn |
#3 | coder-fix-coding-standards-implicit-comparison-operator-2742801-3.patch | 39.9 KB | anoopjohn |
Comments
Comment #2
anoopjohn CreditAttribution: anoopjohn at Zyxware Technologies commentedPlease find attached a patch to fix the issues.
Please note that the patch in #2742795: Wrong VariableAnalysis settings type in ruleset.xml should go in before this patch to be able to use phpunit to test the changes.
Comment #3
anoopjohn CreditAttribution: anoopjohn at Zyxware Technologies commentedPlease find an updated patch that includes a couple of Squiz sniff errors around the same lines. This was done to prevent conflicts with the patch that fixes the Squiz related errors.
Comment #4
klausiTests are failing with this patch. Looks like you modified the logic in VariableAnalysisSniff somewhere? This should only be a coding standards fix, not more.
Comment #5
anoopjohn CreditAttribution: anoopjohn at Zyxware Technologies commentedThanks for the review klausi. There was no logic changes but there were a lot of code changes. The fact that phpunit is not failing is what I have used to ensure that I was not inadvertently making logic changes.
The patch is failing because this depends on #2742795: Wrong VariableAnalysis settings type in ruleset.xml. Can you please apply that and test again. I have modified the patch in that issue based on your feedback.
Comment #7
klausiCommitted, thanks!