The easiest way to do this would be to first select the whole documents, then go to Tools - Filter Through Command
, and put PATH/YO/phpcbf.phar -
(note the ending -
- this
is necessary), and click OK. Your document should now be formatted.
If you need to run this a lot and want to be quicker, you can set up an external tool through Tools - External Tools - Configure...
, and add a new tool there. Here's an example setup:
The "best" and "official" way to do this would be to install phpactor
LSP server with PHP-CS-Fixer integration, however this does not work on remote files.