-
Notifications
You must be signed in to change notification settings - Fork 21
/
phpcs.xml
40 lines (34 loc) · 1.6 KB
/
phpcs.xml
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>Checkout.com Woocommerce payment gateway dev PHP_CodeSniffer ruleset.</description>
<!-- Exclude paths -->
<exclude-pattern>./node_modules/*</exclude-pattern>
<exclude-pattern>./vendor/*</exclude-pattern>
<exclude-pattern>*\.(?!php$)</exclude-pattern>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="6.1" />
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="colors"/> <!-- Show results with colors. Disable if working on Windows -->
<arg name="basepath" value="."/> <!-- Strip the file paths down to the relevant bit -->
<arg name="parallel" value="8"/> <!-- Enables parallel processing when available for faster results -->
<arg name="extensions" value="php,js"/> <!-- Limit to PHP and JS files -->
<rule ref="PHPCompatibilityWP"/>
<config name="testVersion" value="8.2-"/>
<rule ref="WordPress-VIP-Go"/>
<rule ref="WordPressVIPMinimum">
<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_id"/>
<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.session_session_start"/>
<exclude name="WordPressVIPMinimum.Variables.RestrictedVariables.session___SESSION"/>
</rule>
<!-- Rules -->
<rule ref="WordPress-Core">
<!-- Disallow long array syntax -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found"/>
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="checkout-com-unified-payments-api" />
</properties>
</rule>
</ruleset>