Skip to content

Commit c72b715

Browse files
authored
Adopt slevomat rules introduced in version 7.x
1 parent 60cd371 commit c72b715

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

ProjektMOTORCodingStandard/ruleset.xml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@
2222
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml"><!-- relative path to your ruleset.xml -->
2323
<!-- keep it for debugging reasons to be able to list all rules vendor/bin/phpcs -e | grep SlevomatCodingStandard -->
2424
<!--<exclude name="*" />-->
25+
26+
<exclude name="SlevomatCodingStandard.Files.FunctionLength.FunctionLength" />
27+
<exclude name="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength" />
28+
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall.MissingTrailingComma" />
29+
<exclude name="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall.DisallowedTrailingComma" />
30+
<exclude name="SlevomatCodingStandard.Functions.DisallowNamedArguments.DisallowedNamedArgument" />
31+
<exclude name="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion" />
32+
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration.MissingTrailingComma" />
33+
<exclude name="SlevomatCodingStandard.Classes.ClassStructure.IncorrectGroupOrder" />
34+
<exclude name="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall.DisallowDirectMagicInvokeCall" />
35+
<exclude name="SlevomatCodingStandard.Functions.RequireArrowFunction.RequiredArrowFunction" />
36+
2537
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
2638
<exclude name="SlevomatCodingStandard.Functions.DisallowEmptyFunction.EmptyFunction" />
2739
<exclude name="SlevomatCodingStandard.Whitespaces.DuplicateSpaces.DuplicateSpaces" />
@@ -37,6 +49,7 @@
3749
<exclude name="SlevomatCodingStandard.Files.LineLength.LineTooLong" />
3850
<exclude name="SlevomatCodingStandard.PHP.RequireExplicitAssertion.RequiredExplicitAssertion" />
3951
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces.NonFullyQualified" />
52+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix" />
4053
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix" />
4154
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator" />
4255
<exclude name="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing.IncorrectLinesCountBeforeControlStructure" />
@@ -78,6 +91,33 @@
7891
<!-- <exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHintSniff"/>-->
7992
</rule>
8093

94+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
95+
<exclude-pattern>tests/**Test*.php</exclude-pattern>
96+
<exclude-pattern>src/Form/Type/*Type.php</exclude-pattern>
97+
<exclude-pattern>src/Doctrine/*Extension.php</exclude-pattern>
98+
</rule>
99+
100+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
101+
<exclude-pattern>src/Controller/*Controller.php</exclude-pattern>
102+
</rule>
103+
104+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
105+
<exclude-pattern>src/Security/UserProvider.php</exclude-pattern>
106+
</rule>
107+
108+
<rule ref="SlevomatCodingStandard.Classes.ForbiddenPublicProperty.ForbiddenPublicProperty">
109+
<exclude-pattern>src/Dto/*Request.php</exclude-pattern>
110+
<exclude-pattern>src/Entity/*Request.php</exclude-pattern>
111+
<exclude-pattern>src/Validator/Constraints/*.php</exclude-pattern>
112+
</rule>
113+
114+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
115+
<exclude-pattern>tests/**Test*.php</exclude-pattern>
116+
</rule>
117+
<rule ref="Symfony.Commenting.FunctionComment.MissingParamTag">
118+
<exclude-pattern>tests/Context/*Context.php</exclude-pattern>
119+
</rule>
120+
81121
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
82122
<properties>
83123
<property name="searchAnnotations" value="true"/>
@@ -122,6 +162,12 @@
122162
</properties>
123163
</rule>
124164

165+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
166+
<properties>
167+
<property name="linesCountBeforeDeclare" value="0" />
168+
</properties>
169+
</rule>
170+
125171
<rule ref="Generic.Files.LineLength">
126172
<properties>
127173
<property name="lineLimit" value="150" />

0 commit comments

Comments
 (0)