forked from simplehtmldom/simplehtmldom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
67 lines (60 loc) · 2.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
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
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="PHPCS Coding Standards for simplehtmldom">
<!-- Exclude composer files -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Exclude examples -->
<!-- TODO: Enforce coding standards on examples -->
<exclude-pattern>*/example/*</exclude-pattern>
<!-- Exclude docs -->
<exclude-pattern>*/docs/*</exclude-pattern>
<!-- Exclude tests -->
<!-- TODO: Enforce coding standards on tests -->
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- Check only files with .php extension -->
<arg name="extensions" value="php"/>
<!-- Show progress -->
<arg value="p"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="PSR2.Methods.MethodDeclaration" />
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
<rule ref="PEAR.Functions.ValidDefaultValue"/>
<rule ref="PSR2.ControlStructures.ElseIfDeclaration"/>
<rule ref="PSR2.ControlStructures.ControlStructureSpacing"/>
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<rule ref="Squiz.Strings.ConcatenationSpacing">
<properties>
<property name="spacing" value="1"/>
<property name="ignoreNewlines" value="true"/>
</properties>
</rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties>
<property name="equalsSpacing" value="1"/>
</properties>
</rule>
<!-- TODO: Enforce absolute line limit with phpcs 3.x -->
<!--
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="80"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
-->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage">
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" />
</rule>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="PSR2.Files.EndFileNewline"/>
</ruleset>