-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
67 lines (59 loc) · 2.43 KB
/
Copy pathphpcs.xml
File metadata and controls
67 lines (59 loc) · 2.43 KB
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
<?xml version="1.0"?>
<ruleset name="wp-concerts">
<!-- These are fixes for the WP Coding Standards 2.3.0 on PHP 8.1 -->
<config name="text_domain" value=""/>
<config name="prefixes" value=""/>
<config name="minimum_supported_wp_version" value=""/>
<rule ref="WordPress">
<!-- Do not enforce class-* style filenames for classes. -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
</rule>
<!--
The WordPress Coding Standards state that all class files should start with 'class-'. We follow
the PSR-0 standard for naming class files, because we are using autoloading via Composer.
-->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>
<!--
Line length
Lines should be 100 chars long at max (triggers warning),
and should in no case exceed 120 characters (triggers error).
-->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="100"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
<!-- Require strict typing in each file. -->
<rule ref="Generic.PHP.RequireStrictTypes"/>
<!-- Allow short array syntax -->
<rule ref="WordPress-Extra">
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing"/>
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
<exclude name="Universal.Arrays.DisallowShortArraySyntax"/>
</rule>
<!-- Allow Closing PHP tag on function declaration line. -->
<rule ref="WordPress">
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace"/>
</rule>
<!--
Hook Names
While the WordPress Coding Standards state that hook names should be separated by
underscores, an opinionated approach used by plugins like Advanced Custom Fields is to use
'/' to namespace hooks.
@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#custom-word-delimiters-in-hook-names
-->
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="/"/>
</properties>
</rule>
<!-- Use colors in output. -->
<arg name="colors"/>
<!-- Show sniff names and progress. -->
<arg value="sp"/>
</ruleset>