PHP Code Style Issue - function Foo( array & $moo )

It used to be that I could set up the PHP code style so it would insert a space between the & and $ in the following line:

function Foo( array & $moo )

But that option has since disappeared in the newer version of PhpStorm - I cannot find it anywhere.  Now, when I format my code it becomes this:

function Foo( array &$moo )

There is no longer any space between the & and $.  For the life of me, I cannot figure out how to get this code style option working again.  This is really annoying because I have thousands of files in Git and now when I code format a file, it Git will show differences on those lines, and I have to manually "fix" those lines after code formatting the file.  Please help.

0

Tried to compare the behaviour on 2019.2.5 and 2019.3.1 and may confirm that whitespaces are automatically removed in 2019.3.1 reformat.

Basically, I have a suspicion that it may be related to https://youtrack.jetbrains.com/issue/WI-50046.

We will double-check that and, if needed, submit and extra ticket on YouTrack.

 

 

 

0

What is the status of this?

0

Unfortunately, the related WI-50046 is still in the "Open" state. To draw some extra attention to it and make it more granular, I have extracted this specific example to the new ticket:

https://youtrack.jetbrains.com/issue/WI-57066

0

请先登录再写评论。