Skip to content

Commit

Permalink
fix coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
yllen committed Oct 5, 2016
1 parent 14270ae commit 15dce8b
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions source/codingstandards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ Function names must be written in *camelCaps*:
//do something here!
}
If parameters add block doc for these parameters.
.. code-block:: php
/**
* decribe utility of the function
*
* @param $a type(integer, array...) utility of the param
* @param $b type(integer, array...) utility of the param
*
* $return of the funtion (boolean, array...)
*
**/
function userName($a, $b) {
If function from parent add
.. code-block:: php
/**
*@see CommonGLPI::getMenuContent()
**/
function getMenuContent()
Call static methods
^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -155,16 +175,10 @@ Variables and Constants
$user = 'glpi';
// put elements in alphabetic order
$users = array('glpi', 'glpi2', 'glpi3');
$users = array(
'glpi1' => 'valeur1',
'nexglpi' => array(
'down' => '1',
'up' => array(
'firstfield' => 'newvalue'
)
),
'glpi2' => 'valeur2'
);
$users = array('glpi1' => 'valeur1',
'nexglpi' => array('down' => '1',
'up' => array('firstfield' => 'newvalue')),
'glpi2' => 'valeur2');
$users_groups = array('glpi', 'glpi2', 'glpi3');
$CFG_GLPI = array();
Expand Down Expand Up @@ -238,9 +252,9 @@ Examples:
//single quote cases
switch ($a) {
case 'foo': //use single quote here
case 'foo' : //use single quote here
...
case 'bar':
case 'bar' :
...
}
Expand All @@ -250,6 +264,7 @@ Files

* Name in lower case.
* Maximum line length: 100 characters
* Indenttion: 3 spaces

Database queries
----------------
Expand Down

0 comments on commit 15dce8b

Please sign in to comment.