Closed jrfnl closed 1 year ago
Merged manually.
FYI: this fix is included in today's PHP_CodeSniffer 3.8.0 release.
As per #3932, development on PHP_CodeSniffer will continue in the PHPCSStandards/PHP_CodeSniffer repository. If you want to stay informed, you may want to start "watching" that repo (or watching releases from that repo).
Reported via Mastodon by @WyriHaximus: https://phpc.social/@wyri@haxim.us/110224066521542315
As of PHP 7.3, trailing comma's in function calls are allowed.
This sniff should leave those alone to prevent fixer conflicts with sniffs dealing with the spacing around the parentheses of a function call, like the
PEAR.Functions.FunctionCallSignature
sniff, which this sniff is often combined with.While the sniff did take trailing comma's into account for multi-line function calls, it did not handle them correctly for single-line function calls.
Note: too much space can still be removed, but space should not be added.
Fixed now.
Includes tests.