Commit 544855b
committed
PHPCSDev ruleset: switch over to PSR12 and other minor tweaks
This switches the basis of the `PHPCSDev` ruleset over to PSR12 with a few, selective exceptions:
* Constant visibility will not be demanded as the minimum PHP requirement of PHPCS is PHP 5.4 and constant visibility did not become available until PHP 7.1.
* The first condition of a multi-line control structure is allowed to be on the same line as the control structure keyword (PSR2 style).
Includes updating the Readme to reflect this change.
Includes removing some individual rule includes which are now already included via PSR12.
**Note:** PSR12 enforces a blank line between each of the file header blocks.
This rule can currently not (yet) be turned off in a modular way, i.e. for just one block. It is either on or off.
This rule conflicts with the common practice of having no blank line between the PHP open tag and the file docblock.
To turn this rule off, add `<exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/>` to the project specific ruleset, like is done in this PR for the PHPCSDevTools native project ruleset.1 parent d2f355b commit 544855b
3 files changed
+21
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| |||
60 | 68 | | |
61 | 69 | | |
62 | 70 | | |
63 | | - | |
| 71 | + | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
92 | | - | |
93 | 100 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
| |||
0 commit comments