I have a composer script, but in this instance was just running
phpcs -s src/ tests/
I have just found this pagehttps://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically
so not only was I being dim, I was also blind!
I've seen that e.g. cms has two scripts for both... https://github.com/silverstripe/silverstripe-cms/blob/3d2d607be166172c204178c8a820e86de668b7e9/composer.json#L43-L46
Hmm, interesting. cheers @wmk
Somehow PHPStorm can automatically call PHPCS, but I haven't configured this.
probably a module for it
apparently so, another module I have installed and will probably never use
because I just default to the command line 🙂