This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 179
/
phpcs.xml.dist
50 lines (44 loc) · 1.51 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
<?xml version="1.0"?>
<ruleset name="Soil">
<description>PSR12 with PHP 5.6+ compatibility</description>
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="sp"/>
<!-- PHP compatibility takes precedent over PSR12 -->
<rule ref="PHPCompatibility"/>
<rule ref="PSR12"/>
<!-- Support for PHP 5.6+ -->
<config name="testVersion" value="5.6-"/>
<file>soil.php</file>
<file>src</file>
<file>tests</file>
<!-- We should be cognizant of long lines, but handle it case-by-case -->
<rule ref="Generic.Files.LineLength.TooLong">
<severity>1</severity>
</rule>
<!-- I like to use snake_case for test names -->
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<!-- WordPress -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="soil"/>
</property>
</properties>
</rule>
<rule ref="WordPress.CodeAnalysis.EmptyStatement"/>
<rule ref="WordPress.CodeAnalysis.EscapedNotTranslated"/>
<rule ref="WordPress.DB"/>
<rule ref="WordPress.DateTime"/>
<rule ref="WordPress.Security"/>
<rule ref="WordPress.Utils.I18nTextDomainFixer"/>
<rule ref="WordPress.PHP">
<exclude name="WordPress.PHP.YodaConditions"/>
<exclude name="WordPress.PHP.DisallowShortTernary"/>
</rule>
<rule ref="WordPress.WP">
<exclude name="WordPress.WP.TimezoneChange"/>
</rule>
</ruleset>