|
11 | 11 | <file>src</file>
|
12 | 12 | <file>tests</file>
|
13 | 13 |
|
14 |
| - <rule ref="PSR2"/> |
| 14 | + <rule ref="Doctrine" /> |
15 | 15 |
|
16 |
| - <rule ref="Generic.Formatting.SpaceAfterCast" /> |
17 |
| - <rule ref="Generic.Formatting.SpaceAfterNot" /> |
18 |
| - <rule ref="Generic.Arrays.DisallowLongArraySyntax" /> |
19 |
| - |
20 |
| - <rule ref="Squiz.Strings.ConcatenationSpacing"> |
21 |
| - <properties> |
22 |
| - <property name="spacing" value="1"/> |
23 |
| - <property name="ignoreNewlines" value="true"/> |
24 |
| - </properties> |
25 |
| - </rule> |
26 |
| - |
27 |
| - <rule ref="Generic.Formatting.MultipleStatementAlignment"> |
28 |
| - <properties> |
29 |
| - <property name="error" value="true"/> |
30 |
| - </properties> |
31 |
| - </rule> |
32 |
| - |
33 |
| - <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace"> |
34 |
| - <exclude-pattern>*/example/*</exclude-pattern> |
35 |
| - </rule> |
36 | 16 | <rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
|
37 | 17 | <exclude-pattern>*/tests\/Base\/StreamStub/*</exclude-pattern>
|
38 | 18 | </rule>
|
39 | 19 |
|
40 |
| - <!-- strict rules --> |
41 |
| - <rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators" /> |
42 |
| - <rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly" /> |
43 |
| - <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition" /> |
44 |
| - <rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses" /> |
45 |
| - <rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements" /> |
46 |
| - <rule ref="SlevomatCodingStandard.Namespaces.UseFromSameNamespace" /> |
47 |
| - <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch" /> |
48 |
| - <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma" /> |
49 |
| - <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison" /> |
50 |
| - <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints" /> |
51 |
| - <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility" /> |
52 |
| - <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" /> |
53 |
| - <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing" /> |
54 |
| - <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse" /> |
55 |
| - <rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine" /> |
56 |
| - <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash" /> |
57 |
| - <rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration" /> |
58 |
| - <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing" /> |
59 |
| - <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses" /> |
60 |
| - |
61 |
| - <rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"> |
62 |
| - <properties> |
63 |
| - <property name="allowFullyQualifiedGlobalClasses" type="boolean" value="true"/> |
64 |
| - <property name="allowFullyQualifiedGlobalFunctions" type="boolean" value="true"/> |
65 |
| - <property name="allowFullyQualifiedGlobalConstants" type="boolean" value="true"/> |
66 |
| - <property name="allowFullyQualifiedNameForCollidingClasses" type="boolean" value="true"/> |
67 |
| - </properties> |
68 |
| - </rule> |
69 |
| - |
70 |
| - <rule ref="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces"> |
71 |
| - <properties> |
72 |
| - <property name="linesCountAfterOpeningBrace" value="0"/> |
73 |
| - <property name="linesCountBeforeClosingBrace" value="0"/> |
74 |
| - </properties> |
| 20 | + <rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace"> |
| 21 | + <exclude-pattern>*/example/*</exclude-pattern> |
75 | 22 | </rule>
|
76 |
| - |
77 |
| - <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"> |
78 |
| - <properties> |
79 |
| - <property name="enableEachParameterAndReturnInspection" value="true"/> |
80 |
| - <property name="traversableTypeHints" type="array" value="Doctrine\Common\Collections\Collection"/> |
81 |
| - <property |
82 |
| - name="usefulAnnotations" |
83 |
| - type="array" |
84 |
| - value=" |
85 |
| - @before, |
86 |
| - @beforeClass, |
87 |
| - @after, |
88 |
| - @afterClass, |
89 |
| - @test, |
90 |
| - @dataProvider, |
91 |
| - @deprecated, |
92 |
| - @expectedException, |
93 |
| - @expectedExceptionMessage, |
94 |
| - @expectedExceptionMessageRegExp, |
95 |
| - @expectedExceptionCode, |
96 |
| - @expectedDeprecation, |
97 |
| - @group, |
98 |
| - @internal, |
99 |
| - @link, |
100 |
| - @see, |
101 |
| - @throws |
102 |
| - " |
103 |
| - /> |
104 |
| - </properties> |
| 23 | + <rule ref="Squiz.Classes.ClassFileName.NoMatch"> |
| 24 | + <exclude-pattern>*/example/*</exclude-pattern> |
105 | 25 | </rule>
|
106 |
| - |
107 |
| - <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"> |
108 |
| - <properties> |
109 |
| - <property name="searchAnnotations" type="boolean" value="true"/> |
110 |
| - </properties> |
| 26 | + <rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName"> |
| 27 | + <exclude-pattern>*/example/*</exclude-pattern> |
111 | 28 | </rule>
|
112 | 29 |
|
| 30 | + <!-- Require presence of declare(strict_types=1) --> |
113 | 31 | <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
114 | 32 | <properties>
|
115 |
| - <property name="newlinesCountBetweenOpenTagAndDeclare" value="1" /> |
116 |
| - <property name="spacesCountAroundEqualsSign" value="0" /> |
| 33 | + <property name="newlinesCountBetweenOpenTagAndDeclare" value="1"/> |
| 34 | + <property name="spacesCountAroundEqualsSign" value="0"/> |
| 35 | + <property name="newlinesCountAfterDeclare" value="2"/> |
117 | 36 | </properties>
|
118 | 37 | </rule>
|
119 | 38 |
|
120 |
| - <rule ref="Squiz.Strings.DoubleQuoteUsage"/> |
121 |
| - <rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar"> |
122 |
| - <message>Variable "%s" not allowed in double quoted string; use sprintf() or concatenation instead</message> |
123 |
| - </rule> |
124 |
| - |
125 |
| - <rule ref="Squiz.Arrays.ArrayBracketSpacing"/> |
126 |
| - |
127 |
| - <rule ref="Squiz.Arrays.ArrayDeclaration"> |
128 |
| - <exclude name="Squiz.Arrays.ArrayDeclaration.KeyNotAligned"/> |
129 |
| - <exclude name="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed"/> |
130 |
| - <exclude name="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned"/> |
131 |
| - <exclude name="Squiz.Arrays.ArrayDeclaration.ValueNotAligned"/> |
132 |
| - </rule> |
133 |
| - |
134 |
| - <rule ref="Squiz.Strings.EchoedStrings"/> |
135 |
| - <rule ref="Squiz.WhiteSpace.CastSpacing"/> |
136 |
| - <rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace"/> |
137 |
| - <rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/> |
138 |
| - <rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/> |
139 |
| - <rule ref="Generic.Files.EndFileNewline"/> |
140 |
| - <rule ref="Generic.WhiteSpace.ScopeIndent"/> |
141 |
| - |
142 |
| - <rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"> |
| 39 | + <!-- Require space around colon in return types --> |
| 40 | + <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"> |
143 | 41 | <properties>
|
144 |
| - <property name="ignoreNewlines" value="true"/> |
| 42 | + <property name="spacesCountBeforeColon" value="0"/> |
145 | 43 | </properties>
|
146 | 44 | </rule>
|
147 |
| - |
148 |
| - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"> |
149 |
| - <properties> |
150 |
| - <property name="ignoreBlankLines" value="false"/> |
151 |
| - </properties> |
152 |
| - </rule> |
153 |
| - <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"> |
154 |
| - <severity>5</severity> |
155 |
| - </rule> |
156 |
| - |
157 |
| - <rule ref="Generic.CodeAnalysis.EmptyStatement"> |
158 |
| - <exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH"/> |
159 |
| - </rule> |
160 |
| - |
161 |
| - <rule ref="Squiz.PHP.NonExecutableCode"/> |
162 |
| - |
163 |
| - <rule ref="Squiz.Scope.StaticThisUsage"/> |
164 |
| - <rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/> |
165 |
| - <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/> |
166 |
| - <rule ref="Squiz.Functions.GlobalFunction"/> |
167 |
| - <rule ref="Squiz.PHP.GlobalKeyword"/> |
168 |
| - <rule ref="Squiz.PHP.InnerFunctions"/> |
169 |
| - <rule ref="Generic.PHP.DeprecatedFunctions"/> |
170 |
| - <rule ref="Generic.PHP.ForbiddenFunctions"/> |
171 |
| - <rule ref="Squiz.Operators.ValidLogicalOperators"/> |
172 |
| - <rule ref="Squiz.PHP.LowercasePHPFunctions"/> |
173 |
| - <rule ref="Generic.PHP.BacktickOperator"/> |
174 |
| - <rule ref="Generic.PHP.DisallowShortOpenTag"/> |
175 |
| - <rule ref="Generic.PHP.SAPIUsage"/> |
176 |
| - <rule ref="PEAR.Commenting.InlineComment"/> |
177 |
| - |
178 |
| - <rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants"> |
179 |
| - <exclude-pattern>*/example/*</exclude-pattern> |
180 |
| - </rule> |
181 |
| - <rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"> |
182 |
| - <exclude-pattern>*/example/*</exclude-pattern> |
183 |
| - </rule> |
184 | 45 | </ruleset>
|
185 |
| - |
0 commit comments