This article is related to my previous one about setting up PHPCodeSniffer with CodeIgniter coding standards.
Installation on Linux boxes is pretty yeasy:
sudo pear channel-update pear.php.net yum install php-pear-PHP-CodeSniffer php-phpunit-phpcpd
On Mac OS X you have couple options. Pear or Homebrew:
brew install php-code-sniffer
And following that, on regular boxes CodeSniffer will be here:
on Mac OS CodeSniffer will be located here:
CodeIgniter standard can be downloaded from this location https://github.com/thomas-ernest/CodeIgniter-for-PHP_CodeSniffer
all you need to do is just pull master.zip file from github, and run ANT build file.
You can check if your installation was succesfull by running
phpcs -i as a result you should get something like that:
phpcs -i The installed coding standards are CodeIgniter, MySource, PEAR, PHPCS, PSR1, PSR2, Squiz and Zend