phpstormphpstorm-2017.2

How to keep annotations on the same line when formatting PHP code


I have some custom annotations which should go exactly before a variable value

$var = /* @text */'Some translatable text';

After formatting it becomes

$var = /* @text */
'Some translatable text';

How to disable inserting new lines after the annotations?


Solution

  • Unfortunately there's no way to do this at the moment. Feel free to submit a feature request at http://youtrack.jetbrains.com/issues/WI#newissue=yes.