formatting: comment mixed with braces ?

Is it possible to have phpStorm keep the following format when reformatting:

        if ('none' === $mode) {

        }
        // assume mode is all
        else {

        }


This is: a comment on a single line, between the if and else braces.
As for now, I can only manage to have the following:

        if ('none' === $mode) {

        } // assume mode is all
        else {

        }


Not a big deal, but just wondering if it's possible or not yet?

2 comments

Yes it is possible. Just enable option "else on new line" in Settings->Code Style->PHP->Wrapping and Braces->if() statement.

0

Please sign in to leave a comment.