This repository includes the ITDC coding standard definition for PHP Codesniffer along with a few other helpful resources. The PHP_CodeSniffer standard will never be 100% accurate, but should be viewed as a strong set of guidelines while writing software for ITDC code.
See ITDC coding standards documentation at http://itdc.github.io/coding-standards/
If you want to contribute and improve this documentation find the source files at https://github.com/itdc/coding-standards/tree/gh-pages
- PHP 5.3+
- PHP Codesniffer 2.3+
Installation is as easy as checking out the repository to the correct location within PHP_CodeSniffer's directory structure.
composer global require "squizlabs/php_codesniffer=*"
git clone https://github.com/itdc/coding-standards.git `pear config-get php_dir`/PHP/CodeSniffer/Standards/ITDC
You can use the installed ITDC standard like:
phpcs --standard=ITDC code path/to/code
Alternatively if it isn't installed you can still reference it by path like:
phpcs --standard=path/to/itdc/coding-standards path/to/code
There is further information on how to set up IDE auto formatters here:
https://github.com/itdc/coding-standards/tree/master/IDE
Created by Avtandil Kikabidze aka LONGMAN.