getFoo() ->doBar( $this->getX() // no comma here ->doY() // this is still the first method argument ->doZ() // this is still the first method argument ); } $var = myFunction( $foo, $bar ); // phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments false fputs( STDOUT, "Examples: $ {$app} , --all $ {$app} --all", $something ); $array = array(); array_map( function($x) { return trim($x, $y); }, $foo, $array ); $bar = new stdClass( 4, /* thanks */ 5, /* PSR-2 */ 6 ); public function doSomething() { return $this->getFoo() ->doBar( $this->getX() // no comma here ->doY() // this is still the first method argument ->doZ() // this is still the first method argument ); } doError( 404, // status code 'Not Found', // error name 'Check your id' // fix ); // phpcs:set PEAR.Functions.FunctionCallSignature allowMultipleArguments true // Don't report errors for closing braces. Leave that to other sniffs. foo( [ 'this', 'is', 'an', 'array' ], [ 'this', 'is', 'an', 'array' ], array( 'this', 'is', 'an', 'array' ), array( 'this', 'is', 'an', 'array' ), function($x) { echo 'wee'; return trim($x); } ); function foo() { myFunction( 'string'. // comment // comment 'string'. /* comment * comment */ 'string'. ); } // phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 1 // phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 1 test($arg, $arg2); test( $arg, $arg2 ); test( $arg, $arg2 ); test(); test( ); test( ); // phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesAfterOpen 0 // phpcs:set PEAR.Functions.FunctionCallSignature requiredSpacesBeforeClose 0 ?>