In my PhpStorm 8.0.3 code style, I have set it to add a new line after a function declaration, which works fine.
Problem is now I'm in a new project that follows the PSR-2 Standards, which say that the opening brace of a function MUST be placed in the same line that the closing parenthesis of the function arguments when these split across multiple lines, as you can see here.
I want this when arguments split across multiple lines...
public function myMethod(
MyClass $arg1,
$arg2 = null
) {
// method body
}
...and this when they are all in the same line...
public function myMethod(MyClass $arg1, $arg2 = null)
{
// method body
}
I was trying to search for that option but I couldn't find it - I know I can decide whether I want to add the new line for all functions, but I need it only in these particular occasions.
As a complement to @marekful's answer. To make it clearer, these are the 2 settings needed to achieve what I wanted:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With