Skip to content

Commit

Permalink
Enforce non-Yoda style
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Jun 14, 2023
1 parent a87809f commit a7f8b20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ You can find and compare releases at the [GitHub release page](https://github.co

## Unreleased

## v5.3.0

### Changed

- Enforce non-Yoda style

## v5.2.0

### Changed
Expand Down
5 changes: 5 additions & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ function config(Finder $finder, array $ruleOverrides = []): Config
'phpdoc_order' => true,
'phpdoc_to_comment' => false, // Intermediary PHPDocs are sometimes useful to provide type assertions for PHPStan
'single_line_throw' => false,
'yoda_style' => [ // Not necessary with static analysis, non-Yoda is more natural to write and read
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],

ConstructorEmptyBracesFixer::name() => true,
DeclareAfterOpeningTagFixer::name() => true, // Use native rule when added with https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/2062
Expand Down

0 comments on commit a7f8b20

Please sign in to comment.