PHP CodeSniffer _by Oleksii Prohonnyi
Introduction PHP_CodeSniffer is a PHP5 script that tokenises and "sniffs" PHP, JavaScript and CSS files to detect violations of a defined coding standard.  A coding standard in PHP_CodeSniffer is a collection of sniff files.  Each sniff file checks one part of the coding standard only.
Installation Version: 1.4.5 (stable) was released on 2013-04-04  pear install PHP_CodeSniffer (More info)  php pyrus.phar install pear/PHP_CodeSniffer (More info)
Usage
IDE integration  JetBrains PHPStorm (More info)  Eclipse (More info)  NetBeans (More info)  Sublime Text 2 (More info)
VCS integration  Git (More info)  SVN (More info)  Mercurial (More info)
Coding standards  MySource  PEAR  PHPCS  PSR1  PSR2  Squiz  Zend
Custom coding standards There are 2 ways you could create your own PHPCS coding standard:  using ruleset.xml file.  using SigmaUkraineCodingStandard.php file.
SigmaUkraineCS: Step 1 of 3 Create folder “SigmaUkraine” in main PHPCS directory. - Create folder “Sniffs” inside it. - Create SigmaUkraineCoding- Standard.php or ruleset.xml file inside it. (More info)
SigmaUkraineCS: Step 2 of 3 (More info)
SigmaUkraineCS: Step 2 of 3 (More info)
SigmaUkraineCS: Step 3 of 3 (More info)
One more thing  Standard file name should be in “<Name>CodingStandard.php” format.  Sniff file name should be in “<Name>Sniff.php” format.  Folder with coding standard should be named as standard itself.  All sniffs should be placed to “<StandardName>Sniffs” folder.  Try to name and organize sniffs due to their assignments.  Each sniff should implement register() and process() methods.  For warnings/errors use addWarning()/addError() methods.  Look for all possible tokens in file “<PHP_CodeSniffer>Tokens.php”.  Try to follow PHPCS standard in your code.
SIGMA UKRAINE14
Oleksii Prohonnyi facebook.com/oprohonnyi linkedin.com/in/oprohonnyi

PHPCS (PHP Code Sniffer)