Search code examples
formattingphpstormspacing

Where is the option to control property access spacing when formatting?


I'm almost sure that there used to be an option to control this formatting case:

function __set( $k, $v ) {
    $this->values_input->{$k} = $v;
}

vs

function __set( $k, $v ) {
    $this->values_input->{ $k } = $v;
}

I have a huge project that has the second case everywhere but when I try to format the code it removes the spaces around $k.

Has it been removed or am I missing something? I have almost all spacing cases checked in PhpStorm settings the few unchecked don't seem to be relevant.


Solution

  • There has never been such an option.
    Here's the feature request: https://youtrack.jetbrains.com/issue/WI-71891/Formatter-Allow-to-control-spaces-within-curly-braces-in-property-access