From a7f8b208394e54f0b257f9225288b295d76b9fb8 Mon Sep 17 00:00:00 2001 From: Benedikt Franke Date: Wed, 14 Jun 2023 11:06:35 +0200 Subject: [PATCH] Enforce non-Yoda style --- CHANGELOG.md | 6 ++++++ config.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a946f39..631e752 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/config.php b/config.php index 2c0158d..464f767 100644 --- a/config.php +++ b/config.php @@ -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