How to beautify code in PhpStorm and other Intellij editors?

Gopal Sharma picture Gopal Sharma · Jan 5, 2014 · Viewed 61.1k times · Source

Is there any way to beautify my php code in PhpStorm? (a keyboard shortcut would be preferable)

Answer

Staff picture Staff · Jan 5, 2014

Choose Code | Reformat Code, or press Ctrl + Alt + L.

EDIT: The keyboard shortcode has changed since PHPStorm 10 for windows to Ctrl + Alt + F