Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:entwickler:programmierrichtlinien [2016/12/03 14:39] – [Defining functions] ximex | en:entwickler:programmierrichtlinien [2021/11/15 14:28] (current) – fasse | ||
|---|---|---|---|
| Line 27: | Line 27: | ||
| * while | * while | ||
| * switch | * switch | ||
| - | It should be ensured that the braces are always at the height of the associated | + | The open parenthesis is set after the control structure with a space between. The closing parenthesis is always |
| Here is an example of a nested if statement: | Here is an example of a nested if statement: | ||
| - | <code php>if ((condition1) && (condition2)) | + | <code php>if ((condition1) && (condition2)) { |
| - | { | + | |
| action1; | action1; | ||
| - | if (condition3) | + | if (condition3) { |
| - | | + | |
| action2; | action2; | ||
| } | } | ||
| - | } | + | } elseif ((condition4) or (condition5)) { |
| - | elseif ((condition4) or (condition5)) | + | |
| - | { | + | |
| action3; | action3; | ||
| action4; | action4; | ||
| - | } | + | } else { |
| - | else | + | |
| - | { | + | |
| defaultaction; | defaultaction; | ||
| }</ | }</ | ||
| Line 53: | Line 47: | ||
| Here is an example of a switch / case statement: | Here is an example of a switch / case statement: | ||
| - | <code php> | + | <code php> |
| - | { | + | |
| case 1: | case 1: | ||
| action1; | action1; | ||
| Line 129: | Line 122: | ||
| </ | </ | ||
| - | ===== SVN Requirements ===== | + | ===== Git Requirements ===== |
| - | When files are checked into SVN, a commit message must be drawn up. In a bugfix the commit message definitely should belong to the associated | + | When files are checked into Git, a commit message must be drawn up. In a bugfix the commit message definitely should belong to the associated |
| ===== Name Convention ===== | ===== Name Convention ===== | ||