| | |
| | | * Add documentation about access levels (public, private, protected). |
| | | * Make function / var names on the following way, first word lower, next word(s) first letter upper like. getFirstResult(); |
| | | |
| | | Pear coding guiidelines |
| | | Pear coding guidelines |
| | | |
| | | //***************************************************************************** |
| | | // Commenting style |
| | |
| | | |
| | | // print_r($foo); |
| | | |
| | | For incline comment use //** and //* eg |
| | | For inline comment use //** and //* eg |
| | | |
| | | //** Decide what do do |
| | | switch($decide){ |
| | |
| | | Do not use the phpdoc on every function, eg |
| | | |
| | | /** |
| | | * Login an user |
| | | * Login a user |
| | | * @param string user username |
| | | * @param string password of user |
| | | */ |
| | |
| | | ....... |
| | | } |
| | | << |
| | | as this function explains its self, the followinf clean code will suffice |
| | | as this function explains its self, the following clean code will suffice |
| | | >> |
| | | function login($user, $pass){ |
| | | ....... |
| | |
| | | If you do need to explain a function then put un the summary syntax eg |
| | | |
| | | /** Pass an array of values where third param is bar |
| | | * $foo['bar'] = 1; // allow an user |
| | | * $foo['bar'] = 1; // allow a user |
| | | * $foo['bar'] = 2; // destroy user |
| | | * $foo['bar'] = -1; // recreate |
| | | */ |