Skip to content

Commit fd27abf

Browse files
author
Robert Freigang
committed
2 parents e5c93dd + 4e729ef commit fd27abf

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
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" />
@@ -81,6 +94,33 @@
8194
<!-- <exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHintSniff"/>-->
8295
</rule>
8396

97+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
98+
<exclude-pattern>tests/**Test*.php</exclude-pattern>
99+
<exclude-pattern>src/Form/Type/*Type.php</exclude-pattern>
100+
<exclude-pattern>src/Doctrine/*Extension.php</exclude-pattern>
101+
</rule>
102+
103+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
104+
<exclude-pattern>src/Controller/*Controller.php</exclude-pattern>
105+
</rule>
106+
107+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
108+
<exclude-pattern>src/Security/UserProvider.php</exclude-pattern>
109+
</rule>
110+
111+
<rule ref="SlevomatCodingStandard.Classes.ForbiddenPublicProperty.ForbiddenPublicProperty">
112+
<exclude-pattern>src/Dto/*Request.php</exclude-pattern>
113+
<exclude-pattern>src/Entity/*Request.php</exclude-pattern>
114+
<exclude-pattern>src/Validator/Constraints/*.php</exclude-pattern>
115+
</rule>
116+
117+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
118+
<exclude-pattern>tests/**Test*.php</exclude-pattern>
119+
</rule>
120+
<rule ref="Symfony.Commenting.FunctionComment.MissingParamTag">
121+
<exclude-pattern>tests/Context/*Context.php</exclude-pattern>
122+
</rule>
123+
84124
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
85125
<properties>
86126
<property name="searchAnnotations" value="true"/>
@@ -147,6 +187,12 @@
147187
</properties>
148188
</rule>
149189

190+
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
191+
<properties>
192+
<property name="linesCountBeforeDeclare" value="0" />
193+
</properties>
194+
</rule>
195+
150196
<rule ref="Generic.Files.LineLength">
151197
<properties>
152198
<property name="lineLimit" value="180" />

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"escapestudios/symfony2-coding-standard": "^3.5",
20-
"slevomat/coding-standard": "^6.0",
20+
"slevomat/coding-standard": "^7.0",
2121
"squizlabs/php_codesniffer": "^3.0"
2222
},
2323
"support" : {

0 commit comments

Comments
 (0)