You can download the PrestaShop code standard using SVNGit: https://github.com/PrestaShop/PrestaShop-norm-validator (you must perform this step before going any further with this tutorial).
- Install PEAR: http://pear.php.net/
$> apt-get install php-pear
- Install PHP CodeSniffer in PEAR: http://pear.php.net/package/PHP_CodeSniffer
$> pear install PHP_CodeSniffer
- Add the PrestaShop standard that you downloaded from SVN earlier, and place it in PHP CodeSniffer's "Standards" folder.
$> svn cohttpgit clone https://svngithub.prestashop.com/branchesPrestaShop/PrestaShop-norm-validator
- Set the Prestashop standard as the default one
$> phpcs --config-set default_standard Prestashop