Function multiline arguments alignment

Given this test class:

<?php

namespace My\App;

class Test
{
public function __construct(
private \My\App\Something $something,
private \My\Long\Class\Name\Makes\Everything\Shift $shift,
)
{
}
}

When I run Code > Reformat code in this file, it corrects to:

<?php

namespace My\App;

class Test
{
public function __construct(
private \My\App\Something $something,
private \My\Long\Class\Name\Makes\Everything\Shift $shift,
)
{
}
}

I don't want the arguments to be aligned (like in the first example). How do I achieve that?

Thank you!

0
1 comment

You may want to untick the "Wrapping and Braces > Function declaration parameters > Align when multiline" option in "Editor > Code Style > PHP", that should do the trick:

 

0

Please sign in to leave a comment.