Skip to content

Commit 0ed6957

Browse files
committed
feat(phpcs): more rules
1 parent b391e24 commit 0ed6957

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

CodeatCodingStandard/ruleset.xml

+13
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
<exclude name="Generic.Commenting.DocComment.MissingShort"/>
103103
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
104104
<exclude name="PEAR.Functions.FunctionCallSignature.Indent"/>
105+
<exclude name="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps"/>
105106
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys"/>
106107
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys"/>
107108
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/>
@@ -161,6 +162,7 @@
161162
<exclude name="SlevomatCodingStandard.PHP.DisallowReference.DisallowedAssigningByReference"/>
162163
<exclude name="SlevomatCodingStandard.PHP.ShortList.LongListUsed"/>
163164
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
165+
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint"/>
164166
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint"/>
165167
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
166168
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint"/>
@@ -181,6 +183,7 @@
181183
<exclude name="SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator.RequiredNumericLiteralSeparator"/>
182184
<exclude name="SlevomatCodingStandard.Functions.TrailingCommaInCall.MissingTrailingComma"/>
183185
<exclude name="SlevomatCodingStandard.Functions.RequireMultiLineCall.RequiredMultiLineCall"/>
186+
<exclude name="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall.MissingTrailingComma"/>
184187
<exclude name="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable.DisallowedSuperGlobalVariable"/>
185188
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment"/>
186189
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment"/>
@@ -193,4 +196,14 @@
193196
<property name="enableObjectTypeHint" value="false"/>
194197
</properties>
195198
</rule>
199+
<rule ref="SlevomatCodingStandard.Functions.FunctionLength">
200+
<properties>
201+
<property name="maxLinesLength" value="50"/>
202+
</properties>
203+
</rule>
204+
<rule ref="SlevomatCodingStandard.Files.FunctionLength">
205+
<properties>
206+
<property name="maxLinesLength" value="50"/>
207+
</properties>
208+
</rule>
196209
</ruleset>

composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@
1616
},
1717
"require-dev": {
1818
"phpcsstandards/phpcsdevcs": "^1.0"
19+
},
20+
"config": {
21+
"allow-plugins": {
22+
"dealerdirect/phpcodesniffer-composer-installer": true
23+
}
1924
}
20-
}
25+
}

0 commit comments

Comments
 (0)