From 8a7352b2fcaa9014ccbc35faa97a301c72d6dc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 4 May 2021 14:32:03 +0200 Subject: [PATCH] Enhancement: Configure trailing_comma_in_multiline fixer to add trailing commas for parameters --- CHANGELOG.md | 2 ++ src/RuleSet/Php80.php | 1 + test/Unit/RuleSet/Php80Test.php | 1 + 3 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2efb4a66..87cddab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ For a full diff see [`2.13.1...main`][2.13.1...main]. * Updated `friendsofphp/php-cs-fixer` ([#400]), by [@dependabot] * Configured `trailing_comma_in_multiline` fixer to add trailing commas for arguments in `Php73`, `Php74`, and `Php80` rule sets ([#401]), by [@localheinz] +* Configured `trailing_comma_in_multiline` fixer to add trailing commas for parameters in `Php80` rule set ([#404]), by [@localheinz] ## [`2.13.1`][2.13.1] @@ -397,6 +398,7 @@ For a full diff see [`d899e77...1.0.0`][d899e77...1.0.0]. [#392]: https://github.com/ergebnis/php-cs-fixer-config/pull/392 [#400]: https://github.com/ergebnis/php-cs-fixer-config/pull/400 [#401]: https://github.com/ergebnis/php-cs-fixer-config/pull/401 +[#404]: https://github.com/ergebnis/php-cs-fixer-config/pull/404 [@dependabot]: https://github.com/apps/dependabot [@linuxjuggler]: https://github.com/linuxjuggler diff --git a/src/RuleSet/Php80.php b/src/RuleSet/Php80.php index af2ef460..abcc09dd 100644 --- a/src/RuleSet/Php80.php +++ b/src/RuleSet/Php80.php @@ -1025,6 +1025,7 @@ final class Php80 extends AbstractRuleSet implements ExplicitRuleSet 'elements' => [ 'arguments', 'arrays', + 'parameters', ], ], 'trim_array_spaces' => true, diff --git a/test/Unit/RuleSet/Php80Test.php b/test/Unit/RuleSet/Php80Test.php index f9ac1339..e999dfdc 100644 --- a/test/Unit/RuleSet/Php80Test.php +++ b/test/Unit/RuleSet/Php80Test.php @@ -1031,6 +1031,7 @@ final class Php80Test extends ExplicitRuleSetTestCase 'elements' => [ 'arguments', 'arrays', + 'parameters', ], ], 'trim_array_spaces' => true,