-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add more trailing commas in more places #9395
chore: add more trailing commas in more places #9395
Conversation
I think it degrades readability in the parameters. The trailing comma indicates that the list of properties are not finished. |
I think the reasoning behind all these extra commas is the same reasoning behind arrays: it makes diffs cleaner if you will ever insert a new item. |
I'm not sure - adding more parameters doesn't happen often... The cases where we add commas to exceptions are good examples where it looks awkward. So, IDK - but that may just be my habit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems it only apply on multi lines 👍 , looks good for me
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will learn to live with it, eventually 😅
1562d04
to
d9fae2d
Compare
Description
Done thru the
trailing_comma_in_multiline
fixer.PHP allows trailing commas in other places aside from multiline arrays:
This PR is a no-brainer. I add the element, run
cs-fix
, and do nothing else.I am doing the changes per commit as GitHub hangs on the overall diff.
Checklist: