-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
84 lines (72 loc) · 3.15 KB
/
phpcs.xml.dist
File metadata and controls
84 lines (72 loc) · 3.15 KB
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
76
77
78
79
80
81
82
83
84
<?xml version="1.0"?>
<ruleset name="PHP_CS DWS WordPress">
<description>Sniff for the coding standards of the DWS WordPress code.</description>
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
<file>.</file>
<rule ref="Squiz.Commenting.FunctionComment">
<!-- Ignore custom spacing in function comments. -->
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
<!-- Ignore missing parameter comments if @inheritDoc is present. -->
<properties>
<property name="skipIfInheritdoc" value="true" />
</properties>
</rule>
<!-- Ignore end char rule since it conflicts with PhpStorm's code folding regions. -->
<rule ref="Squiz.Commenting.InlineComment">
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
</rule>
<!-- Since all files contain classes, a file comment seems extraneous. -->
<rule ref="Squiz.Commenting.FileComment">
<exclude name="Squiz.Commenting.FileComment.Missing"/>
</rule>
<!-- Minimum PHP and WP versions. -->
<config name="testVersion" value="7.4-"/>
<config name="minimum_supported_wp_version" value="5.5"/>
<!-- WordPress coding standards. -->
<rule ref="WordPress">
<!-- Exclude as plugin adheres to the PSR-4 standard. -->
<exclude name="WordPress.Files.FileName"/>
<!-- Allow the usage of short ternaries since they're useful. -->
<exclude name="WordPress.PHP.DisallowShortTernary"/>
</rule>
<!-- Check that the proper text domain(s) is used everywhere. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="dws-wp-framework-foundations"/>
</property>
</properties>
</rule>
<!-- Allow the forward-slash as a hook delimiter. -->
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="/"/>
</properties>
</rule>
<!-- Check that all things are properly prefixed. -->
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="dws_"/>
<element value="dws_wp_framework_"/>
<element value="dws_wp_framework_foundations_"/>
<element value="DeepWebSolutions"/>
</property>
</properties>
</rule>
<!-- Define some special rules for the Codeception tests. -->
<rule ref="PSR2.Methods.MethodDeclaration">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>
<!-- Ignore certain folders. -->
<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/tests/_support/*</exclude-pattern>
<!-- Ignore index.php files since they're just empty. -->
<exclude-pattern>*/index.php</exclude-pattern>
</ruleset>