|
1 | 1 | <?xml version="1.0"?> |
2 | 2 | <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHPCSDev" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"> |
3 | 3 |
|
4 | | - <description>A PSR-2 based standard for use by sniff developers to check the code style of external PHPCS standards</description> |
| 4 | + <description>A PSR-12 based standard for use by sniff developers to check the code style of external PHPCS standards</description> |
5 | 5 |
|
6 | 6 | <!-- |
7 | 7 | #################################################################### |
|
28 | 28 |
|
29 | 29 | <!-- |
30 | 30 | #################################################################### |
31 | | - Code style: Check style for compliance with PSR2. |
| 31 | + Code style: Check style for compliance with PSR12. |
32 | 32 | #################################################################### |
33 | 33 | --> |
34 | | - <rule ref="PSR2"/> |
| 34 | + <rule ref="PSR12"> |
| 35 | + <!-- As PHP 5.4 is the minimum supported PHP version for PHP_CodeSniffer and |
| 36 | + most external standards, adding constant visibility is not (yet) an option. --> |
| 37 | + <exclude name="PSR12.Properties.ConstantVisibility"/> |
| 38 | + |
| 39 | + <!-- Allow for the first condition of a multi-line control structure to be on the same line |
| 40 | + as the control structure keyword. --> |
| 41 | + <exclude name="PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine"/> |
| 42 | + </rule> |
35 | 43 |
|
36 | 44 |
|
37 | 45 | <!-- |
|
60 | 68 | #################################################################### |
61 | 69 | --> |
62 | 70 |
|
63 | | - <!-- PSR2 appears to ignore blank lines for superfluous whitespace and in several other places. Let's fix that. --> |
| 71 | + <!-- PSR12 appears to ignore blank lines for superfluous whitespace and in several other places. Let's fix that. --> |
64 | 72 | <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> |
65 | 73 | <properties> |
66 | 74 | <property name="ignoreBlankLines" value="false"/> |
|
89 | 97 | </properties> |
90 | 98 | </rule> |
91 | 99 |
|
92 | | - <rule ref="Generic.PHP.LowerCaseType"/> |
93 | 100 | <rule ref="Generic.WhiteSpace.ArbitraryParenthesesSpacing"/> |
94 | | - <rule ref="PSR12.Classes.ClassInstantiation"/> |
95 | | - <rule ref="PSR12.Keywords.ShortFormTypeKeywords"/> |
96 | | - <rule ref="PSR12.Operators.OperatorSpacing"/> |
97 | 101 |
|
98 | 102 | <!-- Align the equal operator in assignment blocks. --> |
99 | 103 | <rule ref="Generic.Formatting.MultipleStatementAlignment"> |
|
0 commit comments