I started using PHP Code Style Fixer long time ago for automatically fix my code style. You can use this tool via command line. But also you can add a file-watcher for PhpStorm. It runs php-cs-fixer on every file save. So you dont need to run php-cs-fixer manually.
Here you can download
watchers.xml : https://gist.github.com/shibby/6cb1fcafe3747ce8e2f7aa0e8dc2b516
All you need to do is import xml file from PhpStorm Settings->File Watchers and installing php-cs-fixer to