diff --git a/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php b/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php index 3c7115a..6b94a32 100644 --- a/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php +++ b/src/PedroTroller/CS/Fixer/CodingStyle/LineBreakBetweenMethodArgumentsFixer.php @@ -8,6 +8,7 @@ use PedroTroller\CS\Fixer\Priority; use PhpCsFixer\Fixer\Basic\BracesFixer; use PhpCsFixer\Fixer\ConfigurableFixerInterface; +use PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer; use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface; use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver; use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface; @@ -22,7 +23,10 @@ final class LineBreakBetweenMethodArgumentsFixer extends AbstractFixer implement public function getPriority(): int { - return Priority::after(BracesFixer::class); + return min( + Priority::after(BracesFixer::class), + Priority::after(MethodArgumentSpaceFixer::class), + ); } public function getSampleConfigurations(): array diff --git a/tests/Orchestra.php b/tests/Orchestra.php index 0501f4a..18678cf 100644 --- a/tests/Orchestra.php +++ b/tests/Orchestra.php @@ -5,10 +5,13 @@ namespace tests; use PedroTroller\CS\Fixer\ClassNotation\OrderedWithGetterAndSetterFirstFixer; +use PedroTroller\CS\Fixer\CodingStyle\LineBreakBetweenMethodArgumentsFixer; use PedroTroller\CS\Fixer\DoctrineMigrationsFixer; +use PhpCsFixer\Fixer\Basic\BracesFixer; use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer; use PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer; use PhpCsFixer\Fixer\FixerInterface; +use PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer; use PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer; use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer; use PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer; @@ -41,6 +44,11 @@ public static function run(): void ->before(new NoWhitespaceInBlankLineFixer()) ; + self::assert(new LineBreakBetweenMethodArgumentsFixer) + ->after(new BracesFixer()) + ->after(new MethodArgumentSpaceFixer()) + ; + echo "\n"; }