|
26 | 26 | <exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
|
27 | 27 | </rule>
|
28 | 28 |
|
| 29 | + <!-- Warn about TODOs and FIXMEs in code. --> |
| 30 | + <rule ref="Generic.Commenting.Fixme"/> |
| 31 | + <rule ref="Generic.Commenting.Todo"/> |
| 32 | + |
| 33 | + <!-- Forbid merge conflict artifacts left in files --> |
| 34 | + <rule ref="Generic.VersionControl.GitMergeConflict"/> |
| 35 | + |
29 | 36 | <!-- Force array element indentation with 4 spaces -->
|
30 | 37 | <rule ref="Generic.Arrays.ArrayIndent"/>
|
31 | 38 | <!-- Forbid `array(...)` -->
|
|
87 | 94 | <element key="show_source" value="highlight_file"/>
|
88 | 95 | <element key="sizeof" value="count"/>
|
89 | 96 | <element key="strchr" value="strstr"/>
|
| 97 | + <!-- Forbid 'empty()'; use more strict comparison instead --> |
| 98 | + <element key="empty" value="null"/> |
| 99 | + <!-- Forbid remaining debug functions in the code --> |
| 100 | + <element key="d" value="null"/> |
| 101 | + <element key="dd" value="null"/> |
| 102 | + <element key="dump" value="null"/> |
| 103 | + <element key="dump_d" value="null"/> |
| 104 | + <element key="var_dump" value="null"/> |
90 | 105 | </property>
|
91 | 106 | </properties>
|
92 | 107 | </rule>
|
|
121 | 136 | <property name="fixable" value="true"/>
|
122 | 137 | </properties>
|
123 | 138 | </rule>
|
| 139 | + <!-- Require one line between each class member --> |
| 140 | + <rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing"> |
| 141 | + <properties> |
| 142 | + <property name="linesCountBetweenMembers" value="1"/> |
| 143 | + </properties> |
| 144 | + </rule> |
124 | 145 | <!-- Forbid LSB for constants (static::FOO) -->
|
125 | 146 | <rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>
|
126 | 147 | <!-- Require that true, false, and null are lowercase -->
|
|
165 | 186 | @see,
|
166 | 187 | @uses,
|
167 | 188 | "/>
|
| 189 | + <!-- PHPUnit --> |
| 190 | + <element value="@test, @group, @dataProvider, @depends, @doesNotPerformAssertions, @runInSeparateProcess, @runTestsInSeparateProcesses"/> |
| 191 | + <element value="@expectedDeprecation, @expectedException, @expectedExceptionCode, @expectedExceptionMessage, @expectedExceptionMessageRegExp"/> |
| 192 | + <element value="@covers, @coversNothing, @coversDefaultClass"/> |
168 | 193 | <!-- Doctrine ORM and Extensions -->
|
169 | 194 | <element value="
|
170 | 195 | @ORM\,
|
|
177 | 202 | <element value="@param"/>
|
178 | 203 | <element value="@return"/>
|
179 | 204 | <element value="@throws"/>
|
| 205 | + <element value=" |
| 206 | + @psalm-var, |
| 207 | + @psalm-param, |
| 208 | + @psalm-return, |
| 209 | + "/> |
| 210 | + <element value=" |
| 211 | + @property, |
| 212 | + @property-read, |
| 213 | + @property-write, |
| 214 | + @psalm-property, |
| 215 | + @psalm-property-read, |
| 216 | + @psalm-proprty-write, |
| 217 | + "/> |
| 218 | + <element value=" |
| 219 | + @param-out, |
| 220 | + "/> |
| 221 | + <element value="@phpcsSuppress"/> |
180 | 222 | </property>
|
181 | 223 | </properties>
|
182 | 224 | </rule>
|
|
253 | 295 | </rule>
|
254 | 296 | <!-- Require language constructs without parentheses -->
|
255 | 297 | <rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
|
| 298 | + <!-- Require new instances with parentheses --> |
| 299 | + <rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/> |
256 | 300 | <!-- Require usage of null coalesce operator when possible -->
|
257 | 301 | <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
|
258 | 302 | <!-- Forbid usage of conditions when a simple return can be used -->
|
|
270 | 314 | <!-- Forbid unused variables passed to closures via `use` -->
|
271 | 315 | <rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
|
272 | 316 | <!-- Require use statements to be alphabetically sorted -->
|
273 |
| - <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/> |
| 317 | + <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"> |
| 318 | + <properties> |
| 319 | + <property name="psr12Compatible" value="true"/> |
| 320 | + <property name="caseSensitive" value="true"/> |
| 321 | + </properties> |
| 322 | + </rule> |
274 | 323 | <!-- Forbid fancy group uses -->
|
275 | 324 | <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/>
|
276 | 325 | <!-- Forbid multiple use statements on same line -->
|
|
315 | 364 | <rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
|
316 | 365 | <!-- Require no spacing after spread operator -->
|
317 | 366 | <rule ref="SlevomatCodingStandard.Operators.SpreadOperatorSpacing"/>
|
| 367 | + <!-- Require 0 spaces after the reference '&' operator --> |
| 368 | + <rule ref="SlevomatCodingStandard.PHP.ReferenceSpacing"> |
| 369 | + <properties> |
| 370 | + <property name="spacesCountAfterReference" value="0"/> |
| 371 | + </properties> |
| 372 | + </rule> |
318 | 373 | <!-- Forbid argument unpacking for functions specialized by PHP VM -->
|
319 | 374 | <rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking"/>
|
320 | 375 | <!-- Forbid `list(...)` syntax -->
|
|
0 commit comments