chore: add more trailing commas in more places#9395
chore: add more trailing commas in more places#9395paulbalandan merged 4 commits intocodeigniter4:developfrom
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. |
samsonasik
left a comment
There was a problem hiding this comment.
it seems it only apply on multi lines 👍 , looks good for me
This comment was marked as resolved.
This comment was marked as resolved.
michalsn
left a comment
There was a problem hiding this comment.
I will learn to live with it, eventually 😅
1562d04 to
d9fae2d
Compare
Description
Done thru the
trailing_comma_in_multilinefixer.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: