-
Notifications
You must be signed in to change notification settings - Fork 22
/
phpcs.xml
82 lines (72 loc) · 2.99 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
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>User Registration dev PHP_CodeSniffer ruleset.</description>
<!-- Exclude paths -->
<exclude-pattern>includes/libraries/</exclude-pattern>
<exclude-pattern>includes/functions-ur-deprecated.php</exclude-pattern>
<exclude-pattern>includes/abstracts/legacy/</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Configs -->
<config name="minimum_supported_wp_version" value="5.2" />
<config name="testVersion" value="5.4-" />
<!-- PHPCompatibility -->
<rule ref="PHPCompatibility">
<exclude-pattern>tests/</exclude-pattern>
<exclude name="PHPCompatibility.FunctionUse.NewParameters.unserialize_allowed_classesFound" />
</rule>
<!-- WordPress -->
<rule ref="WordPress">
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_key" />
<exclude name="WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid" />
<!-- Ignore base64_encode() and base64_decode() obfuscation error in parser -->
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode" />
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode" />
</rule>
<!-- Rules -->
<rule ref="WPEverest-Core" />
<rule ref="PEAR.NamingConventions.ValidClassName">
<exclude-pattern>includes/</exclude-pattern>
</rule>
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<exclude-pattern>includes/class-ur-session-handler.php</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>includes/**/abstract-*.php</exclude-pattern>
<exclude-pattern>includes/class-user-registration.php</exclude-pattern>
</rule>
<!-- Custom rule properties -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="user-registration" />
</properties>
</rule>
<!-- Do not require docblocks for unit tests -->
<rule ref="Squiz.Commenting.FileComment.Missing">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.Missing">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.ClassComment.SpacingAfter">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.Missing">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.MissingParamTag">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.Empty">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.VariableComment.Missing">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionCommentThrowTag.Missing">
<exclude-pattern>tests/phpunit/*</exclude-pattern>
</rule>
</ruleset>