Repository navigation
Expand file tree
/
Copy pathphpcs.xml
More file actions
50 lines (46 loc) · 2.18 KB
/
Copy pathphpcs.xml
File metadata and controls
50 lines (46 loc) · 2.18 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
<?xml version="1.0"?>
<ruleset name="MyProject">
<description>Monei custom rules</description>
<arg value="sp"/><!-- Show sniff and progress -->
<arg name="extensions" value="php"/>
<arg name="parallel" value="10"/><!-- Enables parallel processing when available for faster results. -->
<arg name="cache" value=".phpcs.cache"/>
<!-- Files to check -->
<file>src/</file>
<file>includes/</file>
<rule ref="WordPress">
<exclude name="Squiz.Commenting" />
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.NamingConventions" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
<exclude name="Universal.Operators.DisallowShortTernary.Found" />
<exclude name="Generic.PHP.DisallowShortOpenTag.EchoFound" />
<exclude name="Generic.Commenting.DocComment" />
</rule>
<!--
wc_clean() is WooCommerce's sanitizer (it maps sanitize_text_field over
scalars and arrays). WPCS only knows core's sanitizers, so without this
every `wc_clean( wp_unslash( $_POST[...] ) )` in the plugin is reported
as unsanitized input.
-->
<rule ref="WordPress.Security.ValidatedSanitizedInput">
<properties>
<property name="customSanitizingFunctions" type="array">
<element value="wc_clean"/>
<element value="wc_sanitize_textarea"/>
</property>
</properties>
</rule>
<!-- Require use statements instead of fully qualified names -->
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowFullyQualifiedGlobalClasses" value="false"/>
<property name="allowFullyQualifiedGlobalFunctions" value="false"/>
<property name="allowFullyQualifiedGlobalConstants" value="false"/>
<property name="allowFallbackGlobalFunctions" value="true"/>
<property name="allowFallbackGlobalConstants" value="true"/>
</properties>
</rule>
</ruleset>