@@ -49,19 +49,28 @@ $command = '';
4949
5050// Detect which tool to run
5151if (file_exists ('.phpcs.xml ' ) || file_exists ('phpcs.xml ' ) || file_exists ('.phpcs.xml.dist ' ) || file_exists ('phpcs.xml.dist ' )) {
52- echo "PHP CodeSniffer configuration file found, running CodeSniffer \n" ;
52+ echo "PHP CodeSniffer configuration file found, running CodeSniffer with version \n" ;
5353 $ command = $ commands ['phpcs ' ];
5454 $ program = explode (' ' , $ command , 1 )[0 ];
5555 assertPhpCodeSnifferIsInstalled ($ program );
56+
57+ passthru ($ program ." --version " );
58+ echo "\n" ;
5659} elseif (file_exists ('.php_cs ' ) || file_exists ('.php_cs.dist ' )) {
57- echo "PHP-CS-Fixer configuration file found, running PHP-CS-Fixer \n" ;
60+ echo "PHP-CS-Fixer configuration file found, running PHP-CS-Fixer with version \n" ;
5861 assertPhpCsFixerIsInstalled ();
5962 $ command = $ commands ['php-cs-fixer ' ];
63+
64+ passthru ("php-cs-fixer --version " );
65+ echo "\n" ;
6066} else {
61- echo "No configuration file found, running PHP CodeSniffer with PSR-2 \n" ;
67+ echo "No configuration file found, running PHP CodeSniffer with PSR-2 with version \n" ;
6268 $ command = $ commands ['default ' ];
6369 $ program = explode (' ' , $ command , 2 )[0 ];
6470 assertPhpCodeSnifferIsInstalled ($ program );
71+
72+ passthru ($ program ." --version " );
73+ echo "\n" ;
6574}
6675
6776// Run the analysis
0 commit comments