composer global require friendsofphp/php-cs-fixer
after successfully installation of PHP-CS-FIXER
now install PHP-CS-FIXER VSCODE Extension
in VSCODE User Settings
press Ctrl+, to get VSCODE User Settings
"php-cs-fixer.executablePath": "php-cs-fixer.bat",
"php-cs-fixer.executablePathWindows": "php-cs-fixer.bat",
"php-cs-fixer.onsave": true,
//If you want to create a custom config for php-cs-fixer
//create a .php_cs file in this C:\Users\username\.vscode directory
"php-cs-fixer.config": "C:\\Users\\username\\.vscode\\.php_cs",
That's all! Hope this will help you!
When you install composer globally the php-cs-fixer.bat file will be available in your Roaming\Composer\vendor\bin directory. From there you can go in phpstorm and under Languages and Frameworks ->PHP -> Quality Tools -> PHP CS Fixer -> click the
...
and set the directory path to your .bat file and you then set it in Editor->Inspections->Quality Tools->PHP CS Fixer Validation. Apply the settings and click ok and you should be good.