-
Notifications
You must be signed in to change notification settings - Fork 11
/
phpcs.xml
38 lines (29 loc) · 1.42 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
<?xml version="1.0"?>
<ruleset name="vincit/wordpress">
<description>PSR2, but saner. https://gist.github.com/gsherwood/9d22f634c57f990a7c64</description>
<arg name="tab-width" value="2"/>
<rule ref="PSR2">
<exclude name="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace" />
<!-- These rules are insane. -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
<exclude name="PSR2.Methods.FunctionCallSignature.Indent" />
<include name="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<include name="Generic.Classes.OpeningBraceSameLine" />
<!-- Placing <?php or ?> on a new line is a waste of space. -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.ContentAfterBrace" />
<!-- https://i.imgur.com/m9NtGcj.png -->
<exclude name="PSR2.Files.EndFileNewline.TooMany" />
<!-- This rule is NEVER happy and it doesn't even matter. -->
<exclude name="PSR2.ControlStructures.SwitchDeclaration.BreakIndent" />
<exclude ref="Squiz.WhiteSpace.ScopeClosingBrace" />
</rule>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="exact" value="false" />
<property name="indent" value="2"/>
<property name="tabIndent" value="false"/>
</properties>
</rule>
</ruleset>