-
Notifications
You must be signed in to change notification settings - Fork 5
/
phpcs.xml
85 lines (73 loc) · 3.17 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
83
84
85
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>Some basic coding standards sniffs for this project.</description>
<file>.</file>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>\.dist/</exclude-pattern>
<exclude-pattern>\.wordpress\.org/</exclude-pattern>
<arg name="basepath" value="." />
<arg name="colors" />
<arg name="extensions" value="php" />
<arg name="tab-width" value="4" />
<config name="testVersion" value="5.6-"/>
<rule ref="PHPCompatibility" />
<rule ref="Modernize" />
<rule ref="Generic.Debug.ClosureLinter" />
<rule ref="Generic.Files.LineEndings" />
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<!-- <rule ref="Generic.Metrics.CyclomaticComplexity" /> -->
<rule ref="Generic.Metrics.NestingLevel" />
<rule ref="Generic.NamingConventions.ConstructorName" />
<rule ref="Generic.PHP.DisallowShortOpenTag.Found" />
<rule ref="Generic.PHP.NoSilencedErrors" />
<rule ref="Generic.Strings.UnnecessaryStringConcat" />
<rule ref="Generic.VersionControl.GitMergeConflict"/>
<rule ref="Generic.WhiteSpace.ArbitraryParenthesesSpacing"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="sizeof" value="count"/>
<element key="delete" value="unset"/>
<element key="print" value="echo"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax">
<exclude-pattern>disable-emails.php</exclude-pattern>
<exclude-pattern>includes/class.Requires.php</exclude-pattern>
<exclude-pattern>includes/functions-global.php</exclude-pattern>
</rule>
<rule ref="Generic.WhiteSpace.ArbitraryParenthesesSpacing">
<properties>
<property name="ignoreNewlines" value="true" />
</properties>
</rule>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true" />
</properties>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode" />
<rule ref="Squiz.PHP.DiscouragedFunctions" />
<rule ref="Squiz.PHP.NonExecutableCode" />
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
<!-- from PHPCSExtra https://github.com/PHPCSStandards/PHPCSExtra -->
<rule ref="NormalizedArrays.Arrays.CommaAfterLast" />
<rule ref="Universal.Arrays.DuplicateArrayKey" />
<rule ref="Universal.Arrays.MixedArrayKeyTypes" />
<rule ref="Universal.CodeAnalysis.ConstructorDestructorReturn" />
<rule ref="Universal.CodeAnalysis.ForeachUniqueAssignment" />
<rule ref="Universal.CodeAnalysis.NoEchoSprintf" />
<rule ref="Universal.CodeAnalysis.StaticInFinalClass" />
<rule ref="Universal.Constants.UppercaseMagicConstants" />
<!-- <rule ref="Universal.FunctionDeclarations.NoLongClosures" /> -->
<rule ref="Universal.NamingConventions.NoReservedKeywordParameterNames" />
<rule ref="Universal.Operators.DisallowLogicalAndOr" />
<rule ref="Universal.Operators.StrictComparisons" />
<rule ref="Universal.PHP.OneStatementInShortEchoTag" />
<rule ref="Universal.UseStatements.NoLeadingBackslash" />
</ruleset>