diff --git a/composer.json b/composer.json index 7e825f1..f0e2091 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,8 @@ "type": "library", "require": { "php": "^7.3|^8.0", - "php-cs-fixer/shim": "^3.17" + "php-cs-fixer/shim": "^3.17", + "kubawerlos/php-cs-fixer-custom-fixers": "^3.22" }, "license": "MIT", "authors": [ diff --git a/src/Config.php b/src/Config.php index 73b9baf..b41ba3a 100644 --- a/src/Config.php +++ b/src/Config.php @@ -10,6 +10,7 @@ class Config extends Base { public function __construct($name = 'default') { parent::__construct($name); $this->setIndent("\t"); + $this->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers()); } public function getRules() : array { @@ -72,6 +73,7 @@ public function getRules() : array { 'elements' => ['property', 'method', 'const'] ], 'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false], + PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true, ]; } }