-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
62 lines (51 loc) · 2.13 KB
/
phpcs.xml
File metadata and controls
62 lines (51 loc) · 2.13 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
<?xml version="1.0"?>
<ruleset name="WPDI WordPress Coding Standards">
<description>WordPress Coding Standards for WPDI</description>
<!-- Include WordPress Coding Standards -->
<rule ref="WordPress">
<exclude name="Generic.Functions.CallTimePassByReference"/>
<exclude name="Squiz.WhiteSpace.LanguageConstructSpacing"/>
</rule>
<!-- Check all PHP files -->
<file>src/</file>
<!-- Exclude vendor directory -->
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>cache/</exclude-pattern>
<!-- Allow PSR-4 autoloader file names -->
<rule ref="WordPress.Files.FileName">
<severity>0</severity>
</rule>
<!-- Don't require @param tags when the type hint is self-documenting -->
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<severity>0</severity>
</rule>
<!-- Allow multiple @throws tags -->
<rule ref="Squiz.Commenting.FunctionCommentThrowTag.WrongNumber">
<severity>0</severity>
</rule>
<!-- Allow @ error suppression (intentional for filesystem ops) -->
<rule ref="WordPress.PHP.NoSilencedErrors">
<severity>0</severity>
</rule>
<!-- Allow file_get_contents/file_put_contents for local file I/O -->
<rule ref="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents">
<severity>0</severity>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_operations_file_put_contents">
<severity>0</severity>
</rule>
<rule ref="WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents">
<severity>0</severity>
</rule>
<!-- var_export is used to generate the cache file, not for debugging -->
<rule ref="WordPress.PHP.DevelopmentFunctions.error_log_var_export">
<severity>0</severity>
</rule>
<!-- Allow code-like inline comments (common in explanatory docblocks) -->
<rule ref="Squiz.PHP.CommentedOutCode.Found">
<severity>0</severity>
</rule>
<!-- Set minimum PHP version -->
<config name="minimum_supported_wp_version" value="5.0"/>
<config name="testVersion" value="7.4-"/>
</ruleset>