Skip to content

Commit a07e6e1

Browse files
committed
Update php codesniffer rules
1 parent cdf3473 commit a07e6e1

File tree

1 file changed

+48
-7
lines changed

1 file changed

+48
-7
lines changed

phpcs.xml

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?xml version="1.0"?>
2-
<ruleset name="PHPStan Doctrine">
2+
<ruleset name="PHPStan TYPO3">
33
<rule ref="vendor/consistence/coding-standard/Consistence/ruleset.xml">
4-
<exclude name="Squiz.Functions.GlobalFunction.Found"/>
4+
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat"/>
55
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>
66
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
7-
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions"/>
87
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/>
98
<exclude name="Consistence.Exceptions.ExceptionDeclaration"/>
9+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
10+
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch"/>
1011
</rule>
1112
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
1213
<properties>
@@ -18,14 +19,54 @@
1819
<property name="newlinesCountBetweenOpenTagAndDeclare" value="0"/>
1920
</properties>
2021
</rule>
21-
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
22+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
2223
<properties>
2324
<property name="enableObjectTypeHint" value="false"/>
2425
</properties>
26+
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/>
2527
</rule>
28+
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
29+
<properties>
30+
<property name="enableNativeTypeHint" value="false"/>
31+
</properties>
32+
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
33+
</rule>
34+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
35+
<properties>
36+
<property name="enableObjectTypeHint" value="false"/>
37+
</properties>
38+
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
39+
</rule>
40+
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure.UnusedInheritedVariable"/>
41+
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException"/>
42+
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable"/>
2643
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
27-
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
28-
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
44+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/>
45+
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit">
46+
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit.UselessElseIf"/>
47+
</rule>
2948
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
3049
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
31-
</ruleset>
50+
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator"/>
51+
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
52+
<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
53+
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
54+
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
55+
<rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/>
56+
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
57+
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing"/>
58+
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
59+
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
60+
<!--<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>-->
61+
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
62+
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
63+
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
64+
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses"/>
65+
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
66+
<properties>
67+
<property name="spacing" value="1" />
68+
<property name="spacingBeforeFirst" value="1"/>
69+
<property name="spacingAfterLast" value="1"/>
70+
</properties>
71+
</rule>
72+
</ruleset>

0 commit comments

Comments
 (0)