mirror of
https://github.com/librenms/librenms.git
synced 2024-09-29 06:16:43 +00:00
Merge pull request #1428 from paulgear/docfix
Small note about control structures
This commit is contained in:
commit
2370e3a4c6
@ -37,6 +37,21 @@ if ($foo == 5) {
|
||||
}
|
||||
```
|
||||
|
||||
Start else and elsif on new lines, e.g.
|
||||
```php
|
||||
if ($foo == 5) {
|
||||
echo 'foo is 5';
|
||||
}
|
||||
elsif ($foo == 4) {
|
||||
echo 'foo is 4';
|
||||
}
|
||||
else {
|
||||
echo 'foo is something else';
|
||||
}
|
||||
```
|
||||
This makes diffs much cleaner when moving around blocks of code.
|
||||
|
||||
|
||||
### Including files
|
||||
Using parenthesis around file includes isn't required, instead just place the file in between ''
|
||||
```php
|
||||
|
Loading…
Reference in New Issue
Block a user