Mar 14 2018

How to set up PHPCS with CakePHP coding standard on Ubuntu

Install required package

sudo apt-get install php-codesniffer

Install the CakePHP Coding Standard

$ sudo pear channel-discover pear.cakephp.org
$ sudo pear install cakephp/CakePHP_CodeSniffer

Usage

$ cd /var/repos
$ cd <your-repo>
$ phpcs app -p --extensions=php --standard=CakePHP
...................................................