This repository includes the Joomla 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 Joomla.
See Joomla coding standards documentation at http://joomla.github.io/coding-standards/
If you want to contribute and improve this documentation find the source files at https://github.com/joomla/coding-standards/tree/gh-pages
- PHP 5.3+
- PHP Codesniffer 1.3+
Installation is as easy as checking out the repository to the correct location within PHP_CodeSniffer's directory structure.
pear install PHP_CodeSniffer
git clone http://github.com/joomla/coding-standards.git `pear config-get php_dir`/PHP/CodeSniffer/Standards/Joomla
You can use the installed Joomla standard like:
phpcs --standard=Joomla path/to/code
Alternatively if it isn't installed you can still reference it by path like:
phpcs --standard=path/to/joomla/coding-standards path/to/code