|
92 | 92 | <rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/> |
93 | 93 |
|
94 | 94 | <!-- Require comma after last element in a multi-line method/function call --> |
95 | | - <rule ref="SlevomatCodingStandard.Functions.TrailingCommaInCall"/> |
| 95 | + <rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/> |
96 | 96 |
|
97 | 97 | <!-- Require arrow functions for simple functions. --> |
98 | 98 | <rule ref="SlevomatCodingStandard.Functions.RequireArrowFunction"/> |
|
186 | 186 | <!-- Require consistent spacing for control structures (add a line break) --> |
187 | 187 | <rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing"> |
188 | 188 | <properties> |
189 | | - <property name="tokensToCheck" type="array"> |
190 | | - <element value="T_RETURN"/> |
191 | | - <element value="T_THROW"/> |
192 | | - <element value="T_BREAK"/> |
193 | | - <element value="T_CONTINUE"/> |
| 189 | + <property name="jumpStatements" type="array"> |
| 190 | + <element value="break"/> |
| 191 | + <element value="continue"/> |
| 192 | + <element value="return"/> |
| 193 | + <element value="throw"/> |
194 | 194 | </property> |
195 | 195 | </properties> |
196 | 196 | </rule> |
|
310 | 310 | </rule> |
311 | 311 |
|
312 | 312 | <!-- Require presence of declare(strict_types=1) --> |
313 | | - <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing"/> |
| 313 | + <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> |
| 314 | + <properties> |
| 315 | + <!-- |
| 316 | + Two newlines accounts for 1 newline, the file header comment, |
| 317 | + and 1 more newline before declare(strict_types=1). |
| 318 | + --> |
| 319 | + <property name="linesCountBeforeDeclare" value="2"/> |
| 320 | + <property name="linesCountAfterDeclare" value="1"/> |
| 321 | + <property name="spacesCountAroundEqualsSign" value="0"/> |
| 322 | + </properties> |
| 323 | + </rule> |
314 | 324 |
|
315 | 325 | <!-- Require use of short versions of scalar types (i.e. int instead of integer) --> |
316 | 326 | <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/> |
|
421 | 431 | <!-- Require space around logical operators --> |
422 | 432 | <rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/> |
423 | 433 |
|
| 434 | + <rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat"> |
| 435 | + <properties> |
| 436 | + <property name="withSpaces" value="yes"/> |
| 437 | + <property name="nullPosition" value="last"/> |
| 438 | + </properties> |
| 439 | + </rule> |
| 440 | + |
424 | 441 | <!-- Forbid spaces around '->' operator --> |
425 | 442 | <rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"> |
426 | 443 | <properties> |
|
0 commit comments