1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-04 07:37:27 +02:00

Created Structures (markdown)

LogMANOriginal
2018-11-05 13:35:15 +01:00
parent 0d39862b57
commit 57bc56c6d1

68
Structures.md Normal file

@@ -0,0 +1,68 @@
# Structures
Structures must follow a few rules.
**Add a space after closing parenthesis**
<details><summary>Example</summary><div><br>
**Bad**
```PHP
if($condition){
...
}
```
**Good**
```PHP
if($condition) {
...
}
```
</div></details><br>
**Add body into new line**
<details><summary>Example</summary><div><br>
**Bad**
```PHP
if($condition){ ... }
```
**Good**
```PHP
if($condition) {
...
}
```
</div></details><br>
**Close body in new line**
<details><summary>Example</summary><div><br>
**Bad**
```PHP
if($condition){
... }
```
**Good**
```PHP
if($condition) {
...
}
```
</div></details><br>
_Reference_: [`Squiz.ControlStructures.ControlSignature`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php)