|
4 | 4 | Proton PHP Coding Standard |
5 | 5 | </description> |
6 | 6 |
|
7 | | - <rule ref="PSR2"> |
| 7 | + <rule ref="PSR12"> |
8 | 8 | <!-- Checked by SlevomatCodingStandard.Namespaces.UseSpacing --> |
9 | 9 | <exclude name="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse"/> |
10 | 10 | <!-- Checked by SlevomatCodingStandard.Namespaces.NamespaceSpacing --> |
11 | 11 | <exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/> |
| 12 | + <exclude name="PSR12.Files.FileHeader.SpacingAfterBlock"/> |
| 13 | + <exclude name="PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine"/> <!-- Clashes with PSR2 SpacingAfterOpenBrace --> |
12 | 14 | </rule> |
13 | 15 |
|
14 | | - <rule ref="PSR2.Namespaces.UseDeclaration"> |
15 | | - <!-- Allows compound namespaces --> |
16 | | - <exclude-pattern>*</exclude-pattern> |
17 | | - </rule> |
18 | | - |
19 | | - <rule ref="PSR12.Namespaces.CompoundNamespaceDepth"/> |
20 | | - <rule ref="PSR12.Functions.NullableTypeDeclaration"/> |
21 | | - |
22 | 16 | <rule ref="PEAR.Commenting.InlineComment"/> |
23 | 17 |
|
24 | 18 | <rule ref="Generic.Commenting.Todo"/> |
|
33 | 27 | <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/> |
34 | 28 | <rule ref="Generic.Classes.DuplicateClassName"/> |
35 | 29 | <rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/> |
| 30 | + <rule ref="Generic.WhiteSpace.SpreadOperatorSpacingAfter"/> |
36 | 31 | <rule ref="Generic.VersionControl.GitMergeConflict"/> |
37 | 32 | <rule ref="Generic.Files.OneClassPerFile"/> |
38 | 33 | <rule ref="Generic.Files.OneInterfacePerFile"/> |
|
168 | 163 | <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> |
169 | 164 | <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/> |
170 | 165 |
|
| 166 | + <!-- Require presence of declare(strict_types=1) --> |
| 167 | + <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> |
| 168 | + <properties> |
| 169 | + <property name="newlinesCountBetweenOpenTagAndDeclare" value="2"/> |
| 170 | + <property name="spacesCountAroundEqualsSign" value="0"/> |
| 171 | + <property name="newlinesCountAfterDeclare" value="2"/> |
| 172 | + </properties> |
| 173 | + </rule> |
| 174 | + |
171 | 175 | <!-- <rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"> |
172 | 176 | <properties> |
173 | 177 | <property name="ignoreStandaloneIfInScope" value="0"/> |
|
0 commit comments