bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.56k stars 92 forks source link

Formatting of spaces inside braces #2902

Open mw108 opened 2 weeks ago

mw108 commented 2 weeks ago

Feature description or problem with existing feature The built-in formatter only offers to choose the formatting style of braces, you can select between psr12, allman and k&r. In general, this just decides whether braces go on a new line or not.

Describe the solution you'd like I'd like to have a feature to control the formatting of spaces inside braces.

When using the auto formatter with allman the result currently is:

public function my_function(int $value): boolean
{
        if ($value == 10)
        {
                return true;
        }
        return false;
}

What I would like to have:

public function my_function( int $value ): boolean
{
        if ( $value == 10 )
        {
                return true;
        }
        return false;
}