Coding Standards

From ARK
Jump to: navigation, search

The ARK coding standards follow the PEAR coding standards for PHP code. The PEAR documentation is pretty complete and should be consulted in the first instance at the [PEAR] website.

This sets out in detail the technical standard expected of code to be contributed to the project. This is detailed and includes things such as correct use of tabs/spaces, line spacing and so forth. For more general notes of what goes where and for a more general overview of the architecture of ARK, you should familiarise yourself with the relevant parts of this wiki.

Common Errors

Common errors and things to watch out for:

  • Make sure that your text editor is set up to insert 4 spaces NOT tab stops.
  • Use a spaces after control structures but not after function calls
 if (control_structure) {