Skip to content

Commit aed9fa4

Browse files
author
Robert Freigang
committed
Add some common project specific exclusion roles
mostly based on api platform and easy admin bundle
1 parent d59554b commit aed9fa4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

ProjektMOTORCodingStandard/ruleset.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<exclude name="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
5353
<exclude name="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing" />
5454
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowEmpty.DisallowedEmpty" />
55+
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator.DisallowedShortTernaryOperator" />
5556
<!-- Hello PHP 8 -->
5657
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowNullSafeObjectOperator.DisallowedNullSafeObjectOperator" />
5758
<!-- cause they are allowed and wanted in symfony -->
@@ -86,6 +87,28 @@
8687
</properties>
8788
</rule>
8889

90+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
91+
<exclude-pattern>src/DataTransformer/*.php</exclude-pattern>
92+
</rule>
93+
94+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
95+
<exclude-pattern>src/DataProvider/*.php</exclude-pattern>
96+
<exclude-pattern>src/DataTransformer/*.php</exclude-pattern>
97+
</rule>
98+
99+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint">
100+
<exclude-pattern>src/Controller/Admin/*Controller.php</exclude-pattern>
101+
<exclude-pattern>src/Security/Voter/*Voter.php</exclude-pattern>
102+
<exclude-pattern>src/DataTransformer/*.php</exclude-pattern>
103+
</rule>
104+
105+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
106+
<exclude-pattern>tests/Context/EmailTrait.php</exclude-pattern>
107+
<exclude-pattern>src/DataProvider/*.php</exclude-pattern>
108+
<exclude-pattern>src/DataTransformer/*.php</exclude-pattern>
109+
<exclude-pattern>src/Controller/Admin/*.php</exclude-pattern>
110+
</rule>
111+
89112
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation">
90113
<exclude-pattern>tests/**Context*.php</exclude-pattern>
91114
</rule>

0 commit comments

Comments
 (0)