Skip to content

Commit 27e13bb

Browse files
authored
Update WHITESPACE-ALIGNMENT.md
1 parent ea82a94 commit 27e13bb

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

WHITESPACE-ALIGNMENT.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
# Whitespace and Alignment
22

3-
* Follow _PSR Recommendations_ by default.
4-
5-
* `switch` control statement:
6-
* In addition to the standard whitespace for `switch` statements, the contents of each `case` or `default` block should be indented for readability. This includes the closing `break`.
7-
* Also, there should always be a `default` block.
8-
9-
```php
10-
switch ($value) {
11-
case 'a':
12-
// Some code...
13-
break;
14-
15-
case 'b':
16-
// Some code...
17-
break;
18-
19-
default:
20-
// Some code...
21-
}
22-
```
23-
24-
* Blocks of variable setting should have all `=` characters vertically-aligned.
25-
26-
* Associative arrays (e.g., hashes, dictionaries) should have all `=>` symbols vertically-aligned.
27-
283
* You are encouraged to give increment/decrement operators (`++` and `--`) a line of their own (with the exception of `for` loops).
294

305
```php

0 commit comments

Comments
 (0)