format/arrays/no-trailing-comma-single-line
In the format-laravel preset. Safe fix.
What it does
If a list of values separated by a comma is contained on a single line, then the last item MUST NOT have a trailing comma.
Configuration
[format.rules]
"arrays/no-trailing-comma-single-line" = true
To skip it in some files, add a @pun-ignore-file comment.
Options
| Name | Type | Allowed values | Default | Upstream name |
|---|---|---|---|---|
elements |
list |
arguments, array, array-destructuring, group-import |
["arguments", "array", "array-destructuring", "group-import"] |
elements |
Replaces
no_trailing_comma_in_singleline(php-cs-fixer)