Replies: 5 comments 6 replies
-
@arwelcmm can you provide a code snippet which demonstrates the problem you're trying to solve? Perhaps a 'bad' and 'fixed' sample with both 'non-nested' and 'sub-arrays'? I think I know what you're talking about, but I want to make sure. Also, having a code snippet will make it much easier to test if a sniff behaves as you want/expect. |
Beta Was this translation helpful? Give feedback.
-
Of course, my apologies! Will endeavour to do this going forward, a bit daft of me in hindsight... |
Beta Was this translation helpful? Give feedback.
-
I'm using PHP_Codesniffer version 3.7.2. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the suggestion! Unfortunately changing my xml file to match this hasn't solved it. I've spoken to the colleague who raised the issue and he's clarified that it only seems to be happening on the final index of a nested array. Hope this extra information might help! |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi guys, is there a rule that appends a trailing comma to sub-arrays/nested arrays? I have implemented the following phpcs.xml in my current project, but it was flagged by a colleague that the current xml does not append trailing commas to sub-arrays, but works fine for non-nested arrays. If anyone has any insight I'd be very grateful!
Beta Was this translation helpful? Give feedback.
All reactions