@@ -27,8 +27,8 @@ $commands = [
2727 */
2828 'ci ' => [
2929 'php-cs-fixer ' => 'php-cs-fixer fix --dry-run --allow-risky=yes --diff --using-cache=no ' ,
30- 'phpcs ' => 'phpcs --no-cache ' ,
31- 'default ' => 'phpcs --standard=PSR2 --extensions=php --ignore="vendor/*" --no-cache . ' ,
30+ 'phpcs ' => 'phpcs --no-cache --no-colors ' ,
31+ 'default ' => 'phpcs --standard=PSR2 --extensions=php --ignore="vendor/*" --no-cache --no-colors . ' ,
3232 ],
3333];
3434
@@ -52,7 +52,7 @@ $command = '';
5252if (file_exists ('.phpcs.xml ' ) || file_exists ('phpcs.xml ' ) || file_exists ('.phpcs.xml.dist ' ) || file_exists ('phpcs.xml.dist ' )) {
5353 echo "PHP CodeSniffer configuration file found, running CodeSniffer with version \n" ;
5454 $ command = $ commands ['phpcs ' ];
55- $ program = explode (' ' , $ command , 1 )[0 ];
55+ $ program = explode (' ' , $ command , 2 )[0 ];
5656 assertPhpCodeSnifferIsInstalled ($ program );
5757
5858 passthru ($ program ." --version " );
@@ -88,7 +88,7 @@ function commandExists($command)
8888 if (strtoupper (substr (PHP_OS , 0 , 3 )) === 'WIN ' ) {
8989 $ return = shell_exec ('where ' . escapeshellarg ($ command ));
9090 } else {
91- $ return = shell_exec ('which ' . escapeshellarg ($ command ));
91+ $ return = shell_exec ('which ' . escapeshellarg ($ command ));
9292 }
9393 return !empty ($ return );
9494}
0 commit comments