-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
67 lines (56 loc) · 2.34 KB
/
Copy pathphpcs.xml.dist
File metadata and controls
67 lines (56 loc) · 2.34 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
<?xml version="1.0"?>
<ruleset name="DuckDev WP Cache Helper">
<description>WordPress coding standards adapted for a PSR-4 library.</description>
<file>src</file>
<file>tests</file>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg value="sp"/>
<arg name="parallel" value="8"/>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>tests/Stubs/*</exclude-pattern>
<config name="minimum_supported_wp_version" value="6.0"/>
<config name="testVersion" value="7.4-"/>
<!-- Apply the full WordPress standard. -->
<rule ref="WordPress">
<!-- PSR-4 file/folder layout — class files are PascalCase, not class-foo.php. -->
<exclude name="WordPress.Files.FileName"/>
<!-- PSR-4 class names — no class-foo.php prefix requirement. -->
<exclude name="WordPress.NamingConventions.ValidVariableName"/>
<!-- Library has no text domain; host plugins translate. -->
<exclude name="WordPress.WP.I18n.TextDomainMismatch"/>
<exclude name="WordPress.WP.I18n.MissingArgDomain"/>
</rule>
<!-- {@inheritDoc} is the chosen pattern for interface methods; do not double-document. -->
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>src/Storage/ObjectCache.php</exclude-pattern>
<exclude-pattern>src/Storage/TransientCache.php</exclude-pattern>
</rule>
<!-- $default is part of the 1.x public API (forget/cease); renaming would break consumers. -->
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound">
<exclude-pattern>src/Cache.php</exclude-pattern>
</rule>
<!-- PHP compatibility (7.4+). -->
<rule ref="PHPCompatibilityWP"/>
<!-- Tests can use looser conventions. -->
<rule ref="WordPress.NamingConventions.ValidFunctionName">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.PHP.DevelopmentFunctions">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FileComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>