The error indicates that you don't have the patch command installed, which PHPCBF uses to apply changes in one action.
If you are running on Windows, you can install Cygwin with the patch package and PHPCBF will run without error. Other operating systems will either have patch installed already or a package manager to help you out.
If you don't want to install anything, you can specify the --no-patch
argument to PHPCBF, which will instruct PHPCBF to apply the changes to your files directly, one at a time as they are checked.
If you don't want the files to be overwritten, you can use the --suffix
command line argument to write fixed copies of the files instead.
More instructions, and examples of using --no-patch
and --suffix
, can be found here: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically#using-the-php-code-beautifier-and-fixer