Skip to content
Joomla Coding Standards Definition
Latest commit 13d9a52 Apr 6, 2016 @mbabker mbabker Merge pull request #86 from SniperSister/bugfix-instantiateclass
empty arrays are a valid parameter too

Joomla Coding Standards

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

If you want to contribute and improve this documentation find the source files at


Important note: currently the latest PHPCS is the 2.x series. But Joomla Sniffers is not yet compatible with this version. PEAR gives you the option to install it by default but Joomla sniffers will not work, thus remind to always install PHPCS in a version below 2.0.


Installation is as easy as checking out the repository to the correct location within PHP_CodeSniffer's directory structure.

Install PHP_CodeSniffer.

pear install PHP_CodeSniffer-1.5.6

Install the Joomla standard.

git clone `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

IDE autoformatters

There is further information on how to set up IDE auto formatters here:
Something went wrong with that request. Please try again.