3
3
4
4
<description >A custom set of code standard rules to check for Inpsyde Codex.</description >
5
5
6
+ <!-- Check for cross-version support for PHP 7.0 and higher. -->
7
+ <config name =" testVersion" value =" 7.0-" />
8
+
9
+ <rule ref =" PHPCompatibility" >
10
+ <!-- With PHP 7 or higher, these keywords actually are valid function names. https://github.com/wimg/PHPCompatibility/issues/515 -->
11
+ <exclude name =" PHPCompatibility.PHP.ForbiddenNamesAsInvokedFunctions" />
12
+ </rule >
13
+
6
14
<!-- Allow . in hook names -->
7
15
<rule ref =" WordPress.NamingConventions.ValidHookName" >
8
16
<properties >
15
23
16
24
<exclude name =" WordPress.PHP.YodaConditions" />
17
25
26
+ <!-- Exclude to be able to adhere to PSR-4. -->
18
27
<exclude name =" WordPress.Files.FileName" />
19
28
20
29
<exclude name =" Generic.WhiteSpace.ScopeIndent.Incorrect" />
39
48
<exclude name =" Squiz.Commenting.BlockComment.HasEmptyLineBefore" />
40
49
<!-- Remove rule for /** style for each var -->
41
50
<exclude name =" Squiz.Commenting.VariableComment.WrongStyle" />
51
+ <!-- Exclude to be able to include an encoding cookie. -->
52
+ <exclude name =" Squiz.Commenting.FileComment.WrongStyle" />
53
+ <exclude name =" Squiz.Commenting.InlineComment.WrongStyle" />
54
+
55
+ <!-- Exclude to be able to use variadic arguments. https://github.com/squizlabs/PHP_CodeSniffer/issues/1652 -->
56
+ <exclude name =" Squiz.Commenting.FunctionComment.IncorrectTypeHint" />
57
+
58
+ <!-- Exclude to be able to use "@noinspection PhpUnusedParameterInspection" annotations. -->
59
+ <exclude name =" Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
42
60
43
- <!-- <exclude name="WordPress.XSS.EscapeOutput" /> -->
44
61
<exclude name =" WordPress.WhiteSpace.ScopeIndent.Incorrect" />
45
62
<exclude name =" WordPress.Arrays.ArrayKeySpacingRestrictions" />
46
63
<exclude name =" WordPress.Arrays.ArrayDeclaration.KeyNotAligned" />
47
64
<!-- Remove spaces instead of tabs check -->
48
65
<exclude name =" WordPress.Arrays.ArrayDeclaration.ValueNotAligned" />
49
66
<exclude name =" WordPress.Arrays.ArrayDeclaration.CloseBraceNotAligned" />
50
- <!-- <exclude name="WordPress.Variables.GlobalVariables" /> -->
67
+
68
+ <!-- Exclude to not be forced to use a space before return type colons. https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/547. -->
69
+ <exclude name =" WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis" />
70
+
71
+ </rule >
72
+
73
+ <!-- Adapt to be able to use namespaced hooks in dot notation. -->
74
+ <rule ref =" WordPress.NamingConventions.ValidHookName" >
75
+ <properties >
76
+ <property name =" additionalWordDelimiters" value =" ." />
77
+ </properties >
51
78
</rule >
52
79
53
80
</ruleset >
0 commit comments