diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-07-23 05:52:40 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-07-23 05:52:40 +0300 |
commit | 00d35b6543259757b98a8a7b6f4950963a222b4b (patch) | |
tree | 2032a1973a8d1eec25a53ee71ab9e249adae8cd4 /phpcs.xml.dist | |
parent | 2358b9c4f9c8a7f19eccc8976f39aefb53e1076b (diff) |
Reduce severity instead of excluding phpcs rules
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'phpcs.xml.dist')
-rw-r--r-- | phpcs.xml.dist | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/phpcs.xml.dist b/phpcs.xml.dist index c4807cb87e..ae7e0f31c1 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -16,14 +16,35 @@ <exclude-pattern>*/twig-templates/*</exclude-pattern> <exclude-pattern>*/vendor/*</exclude-pattern> - <rule ref="PhpMyAdmin"> - <!-- Rules that should be followed, but are not required --> - <exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/> - <exclude name="SlevomatCodingStandard.Operators.DisallowEqualOperators"/> - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint"/> - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"/> - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/> - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversablePropertyTypeHintSpecification"/> - <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/> + <rule ref="PhpMyAdmin"/> + + <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"> + <properties> + <!-- Require PHP 7.2 --> + <property name="enableObjectTypeHint" value="false"/> + </properties> + </rule> + + <!-- Rules that should be followed, but are not required --> + <rule ref="PSR2.Classes.PropertyDeclaration.Underscore"> + <severity>4</severity> + </rule> + <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"> + <severity>4</severity> + </rule> + <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint"> + <severity>4</severity> + </rule> + <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"> + <severity>4</severity> + </rule> + <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"> + <severity>4</severity> + </rule> + <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversablePropertyTypeHintSpecification"> + <severity>4</severity> + </rule> + <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"> + <severity>4</severity> </rule> </ruleset> |