diff --git a/ecs.php b/ecs.php index 9bd0d4b..221db1e 100644 --- a/ecs.php +++ b/ecs.php @@ -78,6 +78,7 @@ use PhpCsFixer\Fixer\Operator\IncrementStyleFixer; use PhpCsFixer\Fixer\Operator\NewWithBracesFixer; use PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer; +use PhpCsFixer\Fixer\Operator\OperatorLinebreakFixer; use PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer; use PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer; use PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer; @@ -328,6 +329,11 @@ $services->set(UnaryOperatorSpacesFixer::class); + $services + ->set(OperatorLinebreakFixer::class) + ->call('configure', [['only_booleans' => true, 'position' => 'end']]) + ; + $services->set(NoBlankLinesAfterPhpdocFixer::class); $services->set(NoEmptyPhpdocFixer::class); diff --git a/tests/FooBar.php b/tests/FooBar.php index 16b5a2e..803878b 100644 --- a/tests/FooBar.php +++ b/tests/FooBar.php @@ -23,4 +23,12 @@ public function setBar(string $bar): self return $this; } + + public function isBaz(): bool + { + return + str_contains($this->foo, 'baz') && + str_contains($this->bar, 'baz') + ; + } }