Skip to content

Commit 275cb9d

Browse files
mmollxalopp
authored andcommitted
Add some more Slevomat sniffs
1 parent d6dfce4 commit 275cb9d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

MO4/ruleset.xml

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<!-- exclude sniffs that are extended by this standard -->
1010
<exclude name="PEAR.Functions.FunctionCallSignature"/>
1111
<exclude name="PSR2.Namespaces.UseDeclaration"/>
12+
<!-- SlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition supports autofixing -->
13+
<exclude name="PSR2.Classes.PropertyDeclaration.Multiple"/>
1214
<!-- exclude sniffs that are disabled on purpose by this standard -->
1315
<exclude name="Symfony.Commenting.ClassComment.Missing"/>
1416
<exclude name="Symfony.Commenting.License"/>
@@ -66,6 +68,10 @@
6668

6769
<!-- Require presence of constant visibility -->
6870
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
71+
<!-- Forbid multi constant definition -->
72+
<rule ref="SlevomatCodingStandard.Classes.DisallowMultiConstantDefinition" />
73+
<!-- Forbid multi property definition -->
74+
<rule ref="SlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition" />
6975
<!-- Forbid empty lines after class/interface/trait opening and before closing braces -->
7076
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
7177
<properties>
@@ -77,6 +83,8 @@
7783
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
7884
<!-- report invalid format of inline phpDocs with @var -->
7985
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
86+
<!-- Forbid useless @inheritDoc comments -->
87+
<rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>
8088
<!-- Forbid assignments in conditions -->
8189
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
8290
<!-- Require consistent spacing for control structures -->
@@ -110,6 +118,8 @@
110118
</rule>
111119
<!-- Require global functions to be referenced via a fully qualified name -->
112120
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/>
121+
<!-- Require static closures for microoptimization -->
122+
<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
113123
<!-- Forbid multiple use statements on same line -->
114124
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
115125
<!-- Require one newline around namespace declaration -->

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"php": "~7.2",
3333
"dealerdirect/phpcodesniffer-composer-installer": "~0.7",
3434
"escapestudios/symfony2-coding-standard": "^3.10.0",
35-
"slevomat/coding-standard": "^6.0.2",
35+
"slevomat/coding-standard": "^6.2.0",
3636
"squizlabs/php_codesniffer": "^3.5.4"
3737
}
3838
}

0 commit comments

Comments
 (0)