We are using both php-cs-fixer and PHPCodeSniffer tools for our coding standards. Both can be conflicted when having different rules. We were able to get a balanced result except for one rule. Warning thrown by PHP Code Sniffer :
phpcs: Opening parenthesis of a multi-line function call must be the last content on the line
phpcs: Closing parenthesis of a multi-line function call must be on a line by itself
Those 2 warnings are probably caused by PEAR.Functions.FunctionCallSignature rule. We are not able to fix this automatically with our php-cs-fixer custom configuration :
An example of the required result :
After fixing :
$response = $this->client->post('users/authenticate', [
'form_params' => [
'email' => $email,
'password' => $password,
],
]);
Expected output :
$response = $this->client->post(
'users/authenticate',
[
'form_params' => [
'email' => $email,
'password' => $password,
],
]
);
Is there a way to achieve the previous output ?