Skip to content

Commit 3037339

Browse files
committed
fixed sniffs conflict, readme
1 parent 43c2a37 commit 3037339

File tree

2 files changed

+41
-35
lines changed

2 files changed

+41
-35
lines changed

InfinityloopCodingStandard/ruleset.xml

+24-23
Original file line numberDiff line numberDiff line change
@@ -333,18 +333,18 @@
333333
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
334334
<rule ref="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing">
335335
<properties>
336-
<property name="tokensToCheck" type="array">
337-
<element value="T_SWITCH"/>
338-
<element value="T_TRY"/>
339-
<element value="T_IF"/>
340-
<element value="T_FOR"/>
341-
<element value="T_FOREACH"/>
342-
<element value="T_WHILE"/>
336+
<property name="linesCountBefore" value="1"/>
337+
<property name="linesCountBeforeFirst" value="0"/>
338+
<property name="linesCountAfter" value="1"/>
339+
<property name="linesCountAfterLast" value="0"/>
340+
<property name="controlStructures" type="array">
341+
<element value="switch"/>
342+
<element value="try"/>
343+
<element value="if"/>
344+
<element value="for"/>
345+
<element value="foreach"/>
346+
<element value="while"/>
343347
</property>
344-
<property name="linesCountBeforeControlStructure" value="1"/>
345-
<property name="linesCountBeforeFirstControlStructure" value="0"/>
346-
<property name="linesCountAfterControlStructure" value="1"/>
347-
<property name="linesCountAfterLastControlStructure" value="0"/>
348348
</properties>
349349
</rule>
350350
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch"/>
@@ -356,20 +356,21 @@
356356
</rule>
357357
<rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing">
358358
<properties>
359-
<property name="tokensToCheck" type="array">
360-
<element value="T_GOTO"/>
361-
<element value="T_THROW"/>
362-
<element value="T_YIELD"/>
363-
<element value="T_YIELD_FROM"/>
364-
<element value="T_CONTINUE"/>
365-
<element value="T_BREAK"/>
366-
<element value="T_RETURN"/>
359+
<property name="linesCountBefore" value="1"/>
360+
<property name="linesCountBeforeFirst" value="0"/>
361+
<property name="linesCountAfter" value="1"/>
362+
<property name="linesCountAfterLast" value="0"/>
363+
<property name="linesCountAfterWhenLastInCaseOrDefault" value="0"/>
364+
<property name="linesCountAfterWhenLastInLastCaseOrDefault" value="0"/>
365+
<property name="jumpStatements" type="array">
366+
<element value="goto"/>
367+
<element value="throw"/>
368+
<element value="yield"/>
369+
<element value="continue"/>
370+
<element value="break"/>
371+
<element value="return"/>
367372
</property>
368373
</properties>
369-
<property name="linesCountBeforeControlStructure" value="1"/>
370-
<property name="linesCountBeforeFirstControlStructure" value="0"/>
371-
<property name="linesCountAfterControlStructure" value="0"/>
372-
<property name="linesCountAfterLastControlStructure" value="0"/>
373374
</rule>
374375
<rule ref="SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator">
375376
<properties>

README.md

+17-12
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Detailed list of Slevomat sniffs with configured settings. Some sniffs are not i
107107
- ignoreStandaloneIfInScope: true
108108
- ignoreOneLineTrailingIf: true
109109
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator
110+
- SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator
110111
- SlevomatCodingStandard.Functions.StaticClosure
111112
- SlevomatCodingStandard.Operators.DisallowEqualOperators
112113
- SlevomatCodingStandard.Operators.RequireOnlyStandaloneIncrementAndDecrementOperators
@@ -122,9 +123,6 @@ Excluded sniffs:
122123

123124
#### Cleaning
124125

125-
- SlevomatCodingStandard.Classes.UnusedPrivateElements
126-
- alwaysUsedPropertiesAnnotations: false
127-
- alwaysUsedPropertiesSuffixes: false
128126
- SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure
129127
- SlevomatCodingStandard.Functions.UselessParameterDefaultValue
130128
- SlevomatCodingStandard.Namespaces.UnusedUses
@@ -144,6 +142,7 @@ Excluded sniffs:
144142
- ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach: true
145143
- SlevomatCodingStandard.Variables.UselessVariable
146144
- SlevomatCodingStandard.Exceptions.DeadCatch
145+
- SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch
147146

148147
Excluded sniffs:
149148

@@ -171,14 +170,16 @@ Excluded sniffs:
171170
- linesCountBeforeFirstControlStructure: 0
172171
- linesCountAfterControlStructure: 1
173172
- linesCountAfterLastControlStructure: 0
174-
- tokensToCheck: [T_SWITCH, T_TRY, T_IF, T_FOR, T_FOREACH, T_WHILE]
173+
- controlStructures: [switch, try, if, for, foreach, while]
175174
- SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing
176175
- allowSingleLineYieldStacking: whether or not to allow multiple yield/yield from statements in a row without blank lines.
177-
- linesCountBeforeControlStructure: 1
178-
- linesCountBeforeFirstControlStructure: 0
179-
- linesCountAfterControlStructure: 0
180-
- linesCountAfterLastControlStructure: 0
181-
- tokensToCheck: default
176+
- linesCountBefore: 1
177+
- linesCountBeforeFirst: 0
178+
- linesCountAfter: 0
179+
- linesCountAfterLast: 0
180+
- linesCountAfterWhenLastInCaseOrDefault: 0
181+
- linesCountAfterWhenLastInLastCaseOrDefault: 0
182+
- jumpStatements: [goto, throw, yield, continue, break, return]
182183
- SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses
183184
- SlevomatCodingStandard.ControlStructures.NewWithParentheses
184185
- SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator
@@ -188,7 +189,8 @@ Excluded sniffs:
188189
- ignoreMultiLine: false
189190
- SlevomatCodingStandard.ControlStructures.DisallowYodaComparison
190191
- SlevomatCodingStandard.Functions.DisallowArrowFunction
191-
- SlevomatCodingStandard.Functions.TrailingCommaInCall
192+
- SlevomatCodingStandard.Functions.RequireTrailingCommaInCall
193+
- SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration
192194
- SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses
193195
- psr12Compatible: true
194196
- caseSensitive: true
@@ -220,9 +222,11 @@ Excluded sniffs:
220222
- SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue
221223
- SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing
222224
- SlevomatCodingStandard.TypeHints.PropertyTypeHintSpacing
225+
- SlevomatCodingStandard.TypeHints.UnionTypeHintFormat
226+
- withSpaces: no
227+
- shortNullable: yes
228+
- nullPosition: last
223229
- SlevomatCodingStandard.Namespaces.DisallowGroupUse
224-
- SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword
225-
- keywordsToCheck: T_EXTENDS, T_IMPLEMENETS, T_USE, T_NEW, T_THROW
226230
- SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions
227231
- specialExceptionNames: false
228232
- ignoredNames: default
@@ -237,6 +241,7 @@ Excluded sniffs:
237241
- SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation
238242
- SlevomatCodingStandard.Commenting.ForbiddenAnnotations
239243
- forbiddenAnnotations: @author, @created, @version, @package, @copyright, @license, @throws
244+
- SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion
240245
- SlevomatCodingStandard.Commenting.EmptyComment
241246
- SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration
242247
- SlevomatCodingStandard.Commenting.UselessFunctionDocComment

0 commit comments

Comments
 (0)