Skip to content

Commit 49db311

Browse files
authored
Merge pull request #19 from shirshir/trailing-comma-changes
Change trailing_comma fixer, the Symfony ruleset adjusted their configuration
2 parents f09addf + 336133b commit 49db311

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.github/workflows/php-cs-fixer.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
strategy:
1414
matrix:
1515
php-version:
16-
- "7.4"
1716
- "8.0"
1817
- "8.1"
1918
- "8.2"

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
return (new Config())
1717
->setFinder($finder)
1818
->setRiskyAllowed(true)
19-
->setRules(Rules::getForPhp71($overrides));
19+
->setRules(Rules::getForPhp83($overrides));

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^7.1.3 || ^8.0",
14-
"friendsofphp/php-cs-fixer": "^3.40"
14+
"friendsofphp/php-cs-fixer": "^3.64"
1515
},
1616
"minimum-stability": "stable",
1717
"autoload": {

src/PhpCsFixer/Rules.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Mollie\PhpCodingStandards\PhpCsFixer;
66

77
/*
8-
* Last updated for php-cs-fixer version: 3.40.2
8+
* Last updated for php-cs-fixer version: 3.64.0
99
*/
1010
class Rules
1111
{
@@ -226,6 +226,16 @@ private static function getBaseRules(): array
226226
'identical' => false,
227227
'less_and_greater' => false,
228228
],
229+
'trailing_comma_in_multiline' => [
230+
'after_heredoc' => true,
231+
'elements' => [
232+
'arguments',
233+
'array_destructuring',
234+
'arrays',
235+
'match',
236+
'parameters',
237+
],
238+
],
229239
];
230240
}
231241
}

0 commit comments

Comments
 (0)