Describe the bug
Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma should not report in case comma is followed by right parenthesis because it collides with PSR2.Methods.FunctionCallSignature.SpaceBeforeCloseBracket and fails to fix the file
Code sample
Custom ruleset
<?xml version="1.0"?>
<ruleset>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="PSR2.Methods.FunctionCallSignature"/>
</ruleset>
To reproduce
Steps to reproduce the behavior:
- Create a file called
test.php with the code sample above...
- Run
phpcs test.php ...
- See error message displayed
No space found after comma in argument list (Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma)
Expected behavior
No error.
Versions:
- OS: Windows 10
- PHP: 8.1.9
- PHPCS: 3.7.1