The Jenkins job mediawiki-core-phpcs-trusty runs PHP CodeSniffer against every single files. That is one of the slowest jobs we have. We could be smarter and only run against files changed in the patchset proposed which would dramatically speed it up.
phpcs supports a bootstrap file that would let us finely tweak it is state after all arguments and configuration have been processed and just before the lint actually starts.
Thus, we could shell out to git just like the slave script git-changed-in-head, grab the files, filter out the one that do not match phpcs.xml extension: <arg name="extensions" value="php,php5,inc,sample"/> and process :}