Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm - Disable aligning class properties after refactoring

Tags:

phpstorm

I'm using PhpStorm 2021.2.1 on my Windows machine. The thing I've noticed today is when I refactor my class code it realign the class properties and methods parameters like so:

public function __construct(
    public Notification $notification,
    public Post         $post,
    public ?Title       $title = null)
{
    //
}

How can I tell PhpStorm to not align class properties?

like image 935
Mwthreex Avatar asked May 15 '26 17:05

Mwthreex


1 Answers

Settings (Ctrl + Alt + S) > Editor > PHP > Tab Wrapping and Braces > Function declaration parameters > Untick Align when multiline.

You can also search for Align when multiline when using the quick search in the settings to find it quicker.

like image 131
magnetik Avatar answered May 18 '26 10:05

magnetik