Cài đặt ECG Magento Code Sniffer kiểm tra magento coding standard

Before starting using our coding standard install PHP_CodeSniffer

  • sudo pear install PHP_CodeSniffer

Clone or download Magento PHP_CodeSniffer Coding Standard on your computer or install it with Composer.

Add the standards directory to PHP_CodeSniffer installed paths:

  • sudo phpcs –config-set installed_paths magento-ecg/coding-standard-master/

Run CodeSniffer:

  • phpcs –standard=Ecg –extensions=php,xml,phtml –report-full=<folder>/file.log www/lovingearth/app/code/local/