PHP indentation on if statements without curly braces
PHP related: Is these any way to stop the reformatting on if/else statements without curly braces?
I have a piece of code like this:
if (!($var = $this->getSomeThings()) instance of SomeThing)
$otherVar = $somethingElse($var)
else
return $var
And it keeps push the $otherVar line behind the control function, even far beyond my set hardwrap limit.
Please sign in to leave a comment.
Try adjusting this at File | Settings | Editor | Code Style | PHP > Wrapping and Braces:
Keep when reformatting > Control statement in one line - disable
'if()' statement > 'else' on new line - enable
This way I can keep the code fragment this way:
The rest of the settings: