Generally speaking: your code will not be reformatted automatically (like Visual Studio may do as you type) -- only with your consent (that's the general idea that devs at JetBrains are sticking to at the moment). Although current formatting rules are used when you insert some elements from Code Completion popup/Live Template.
You can invoke code formatter manually at any time via Code | Reformat Code
.
To configure formatting rules -- Settings/Preferences | Editor | Code Style | PHP
.
It also allows to use some predefined formatting styles (like PEAR, Zend, WordPress, Symfony 2 etc.) by importing it into your current scheme (use
Set from:` clickable link on the right top side of that screen):
https://www.jetbrains.com/help/phpstorm/2016.3/code-style-php.html#d14191e93
PHP language also has support for code re-arrangement (Arrangement
tab) -- it allows you to specify how your entities/class elements will be placed in your code (fields first then methods; public methods first and private at the end; etc).
Code arrangement can be executed without invoking actual code formatting -- use Code | Rearrange Code
for that.