33
44 <description >A custom set of code standard rules to check for Inpsyde Codex.</description >
55
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+
614 <!-- Allow . in hook names -->
715 <rule ref =" WordPress.NamingConventions.ValidHookName" >
816 <properties >
1523
1624 <exclude name =" WordPress.PHP.YodaConditions" />
1725
26+ <!-- Exclude to be able to adhere to PSR-4. -->
1827 <exclude name =" WordPress.Files.FileName" />
1928
2029 <exclude name =" Generic.WhiteSpace.ScopeIndent.Incorrect" />
3948 <exclude name =" Squiz.Commenting.BlockComment.HasEmptyLineBefore" />
4049 <!-- Remove rule for /** style for each var -->
4150 <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" />
4260
43- <!-- <exclude name="WordPress.XSS.EscapeOutput" /> -->
4461 <exclude name =" WordPress.WhiteSpace.ScopeIndent.Incorrect" />
4562 <exclude name =" WordPress.Arrays.ArrayKeySpacingRestrictions" />
4663 <exclude name =" WordPress.Arrays.ArrayDeclaration.KeyNotAligned" />
4764 <!-- Remove spaces instead of tabs check -->
4865 <exclude name =" WordPress.Arrays.ArrayDeclaration.ValueNotAligned" />
4966 <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 >
5178 </rule >
5279
5380</ruleset >
0 commit comments