Language and development rules: Difference between revisions

Jump to navigation Jump to search
m (Reverted edits by Cbenke (talk) to last revision by Eldy)
Line 22: Line 22:


= PHP Norms =
= PHP Norms =
== PHP ==
* Dolibarr is written with PHP and supports all PHP version higher than {{PHPMinVersion}}. All files must end with extension .php
* Dolibarr is written with PHP and supports all PHP version higher than {{PHPMinVersion}}. All files must end with extension .php


Line 75: Line 76:
** The other exception is that we don't replace the tab with space. This makes lot of editor crazy and breaks some auto-format features.
** The other exception is that we don't replace the tab with space. This makes lot of editor crazy and breaks some auto-format features.
You can use the file dev/codesniffer/ruleset.xml as rule file to control coding style with PHPCodeSniffer.
You can use the file dev/codesniffer/ruleset.xml as rule file to control coding style with PHPCodeSniffer.
== Classes ==
Some properties of classes are found into different classes. To avoid having different names, we will use the following names:
* date_creation            date creation
* user_creation            object User creating object
* user_creation_id        id user creating object
* date_modification        date last modification
* user_modification        objet User last modification
* user_modification_id    id user last modification
* date_validation          date validation
* user_validation          objet User
* user_validation_id      id user making validation


= SQL rules =
= SQL rules =

Navigation menu