Repository navigation
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. |
Of course, my apologies! Will endeavour to do this going forward, a bit daft of me in hindsight... |
I'm using PHP_Codesniffer version 3.7.2. |
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! |
|

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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!
All reactions