Skip to content

Commit 780f2e0

Browse files
authored
Merge pull request #6482 from paulbalandan/no-trailing-comma-in-single-line
Enable `no_trailing_comma_in_singleline`
2 parents 3be80cb + 7a32c6d commit 780f2e0

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

.php-cs-fixer.dist.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,16 @@
5050
],
5151
'control_structure_braces' => true,
5252
'no_multiple_statements_per_line' => true,
53-
'no_useless_nullsafe_operator' => true,
54-
'phpdoc_separation' => [
53+
'no_trailing_comma_in_singleline' => [
54+
'elements' => [
55+
'arguments',
56+
'array_destructuring',
57+
'array',
58+
'group_import',
59+
],
60+
],
61+
'no_useless_nullsafe_operator' => true,
62+
'phpdoc_separation' => [
5563
'groups' => [
5664
['immutable', 'psalm-immutable'],
5765
['param', 'phpstan-param', 'psalm-param'],

.php-cs-fixer.no-header.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,16 @@
4242
],
4343
'control_structure_braces' => true,
4444
'no_multiple_statements_per_line' => true,
45-
'no_useless_nullsafe_operator' => true,
46-
'phpdoc_separation' => [
45+
'no_trailing_comma_in_singleline' => [
46+
'elements' => [
47+
'arguments',
48+
'array_destructuring',
49+
'array',
50+
'group_import',
51+
],
52+
],
53+
'no_useless_nullsafe_operator' => true,
54+
'phpdoc_separation' => [
4755
'groups' => [
4856
['immutable', 'psalm-immutable'],
4957
['param', 'phpstan-param', 'psalm-param'],

.php-cs-fixer.user-guide.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,16 @@
4444
],
4545
'control_structure_braces' => true,
4646
'no_multiple_statements_per_line' => true,
47-
'no_useless_nullsafe_operator' => true,
48-
'phpdoc_separation' => [
47+
'no_trailing_comma_in_singleline' => [
48+
'elements' => [
49+
'arguments',
50+
'array_destructuring',
51+
'array',
52+
'group_import',
53+
],
54+
],
55+
'no_useless_nullsafe_operator' => true,
56+
'phpdoc_separation' => [
4957
'groups' => [
5058
['immutable', 'psalm-immutable'],
5159
['param', 'phpstan-param', 'psalm-param'],
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
$db->callFunction('some_function', $param1, $param2, /* ... */);
3+
$db->callFunction('some_function', $param1, $param2 /* , ... */);

0 commit comments

Comments
 (0)