You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we only enforce trailing commas in parameters, this is great to make git diff cleaner when adding new parameters.
But the same also applies to the function call, arrays and match in general.
So how about changing it to 'trailing_comma_in_multiline' => ['elements' => ['arguments', 'arrays', 'match', 'parameters']].
Hesitant 👍. Some people do this consistently already. For the rest cs fixer will complain more often, but I guess it's something people can get used to.
I think it makes sense to adjust our config for trailing_comma_in_multiline.
Currently we only enforce trailing commas in parameters, this is great to make git diff cleaner when adding new parameters.
But the same also applies to the function call, arrays and
match
in general.So how about changing it to
'trailing_comma_in_multiline' => ['elements' => ['arguments', 'arrays', 'match', 'parameters']]
.Caused code changes
Reason
This would allow all those cases to benefit from smaller diff on new array members / arguments.
Before:
After:
$arr = [ 1, 2, + 3, ];
The text was updated successfully, but these errors were encountered: