-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
38 lines (31 loc) · 1.11 KB
/
phpcs.xml.dist
File metadata and controls
38 lines (31 loc) · 1.11 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
<?xml version="1.0"?>
<ruleset name="XML Cache Plugin">
<description>WordPress Coding Standards for XML Cache plugin.</description>
<!-- Paths to scan -->
<file>xml-cache.php</file>
<file>src</file>
<!-- Ignore vendor and assets -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>assets/*</exclude-pattern>
<exclude-pattern>react/*</exclude-pattern>
<!-- Base standard -->
<rule ref="WordPress"/>
<rule ref="WordPress-Extra"/>
<rule ref="WordPress-Docs"/>
<!-- Allow PSR-4 class filenames in src/ by excluding WP file-name sniffs -->
<rule ref="WordPress.Files.FileName">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<!-- PHP compatibility (adjust to your min PHP) -->
<config name="testVersion" value="8.0-"/>
<rule ref="PHPCompatibility"/>
<!-- Custom tweaks -->
<arg name="extensions" value="php"/>
<arg value="s"/>
<arg value="p"/>
<!-- Allow strict_types declarations at top -->
<rule ref="PSR12.Files.FileHeader">
<severity>0</severity>
</rule>
</ruleset>