Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Freigang committed Dec 3, 2021
2 parents e5c93dd + 4e729ef commit fd27abf
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions ProjektMOTORCodingStandard/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml"><!-- relative path to your ruleset.xml -->
<!-- keep it for debugging reasons to be able to list all rules vendor/bin/phpcs -e | grep SlevomatCodingStandard -->
<!--<exclude name="*" />-->

<exclude name="SlevomatCodingStandard.Files.FunctionLength.FunctionLength" />
<exclude name="SlevomatCodingStandard.Functions.FunctionLength.FunctionLength" />
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall.MissingTrailingComma" />
<exclude name="SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall.DisallowedTrailingComma" />
<exclude name="SlevomatCodingStandard.Functions.DisallowNamedArguments.DisallowedNamedArgument" />
<exclude name="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion" />
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration.MissingTrailingComma" />
<exclude name="SlevomatCodingStandard.Classes.ClassStructure.IncorrectGroupOrder" />
<exclude name="SlevomatCodingStandard.PHP.DisallowDirectMagicInvokeCall.DisallowDirectMagicInvokeCall" />
<exclude name="SlevomatCodingStandard.Functions.RequireArrowFunction.RequiredArrowFunction" />

<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
<exclude name="SlevomatCodingStandard.Functions.DisallowEmptyFunction.EmptyFunction" />
<exclude name="SlevomatCodingStandard.Whitespaces.DuplicateSpaces.DuplicateSpaces" />
Expand All @@ -37,6 +49,7 @@
<exclude name="SlevomatCodingStandard.Files.LineLength.LineTooLong" />
<exclude name="SlevomatCodingStandard.PHP.RequireExplicitAssertion.RequiredExplicitAssertion" />
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces.NonFullyQualified" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming.SuperfluousSuffix" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix" />
<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator" />
<exclude name="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing.IncorrectLinesCountBeforeControlStructure" />
Expand Down Expand Up @@ -81,6 +94,33 @@
<!-- <exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHintSniff"/>-->
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>tests/**Test*.php</exclude-pattern>
<exclude-pattern>src/Form/Type/*Type.php</exclude-pattern>
<exclude-pattern>src/Doctrine/*Extension.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
<exclude-pattern>src/Controller/*Controller.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
<exclude-pattern>src/Security/UserProvider.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.Classes.ForbiddenPublicProperty.ForbiddenPublicProperty">
<exclude-pattern>src/Dto/*Request.php</exclude-pattern>
<exclude-pattern>src/Entity/*Request.php</exclude-pattern>
<exclude-pattern>src/Validator/Constraints/*.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
<exclude-pattern>tests/**Test*.php</exclude-pattern>
</rule>
<rule ref="Symfony.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>tests/Context/*Context.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true"/>
Expand Down Expand Up @@ -147,6 +187,12 @@
</properties>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="linesCountBeforeDeclare" value="0" />
</properties>
</rule>

<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="180" />
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"require": {
"escapestudios/symfony2-coding-standard": "^3.5",
"slevomat/coding-standard": "^6.0",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.0"
},
"support" : {
Expand Down

0 comments on commit fd27abf

Please # to comment.