Skip to content

Commit 1e472c1

Browse files
author
Dan Wallis
authored
Add sniff RequireExplicitBooleanOperatorPrecedence (#11)
1 parent cb1f784 commit 1e472c1

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 3.6.0
8+
### Added
9+
- Rule `Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence` to improve legibility of code.
10+
11+
### Changed
12+
- Increase minimum version of `squizlabs/php_codesniffer` package to guarantee `RequireExplicitBooleanOperatorPrecedence` sniff exists.
13+
14+
715
## 3.5.1
816
### Changed
917
- ESLint conflict between `no-mixed-operators` and `no-extra-parens` resolved.
@@ -14,12 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1422
renders the warning/error. This way it's easier to ignore if necessary.
1523

1624
### Removed
17-
- Rule `Generic.Formatting.MultipleStatementAlignment`, since this did not help for the readability
25+
- Rule `Generic.Formatting.MultipleStatementAlignment`, since this did not help for the readability
1826
of the code.
1927

2028
## 3.4.0
2129
### Added
22-
- Constraint for `squizlabs/php_codesniffer` to be compatible with
30+
- Constraint for `squizlabs/php_codesniffer` to be compatible with
2331
magento 2.4.4 and higher coding standards.
2432

2533
## 3.3.1 - 2022-05-27

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"php": "^7.0 || ^8.0",
1414
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
1515
"phpmd/phpmd": "^2.0",
16-
"squizlabs/php_codesniffer": "^3.5.4"
16+
"squizlabs/php_codesniffer": "^3.9.0"
1717
},
1818
"minimum-stability": "stable",
1919
"prefer-stable": true,

src/GlobalCommon/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
3636
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
3737
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
38+
<rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence"/>
3839
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
3940
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
4041
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>

0 commit comments

Comments
 (0)