There MUST NOT be a space after the opening parenthesis. There MUST NOT be a space before the closing parenthesis.
You should use spaces_inside_parentheses
instead.
--- Original
+++ New
<?php
-if ( $a ) {
- foo( );
+if ($a) {
+ foo();
}
--- Original
+++ New
<?php
-function foo( $bar, $baz )
+function foo($bar, $baz)
{
}
- Fixer class: PhpCsFixer\Fixer\Whitespace\NoSpacesInsideParenthesisFixer
- Test class: PhpCsFixer\Tests\Fixer\Whitespace\NoSpacesInsideParenthesisFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.