Skip to content

Commit 05f53c0

Browse files
committed
Update of coding standard
1 parent 79c154b commit 05f53c0

File tree

2 files changed

+10
-28
lines changed

2 files changed

+10
-28
lines changed

InfinityloopCodingStandard/ruleset.xml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
2727
<exclude name="PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse"/>
2828
<exclude name="PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter"/>
29+
<!-- checked by SlevomatCodingStandard.Files.LineLength -->
30+
<exclude name="Generic.Files.LineLength"/>
2931
</rule>
3032
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
3133
<rule ref="Generic.Arrays.ArrayIndent">
@@ -53,7 +55,7 @@
5355
</rule>
5456
<rule ref="SlevomatCodingStandard.Files.LineLength">
5557
<properties>
56-
<property name="lineLengthLimit" value="140"/>
58+
<property name="lineLengthLimit" value="150"/>
5759
<property name="ignoreComments" value="true"/>
5860
<property name="ignoreImports" value="true"/>
5961
</properties>
@@ -354,6 +356,7 @@
354356
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit">
355357
<properties>
356358
<property name="ignoreStandaloneIfInScope" value="true"/>
359+
<property name="ignoreOneLineTrailingIf" value="true"/>
357360
</properties>
358361
</rule>
359362
<rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing">
@@ -457,21 +460,6 @@
457460
</properties>
458461
</rule>
459462
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
460-
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
461-
<properties>
462-
<property name="enableObjectTypeHint" value="true"/>
463-
</properties>
464-
</rule>
465-
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
466-
<properties>
467-
<property name="enableNativeTypeHint" value="true"/>
468-
</properties>
469-
</rule>
470-
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
471-
<properties>
472-
<property name="enableObjectTypeHint" value="true"/>
473-
</properties>
474-
</rule>
475463
<rule ref="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint">
476464
<exclude-pattern>tests/</exclude-pattern>
477465
</rule>
@@ -491,7 +479,6 @@
491479
<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
492480
<rule ref="SlevomatCodingStandard.Functions.UselessParameterDefaultValue"/>
493481
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
494-
<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>
495482
<rule ref="SlevomatCodingStandard.Functions.TrailingCommaInCall"/>
496483
<rule ref="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator"/>
497484
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,6 @@ Detailed list of Slevomat sniffs with configured settings. Some sniffs are not i
8282

8383
#### Functional
8484

85-
- SlevomatCodingStandard.TypeHints.ParameterTypeHint
86-
- enableObjectTypeHint: true
87-
- traversableTypeHints: false
88-
- SlevomatCodingStandard.TypeHints.PropertyTypeHint
89-
- enableNativeTypeHint: true
90-
- traversableTypeHints: false
91-
- SlevomatCodingStandard.TypeHints.ReturnTypeHint
92-
- enableObjectTypeHint: true
93-
- traversableTypeHints: false
9485
- SlevomatCodingStandard.TypeHints.UselessConstantTypeHint
9586
- SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly
9687
- SlevomatCodingStandard.TypeHints.DeclareStrictTypes
@@ -107,6 +98,7 @@ Detailed list of Slevomat sniffs with configured settings. Some sniffs are not i
10798
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator
10899
- SlevomatCodingStandard.ControlStructures.EarlyExit
109100
- ignoreStandaloneIfInScope: true
101+
- ignoreOneLineTrailingIf: true
110102
- SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator
111103
- SlevomatCodingStandard.Functions.StaticClosure
112104
- SlevomatCodingStandard.Operators.DisallowEqualOperators
@@ -117,14 +109,16 @@ Excluded sniffs:
117109

118110
- SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants
119111
- SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators
112+
- SlevomatCodingStandard.TypeHints.ParameterTypeHint
113+
- SlevomatCodingStandard.TypeHints.PropertyTypeHint
114+
- SlevomatCodingStandard.TypeHints.ReturnTypeHint
120115

121116
#### Cleaning
122117

123118
- SlevomatCodingStandard.Classes.UnusedPrivateElements
124119
- alwaysUsedPropertiesAnnotations: false
125120
- alwaysUsedPropertiesSuffixes: false
126121
- SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure
127-
- SlevomatCodingStandard.Functions.UnusedParameter
128122
- SlevomatCodingStandard.Functions.UselessParameterDefaultValue
129123
- SlevomatCodingStandard.Namespaces.UnusedUses
130124
- searchAnnotations: false
@@ -148,6 +142,7 @@ Excluded sniffs:
148142

149143
- SlevomatCodingStandard.PHP.DisallowReference
150144
- SlevomatCodingStandard.Functions.DisallowEmptyFunction
145+
- SlevomatCodingStandard.Functions.UnusedParameter
151146

152147
#### Formatting
153148

@@ -245,7 +240,7 @@ Excluded sniffs:
245240
- SlevomatCodingStandard.ControlStructures.UselessTernaryOperator
246241
- assumeAllConditionExpressionsAreAlreadyBoolean: false
247242
- SlevomatCodingStandard.Files.LineLength
248-
- lineLengthLimit: 140
243+
- lineLengthLimit: 150
249244
- ignoreComments: true
250245
- ignoreImports: true
251246
- SlevomatCodingStandard.Classes.ParentCallSpacing

0 commit comments

Comments
 (0)