-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpcs.xml
51 lines (41 loc) · 1.75 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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<description>The coding standard for PHP_CodeSniffer itself.</description>
<file>./app</file>
<file>./config</file>
<file>./tests</file>
<file>./routes</file>
<exclude-pattern>./vendor/*</exclude-pattern>
<exclude-pattern>*/cache/*</exclude-pattern>
<exclude-pattern>./resources/*</exclude-pattern>
<exclude-pattern>./node_modules/*</exclude-pattern>
<arg name="extensions" value="php,inc" />
<!-- <arg name="report" value="summary"/> -->
<arg name="colors"/>
<arg value="sp"/>
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</rule>
<!-- Use PSR2 standard as default -->
<rule ref="PSR2">
<exclude name="Generic.Files.LineLength" />
<!-- <exclude name="PSR2.Methods.MethodDeclaration.Underscore" /> -->
</rule>
<!-- Addition rules -->
<!-- Expects 1 blank lines between 2 functions -->
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1"/>
<property name="spacingBeforeFirst" value="0" />
<property name="spacingAfterLast" value="0" />
</properties>
<!-- Allow function has underscore -->
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
</rule>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/>
</ruleset>