Faced such a problem that css and html files are amenable to formatting code via ctrl + alt + l kbd>, and php for some reason ignores.
Maybe I drove somewhere?
What needs to be done in php files also work formatting through hotkeys?
Answer 1, Authority 100%
You need to use phpstorm.
Press that Webstorm is IDE designed to edit JS projects. There are phpStorm phpSTORM to edit PHP files)
PHPSTORM supports the same editing JS