Skip to content

Commit f5ed30d

Browse files
committed
Upgrade to phpmyadmin/coding-standard 4.0
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
1 parent bec611d commit f5ed30d

2 files changed

Lines changed: 46 additions & 3 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"bacon/bacon-qr-code": "^2.0",
9999
"code-lts/u2f-php-server": "^1.2",
100100
"php-webdriver/webdriver": "^1.13",
101-
"phpmyadmin/coding-standard": "^3.0.0",
101+
"phpmyadmin/coding-standard": "^4.0",
102102
"phpstan/extension-installer": "^1.1",
103103
"phpstan/phpstan": "^1.8",
104104
"phpstan/phpstan-phpunit": "^1.3",

phpcs.xml.dist

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,40 @@
2626
<exclude-pattern>*/libraries/classes/Plugins/Transformations/*</exclude-pattern>
2727
</rule>
2828

29-
<rule ref="Squiz.PHP.GlobalKeyword"/>
30-
3129
<!-- Rules that should be followed, but are not required -->
30+
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing.IncorrectCountOfBlankLinesAfterConstant">
31+
<severity>4</severity>
32+
</rule>
33+
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference.ClassNameReferencedViaFunctionCall">
34+
<severity>4</severity>
35+
</rule>
36+
<rule ref="SlevomatCodingStandard.Classes.ParentCallSpacing.IncorrectLinesCountAfterControlStructure">
37+
<severity>4</severity>
38+
</rule>
39+
<rule ref="SlevomatCodingStandard.Classes.ParentCallSpacing.IncorrectLinesCountBeforeControlStructure">
40+
<severity>4</severity>
41+
</rule>
42+
<rule ref="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion">
43+
<severity>4</severity>
44+
</rule>
45+
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat">
46+
<severity>4</severity>
47+
</rule>
48+
<rule ref="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment">
49+
<severity>4</severity>
50+
</rule>
51+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator.RequiredNullCoalesceEqualOperator">
52+
<severity>4</severity>
53+
</rule>
54+
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator.RequiredNullSafeObjectOperator">
55+
<severity>4</severity>
56+
</rule>
57+
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall.MissingTrailingComma">
58+
<severity>4</severity>
59+
</rule>
60+
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration.MissingTrailingComma">
61+
<severity>4</severity>
62+
</rule>
3263
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators">
3364
<severity>4</severity>
3465
</rule>
@@ -38,6 +69,9 @@
3869
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification">
3970
<severity>4</severity>
4071
</rule>
72+
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint">
73+
<severity>4</severity>
74+
</rule>
4175
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification">
4276
<severity>4</severity>
4377
</rule>
@@ -47,6 +81,15 @@
4781
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification">
4882
<severity>4</severity>
4983
</rule>
84+
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat.DisallowedShortNullable">
85+
<severity>4</severity>
86+
</rule>
87+
<rule ref="SlevomatCodingStandard.PHP.RequireNowdoc.RequiredNowdoc">
88+
<severity>4</severity>
89+
</rule>
90+
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch.NonCapturingCatchRequired">
91+
<severity>4</severity>
92+
</rule>
5093
<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps">
5194
<severity>4</severity>
5295
</rule>

0 commit comments

Comments
 (0)