diff --git a/CHANGELOG.md b/CHANGELOG.md index e02c3fd..454d89b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ # Changelog All notable changes to this project will be documented in this file. -## 1.2.4 - TBA +## 1.3.0 - TBA ### Changed * `trailing_comma_in_multiline`: Add a trailing comma to multline function parameters * `MultilinePromotedPropertiesFixer`: Break promoted properties on multiple lines +* `ErickSkrauch/blank_line_before_return`: Add a blank line before each return +* `ErickSkrauch/line_break_after_statements`: Add a blank line after all control statements ## 1.2.3 - 2024-08-23 ### Changed diff --git a/composer.json b/composer.json index f0e2091..f8ac7ca 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,8 @@ "require": { "php": "^7.3|^8.0", "php-cs-fixer/shim": "^3.17", - "kubawerlos/php-cs-fixer-custom-fixers": "^3.22" + "kubawerlos/php-cs-fixer-custom-fixers": "^3.22", + "erickskrauch/php-cs-fixer-custom-fixers": "^1.3" }, "license": "MIT", "authors": [ diff --git a/src/Config.php b/src/Config.php index f4db60b..6895b89 100644 --- a/src/Config.php +++ b/src/Config.php @@ -12,6 +12,7 @@ public function __construct($name = 'default') { parent::__construct($name); $this->setIndent("\t"); $this->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers()); + $this->registerCustomFixers(new \ErickSkrauch\PhpCsFixer\Fixers()); } public function getRules() : array { @@ -76,6 +77,8 @@ public function getRules() : array { ], 'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false], PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true, + 'ErickSkrauch/blank_line_before_return' => true, + 'ErickSkrauch/line_break_after_statements' => true, ]; } }