For a function call the sniff Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma checks for spaces before comma. But there is no sniff which checks for spaces before comma in argument lists like in functions, constructs, closures implements (and maybe more situations - array creation etc).
Here is a test case with some places where too much whitespace
class MyClass implements I1 , I2 { public function __construct( $arg1 , $arg2 ) { } public function func( $arg1 , $arg2, $arg3, $arg4 ) { return function ( $arg1 , $arg2 ) use ( $arg3 , $arg4 ) { return in_array( $arg1 , [ $arg2 , $arg3, $arg4 ] ); }; } public function doSomething() { $this->func( 'one' , 'two', 'three', 'four' ); } }
By the way: There is no sniff which checks the count of spaces after the comma, but this could be trigger, if each argument is on its own line