Skip to content

Commit a432174

Browse files
author
pueppiblue
committed
update ruleset for BC in slevomat/coding-standard 6.0
* exclude src/Kernel.php since its native to symfony * TypeHintDeclarationSniff is dead, long live ParameterTypeHintSniff, PropertyTypeHintSniff, ReturnTypeHintSniff and UselessFunctionDocCommentSniff * ControlStructureSpacingSniff is dead, long live BlockControlStructureSpacingSniff and JumpStatementsSpacingSniff (thanks to @grongor)
1 parent 093dd6b commit a432174

File tree

1 file changed

+8
-36
lines changed

1 file changed

+8
-36
lines changed

ProjektMOTORCodingStandard/ruleset.xml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
<exclude name="SlevomatCodingStandard.Classes.TraitUseSpacing.IncorrectLinesCountBeforeFirstUse" />
3030
<exclude name="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment.OneLinePropertyComment" />
3131
<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectLinesCountBetweenDifferentAnnotationsTypes" />
32-
<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountBeforeControlStructure" />
33-
<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountAfterControlStructure" />
32+
<exclude name="SlevomatCodingStandard.Commenting.UselessFunctionDocCommentSniff" />
33+
<exclude name="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing" />
3434
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowEmpty.DisallowedEmpty" />
3535
<!-- cause they are allowed and wanted in symfony -->
3636
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison.DisallowedYodaComparison" />
@@ -51,11 +51,11 @@
5151
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators"/>
5252
<exclude name="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax.DisallowedArrayTypeHintSyntax"/>
5353
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint" />
54-
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/>
55-
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/>
56-
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessDocComment"/>
57-
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessParameterAnnotation"/>
58-
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.UselessReturnAnnotation"/>
54+
55+
<!-- sniffs should not be excluded since annotation sniffs are moved to UselessFunctionDocCommentSniff -->
56+
<!-- <exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHintSniff"/>-->
57+
<!-- <exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHintSniff"/>-->
58+
<!-- <exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHintSniff"/>-->
5959
</rule>
6060

6161
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
@@ -87,35 +87,6 @@
8787
<exclude-pattern>src/Kernel.php</exclude-pattern>
8888
</rule>
8989

90-
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
91-
<properties>
92-
<property
93-
name="usefulAnnotations"
94-
type="array"
95-
value="
96-
@after,
97-
@before,
98-
@dataProvider,
99-
@deprecated,
100-
@required,
101-
@see,
102-
@ApiDoc,
103-
@Assert\,
104-
@QueryParam,
105-
@ORM\,
106-
@ParamConverter,
107-
@Route,
108-
@Template,
109-
@Security,
110-
@Method,
111-
@IsGranted,
112-
@Operation
113-
"
114-
/>
115-
<property name="enableEachParameterAndReturnInspection" value="true"/>
116-
</properties>
117-
</rule>
118-
11990
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
12091
<properties>
12192
<property name="linesCountAfterOpeningBrace" value="0"/>
@@ -131,6 +102,7 @@
131102
</rule>
132103

133104
<exclude-pattern>./src/Migrations/*</exclude-pattern>
105+
<exclude-pattern>./src/Kernel.php</exclude-pattern>
134106
<exclude-pattern>./public/index.php</exclude-pattern>
135107
<exclude-pattern>./config/bundles.php</exclude-pattern>
136108
<exclude-pattern>./config/bootstrap.php</exclude-pattern>

0 commit comments

Comments
 (0)