-
Notifications
You must be signed in to change notification settings - Fork 1
/
.phpcs.xml.dist
62 lines (54 loc) · 2.79 KB
/
.phpcs.xml.dist
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="Coding standards for Installment Plans for WooCommerce Subscriptions">
<description>Coding standards for Installment Plans for WooCommerce Subscriptions.</description>
<!-- What to scan -->
<file>installment-plans-for-woo-subs.php</file>
<file>./includes</file>
<file>./templates</file>
<!-- How to scan -->
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->
<!-- Rules: PHPCompatibilityWP -->
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<config name="testVersion" value="5.6-"/>
<rule ref="PHPCompatibilityWP" />
<!-- Rules: WordPress Coding Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="5.0"/>
<rule ref="WordPress-Extra">
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase" />
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
<!-- Prevent closures from looking really bad. -->
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
<!-- Short array syntax is actually *preferred*. -->
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
<!-- Short ternaries are fine. -->
<exclude name="WordPress.PHP.DisallowShortTernary.Found" />
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="installment-plans-for-woo-subs"/>
</properties>
</rule>
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
<properties>
<property name="blank_line_check" value="true"/>
</properties>
</rule>
<!-- Tests may use putenv() -->
<rule ref="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_putenv">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
</ruleset>