Developer's Guide

10. When a method/function returns a boolean and the current
method/function return depends on it, the if statement has to be
avoided
11.
12. public aFirstMethod()
13. {
14. return $this->aSecondMethod();
15. }
16. Tests must be grouped by "entity"
17.
18. if ($price AND !empty($price))
19. [...]
20. if (!Validate::$myObject OR $myObject->id === NULL)
21. [...]
Visibility
1. The visibility must be defined everytime, even when it is a public
method.
2. The order of the method properties should be: visibility static
function name()
3.
4. private static function foo()
Method / Function names
1. Method and function name always begins with a lowercase character
and each following words must begin with an uppercase character
(CamelCase)
2.
3. public function myExempleMethodWithALotOfWordsInItsName()
4. Braces introducing method code have to be preceded by a carriage
return
5.
6. public function myMethod($arg1, $arg2)
7. {
8. [...]
9. }
10. Method and function names must be explicit, so such function
names as "b()" or "ef()" are completly forbidden.
Exceptions
The only exceptions are the translation function called "l()" and
debug functions "p()", "d()".
Enumeration
Commas have to be followed (and only followed) by a space.
protected function myProtectedMethod($arg1, $arg2, $arg3 = null)