-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathphpcs.xml
47 lines (41 loc) · 1.79 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
<?xml version="1.0"?>
<!--
WordPress Coding Standard for PHP_CodeSniffer with some tweaks.
1. Use space for indent instead of tabs.
2. Super global warning is suppressed.
3. Class file name errors are ignored.
4. String literal errors are ignored.
5. Empty catch is allowed.
-->
<ruleset name="DFI">
<description>Coding Standard for Dynamic Featured Image Plugin</description>
<!-- Exclude select folders and files from being checked. -->
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>
<!-- Use WordPress standard and remove settings not needed. -->
<rule ref="WordPress">
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent"/>
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH"/>
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralText"/>
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralDomain"/>
<exclude name="WordPress.VIP.SuperGlobalInputUsage"/>
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="dynamic-featured-image"/>
</properties>
</rule>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="exact" value="false"/>
<property name="indent" value="4"/>
<property name="tabIndent" value="false"/>
<property name="ignoreIndentationTokens" type="array"
value="T_COMMENT,T_DOC_COMMENT_OPEN_TAG,T_HEREDOC,T_NOWDOC,T_INLINE_HTML"/>
</properties>
</rule>
<arg name="tab-width" value="4"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
</ruleset>