-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathphpcs.xml
More file actions
94 lines (82 loc) · 3.56 KB
/
phpcs.xml
File metadata and controls
94 lines (82 loc) · 3.56 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
85
86
87
88
89
90
91
92
93
94
<?xml version="1.0"?>
<ruleset name="Imagify">
<description>Image optimization plugin for WordPress by WP Media.</description>
<arg name="extensions" value="php"/>
<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="."/>
<file>classes/</file>
<file>inc/</file>
<file>views/</file>
<file>imagify.php</file>
<file>uninstall.php</file>
<exclude-pattern>inc/deprecated/*</exclude-pattern>
<exclude-pattern>classes/Dependencies</exclude-pattern>
<exclude-pattern>inc/Dependencies</exclude-pattern>
<!-- ** HOW TO SCAN ** -->
<arg value="sp"/><!-- Show sniff and progress -->
<arg name="colors"/><!-- Show results with colors -->
<arg name="parallel" value="50"/><!-- Enables parallel processing when available for faster results. -->
<arg name="extensions" value="php"/><!-- Limit to PHP files -->
<!-- Check for cross-version support for PHP 7.3 and higher + WP 5.9 and higher. -->
<config name="testVersion" value="7.3-"/>
<config name="minimum_supported_wp_version" value="5.9"/>
<!-- Run against the PHPCompatibility ruleset dedicated to WP. -->
<rule ref="PHPCompatibilityWP">
<include-pattern>*\.php$</include-pattern>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<!-- Run against the WordPress ruleset. -->
<rule ref="WordPress">
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="Squiz.Commenting.FileComment.Missing"/><!-- Nope nope nope. -->
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery"/><!-- LOL. Yeah, sure. -->
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/><!-- Using static vars IS caching. -->
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_key"/><!-- Maybe someday. -->
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_query"/><!-- Maybe someday. -->
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_value"/><!-- Maybe someday. -->
<!-- Will be handled later. -->
<exclude name="WordPress.Security.NonceVerification.Missing"/>
<exclude name="WordPress.Security.NonceVerification.Recommended"/>
<exclude name="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"/>
<exclude name="WordPress.DB.PreparedSQL.NotPrepared"/>
<exclude name="WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare"/>
<exclude name="WordPress.DB.DirectDatabaseQuery.SchemaChange"/>
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false" />
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<properties>
<property name="allowed_custom_properties" type="array">
<element value="Packs" />
<element value="Plans" />
<element value="fileName" />
<element value="parentNode" />
<element value="preserveWhiteSpace" />
<element value="formatOutput" />
<element value="firstChild" />
</property>
</properties>
</rule>
<rule ref="WordPress.Security.NonceVerification">
<properties>
<property name="customNonceVerificationFunctions" type="array">
<element value="imagify_check_nonce" />
</property>
</properties>
</rule>
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customUnslashingSanitizingFunctions" type="array">
<element value="imagify_sanitize_context" />
<element value="empty" />
<element value="is_numeric" />
<element value="isset" />
</property>
</properties>
</rule>
</ruleset>