mantisbt:coding_guidelines
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mantisbt:coding_guidelines [2014/06/03 05:44] – Added indication for array elements [] dregad | mantisbt:coding_guidelines [2018/04/03 05:50] (current) – [Coding Guidelines] fix broken link to mailing lists page (#24212) dregad | ||
---|---|---|---|
Line 8: | Line 8: | ||
The rest of this page describes in which ways we differ, as well as other Mantis-specific guidelines. | The rest of this page describes in which ways we differ, as well as other Mantis-specific guidelines. | ||
- | Please discuss any omissions or disagreements on the [[http:// | + | Please discuss any omissions or disagreements on our [[https:// |
===== General Formatting ===== | ===== General Formatting ===== | ||
+ | * Line length: should generally be kept below **80 chars**, although it is acceptable to have lines up to 120 chars when necessary. | ||
* Indentations: | * Indentations: | ||
* PHP tags: always use ''<? | * PHP tags: always use ''<? | ||
Line 86: | Line 88: | ||
==== Switch statements ==== | ==== Switch statements ==== | ||
+ | |||
+ | Every case //must// have a '' | ||
<code php> | <code php> | ||
Line 94: | Line 98: | ||
case 2: | case 2: | ||
blah; | blah; | ||
- | # Fall through | + | # Fall through |
- | case 3: | + | case 3: # No need for a break here |
case 4: | case 4: | ||
blah; | blah; | ||
- | | + | |
default: | default: | ||
blah; | blah; |
mantisbt/coding_guidelines.1401788676.txt.gz · Last modified: 2014/09/16 05:07 (external edit)