- Install phpcs by cloning from git repository:
git clone git://github.com/squizlabs/PHP_CodeSniffer.git
- Make symbolic link to phpcs:
cd PHP_CodeSiniffer
ln -s "$(pwd)/scripts/phpcs" ~/bin/phpcs
- Now, try dumping help messages:
phpcs -h
- Sniff codes:
phpcs --standard=PSR2 /path/to/codes
Then, you will see warnings for about violating conding starnd PSR2 :)
By the way, what is Qiita?
Visit Qiita and Kobito - Great Duet to manage your knowledge. ;)