composer global require friendsofphp/php-cs-fixer
Then Add In settings.json vscode
"php-cs-fixer.executablePath": "phpcs.bat",
"php-cs-fixer.executablePathWindows": "phpcs.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:Usersusername.vscode directory
"php-cs-fixer.config": "C:Usersusername.vscode.php_cs",