|
106 | 106 | <property name="fixable" value="true"/> |
107 | 107 | </properties> |
108 | 108 | </rule> |
| 109 | + <!-- Forbid empty lines around type declarations --> |
| 110 | + <rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces"> |
| 111 | + <properties> |
| 112 | + <property name="linesCountAfterOpeningBrace" value="0"/> |
| 113 | + <property name="linesCountBeforeClosingBrace" value="0"/> |
| 114 | + </properties> |
| 115 | + </rule> |
109 | 116 | <!-- Require usage of ::class instead of __CLASS__, get_class(), get_class($this), get_called_class() and get_parent_class() --> |
110 | 117 | <rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/> |
111 | 118 | <!-- Forbid uses of multiple traits separated by comma --> |
|
193 | 200 | <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/> |
194 | 201 | <!-- Forbid fancy yoda conditions --> |
195 | 202 | <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/> |
196 | | - <!-- Forbid weak comparisons --> |
197 | | - <rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/> |
198 | 203 | <!-- Require usage of early exit --> |
199 | 204 | <rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/> |
200 | 205 | <!-- Require language constructs without parentheses --> |
|
204 | 209 | <!-- Require usage of null coalesce operator when possible --> |
205 | 210 | <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/> |
206 | 211 | <!-- Forbid usage of conditions when a simple return can be used --> |
207 | | - <rule ref="SlevomatCodingStandard.ControlStructures.UselessConditionWithReturn"/> |
| 212 | + <rule ref="SlevomatCodingStandard.ControlStructures.UselessIfConditionWithReturn"/> |
| 213 | + <!-- Forbid usage of boolean-only ternary operator usage (e.g. $foo ? true : false) --> |
| 214 | + <rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/> |
208 | 215 | <!-- Forbid useless unreachable catch blocks --> |
209 | 216 | <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/> |
210 | 217 | <!-- Require using Throwable instead of Exception --> |
|
214 | 221 | <!-- Forbid unused variables passed to closures via `use` --> |
215 | 222 | <rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/> |
216 | 223 | <!-- Require use statements to be alphabetically sorted --> |
217 | | - <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/> |
| 224 | + <rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"> |
| 225 | + <properties> |
| 226 | + <property name="psr12Compatible" value="false"/> |
| 227 | + </properties> |
| 228 | + </rule> |
218 | 229 | <!-- Forbid fancy group uses --> |
219 | 230 | <rule ref="SlevomatCodingStandard.Namespaces.DisallowGroupUse"/> |
220 | 231 | <!-- Forbid multiple use statements on same line --> |
|
255 | 266 | </rule> |
256 | 267 | <!-- Forbid useless alias for classes, constants and functions --> |
257 | 268 | <rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/> |
| 269 | + <!-- Forbid weak comparisons --> |
| 270 | + <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/> |
258 | 271 | <!-- Require the usage of assignment operators, eg `+=`, `.=` when possible --> |
259 | 272 | <rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/> |
260 | 273 | <!-- forbid argument unpacking for functions specialized by PHP VM --> |
|
312 | 325 | </rule> |
313 | 326 | <!-- Forbid useless @var for constants --> |
314 | 327 | <rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/> |
315 | | - <!-- Forbid empty lines around type declarations --> |
316 | | - <rule ref="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces"> |
317 | | - <properties> |
318 | | - <property name="linesCountAfterOpeningBrace" value="0"/> |
319 | | - <property name="linesCountBeforeClosingBrace" value="0"/> |
320 | | - </properties> |
321 | | - </rule> |
322 | 328 | <!-- Forbid duplicated variables assignments --> |
323 | 329 | <rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable"/> |
324 | 330 | <!-- Forbid useless variables --> |
|
0 commit comments