Skip to content

Commit

Permalink
Add sniff RequireExplicitBooleanOperatorPrecedence (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden authored Feb 5, 2024
1 parent cb1f784 commit 1e472c1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 3.6.0
### Added
- Rule `Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence` to improve legibility of code.

### Changed
- Increase minimum version of `squizlabs/php_codesniffer` package to guarantee `RequireExplicitBooleanOperatorPrecedence` sniff exists.


## 3.5.1
### Changed
- ESLint conflict between `no-mixed-operators` and `no-extra-parens` resolved.
Expand All @@ -14,12 +22,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
renders the warning/error. This way it's easier to ignore if necessary.

### Removed
- Rule `Generic.Formatting.MultipleStatementAlignment`, since this did not help for the readability
- Rule `Generic.Formatting.MultipleStatementAlignment`, since this did not help for the readability
of the code.

## 3.4.0
### Added
- Constraint for `squizlabs/php_codesniffer` to be compatible with
- Constraint for `squizlabs/php_codesniffer` to be compatible with
magento 2.4.4 and higher coding standards.

## 3.3.1 - 2022-05-27
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": "^7.0 || ^8.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
"phpmd/phpmd": "^2.0",
"squizlabs/php_codesniffer": "^3.5.4"
"squizlabs/php_codesniffer": "^3.9.0"
},
"minimum-stability": "stable",
"prefer-stable": true,
Expand Down
1 change: 1 addition & 0 deletions src/GlobalCommon/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
Expand Down

0 comments on commit 1e472c1

Please sign in to comment.