phpstorm Code Styling in PhpStorm Set Code Styles from a predefined Standard like PSR-2


Example

PhpStorm already ships with a lot of predefined language schemes that are based on common code style guidelines and standards like PSR-2. There is kind of a hidden feature in the code style settings pages where you can import these standards and set them as your current configuration. To do so simply choose your coding language in the left panel. Then there is a small link in the top right called Set from...

By clicking this link PhpStorm will present you a small popup where you can choose from the predefined standards under the Predefined Style tab.

PhpStorm set style from