how to reformat this php 8 code?

Answered

i would like things marked here in code to be aligned.
i tried everything, but i didn´t get this to work... thanks for any hint !!!

i should mention, this is NOT working:

"Wrapping and Braces" tab | Function/constructor call arguments | Align when multiline

 

PhpStorm 2021.1 RC
Build #PS-211.6693.78, built on April 1, 2021
Runtime version: 11.0.10+9-b1341.35 amd64
Linux 5.8.0-48-generic
9 comments
Comment actions Permalink

It's unfortunately not possible right now to align parameters with parameter hints correctly. Here's a link to a corresponding report: https://youtrack.jetbrains.com/issue/IDEA-168471. Feel free to vote for or comment it in order to get notified about its updates & increase its priority. 

0
Comment actions Permalink

;-(( thanks for your feedback!

0
Comment actions Permalink

Oh, sorry, it's named arguments. Their formatting doesn't work correctly yet, when wrapped: https://youtrack.jetbrains.com/issue/WI-58843.

As for your whole example: I don't think it's possible to achieve that. Call arguments between different functions aren't aligned.

0
Comment actions Permalink

Dmitry Tronin

nonono... i don´t want anything aligned betweeten different functions !!

in want them aligned inside the function itself. my screenshot shows 3 individual blocks in 2 different functions and each block should be aligned for itself ! ;)

0
Comment actions Permalink

Oh, do you want it to look like this:

I'll check if there are any workarounds

 

0
Comment actions Permalink

Dmitry Tronin yes, that's exactly what i want ! ;-)

0
Comment actions Permalink

Thanks. Checked that with a team, unfortunately it's still not possible to have them aligned. There's a feature request for this + I've created 2 more to cover other cases from your example:

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

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

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

Feel free to vote for them or comment them in order to get notified about their updates & increase their priority.

0
Comment actions Permalink

thanks a lot !!!!!!!!

1
Comment actions Permalink

You're welcome!

0

Please sign in to leave a comment.