1composer global require friendsofphp/php-cs-fixer
2
3Then Add In settings.json vscode
4
5"php-cs-fixer.executablePath": "phpcs.bat",
6"php-cs-fixer.executablePathWindows": "phpcs.bat",
7"php-cs-fixer.onsave": true,
8//If you want to create a custom config for php-cs-fixer
9//create a .php_cs file in this C:\Users\username\.vscode directory
10"php-cs-fixer.config": "C:\\Users\\username\\.vscode\\.php_cs",
11
12