-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
76 lines (59 loc) · 2.81 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
<?xml version="1.0"?>
<ruleset name="CMW.WordPress">
<!-- Add source codes in the report -->
<arg value="s" />
<arg name="colors" />
<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php" />
<file>.</file>
<rule ref="WordPress">
<!-- I prefer slash-delimited Hooks -->
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
<!-- Ignore docblock formatting -->
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType" />
<!-- Yoda? Really? -->
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<!-- I prefer my control structures -->
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd" />
<!-- Not a fan of arrow or equals alignment -->
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
<!-- PSR4 -->
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<!-- Remove some checks to allow phpcbf to run in bulk mode -->
<exclude name="WordPress.PHP.StrictComparisons.LooseComparison" />
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict" />
<exclude name="Squiz.Commenting.InlineComment.NoSpaceBefore" />
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.BodyOnNextLineCASE" />
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase" />
<exclude name="Squiz.Commenting.InlineComment.SpacingAfterAtFunctionEnd" />
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped" />
<!-- Remove when error logging has been moved to a function -->
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_error_log" />
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_print_r" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="theball2022" />
</properties>
</rule>
<!-- Allow short array syntax -->
<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found">
<severity>0</severity>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found" />
<!-- Nesting levels -->
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="absoluteNestingLevel" value="3" />
</properties>
</rule>
<exclude-pattern>assets/civicrm/*</exclude-pattern>
<exclude-pattern>assets/templates/*</exclude-pattern>
</ruleset>