Actions

Talk

Developer Area/Coding guidelines

From Mahara Wiki

Revision as of 03:33, 20 July 2013 by Kabalin (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

What needs to be added

Functions, Classes

  • Make sure function name starts from letter (no _ before function names).
  • Single whitespace between functions and between function and code
  • Double whitespace between classes

Variables

  • No hardcoded binary (security reasons)
  • No hardcoded serialised data (security reasons)

general

  • No closing php tag
  • No whitespaces at the end is required (currently it is just recommend)

Control statements

  • "case" multiline syntax:
case:
   a = 25;
   b = 100;
   break;

not

case: a = 25; b = 100; break;