joomla/joomla-cms — pull request #101 by elkuku (2012-01-25 05:20:55+00:00)
Title: Code style: Let's start

This is an attempt to bring the CMS coding standards in line with the Joomla! platform.
I believe that this is going to be a long way, so this is the first baby step ;)
This will:

* Add a phing build.xml file containing the code sniffer commands and the CMS fileset.
* Add the ruleset.xml from the platform. Some generic sniffs have not been included (yet).
* Add the first custom Joomla! Coding standard sniff (Joomla_Sniffs_WhiteSpace_DisallowSpaceIndentSniff).
* Fix the PHP code according to the present rules.

List of used sniffs (8):

* Joomla_Sniffs_WhiteSpace_DisallowSpaceIndentSniff
* PEAR_Sniffs_NamingConventions_ValidClassNameSniff
* PEAR_Sniffs_Classes_ClassDeclarationSniff
* PEAR_Sniffs_Commenting_InlineCommentSniff
* Generic_Sniffs_Files_LineEndingsSniff
* PEAR_Sniffs_Formatting_MultiLineAssignmentSniff
* Generic_Sniffs_NamingConventions_UpperCaseConstantNameSniff
* Generic_Sniffs_PHP_DisallowShortOpenTagSniff

Most common errors:

* Class names have to start with an upper case letter, the opening brace must be on a new line.
* Spaces were used for indenting instead of tabs.
* Windows line endings instead of Unix.

I hope this will continue and being used before merging pull requests or applying patches.