-
Notifications
You must be signed in to change notification settings - Fork 25
/
.phpcs.xml
75 lines (68 loc) · 2.72 KB
/
.phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0"?>
<ruleset name="PluginName">
<description>The code standard for PluginName.</description>
<config name="testVersion" value="7.2-"/>
<exclude-pattern>\.codeception/*</exclude-pattern>
<exclude-pattern>\.github/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>vendor_prefixed/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>\.idea/*</exclude-pattern>
<exclude-pattern>assets/*</exclude-pattern>
<arg value="ps"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="100"/>
<rule ref="WordPress">
<!-- PSR4 -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<rule ref="PHPCompatibility"/>
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" value="3"/>
<property name="absoluteComplexity" value="5"/>
</properties>
</rule>
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="absoluteNestingLevel" value="3"/>
</properties>
</rule>
<!-- Allow short array syntax -->
<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found">
<severity>0</severity>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
<!-- Tests -->
<rule ref="Squiz.Commenting.FunctionComment.EmptyThrows">
<exclude-pattern>\.codeception/_support/*</exclude-pattern>
<exclude-pattern>\.tests/php/*</exclude-pattern>
</rule>
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<exclude-pattern>\.codeception/_support/*</exclude-pattern>
<exclude-pattern>\.tests/php/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid">
<exclude-pattern>\.codeception/_support/*</exclude-pattern>
<exclude-pattern>\.tests/php/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase">
<exclude-pattern>\.codeception/_support/*</exclude-pattern>
<exclude-pattern>\.tests/php/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<exclude-pattern>\.codeception/_support/*</exclude-pattern>
<exclude-pattern>\.tests/php/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase">
<exclude-pattern>\.codeception/_support/*</exclude-pattern>
<exclude-pattern>\.tests/php/*</exclude-pattern>
</rule>
<rule ref="Squiz.NamingConventions">
<exclude name="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore"/>
<include-pattern>\.codeception/_support/*</include-pattern>
<include-pattern>\.tests/php/*</include-pattern>
</rule>
</ruleset>