forked from punktDe/oauth2-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.phpcs.xml
73 lines (64 loc) · 2.72 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
68
69
70
71
72
73
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PSR-2-ElEquipo" xsi:noNamespaceSchemaLocation="phpcs.xsd">
<description>PSR2 Coding standard Punkt.de flavored.</description>
<extensions>php</extensions>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="parallel" value="75"/>
<arg name="extensions" value="php"/>
<arg value="p"/>
<exclude-pattern>*Tests/Unit/*</exclude-pattern>
<exclude-pattern>*Tests/Functional/*</exclude-pattern>
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</rule>
<rule ref="PSR2">
<!-- Sometimes new lines really help to grasp a code block -->
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen"/>
<exclude name="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose"/>
<exclude name="Generic.Files.LineLength"/>
</rule>
<!-- Additional rules -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="absoluteNestingLevel" value="8" />
</properties>
</rule>
<rule ref="Generic.NamingConventions.CamelCapsFunctionName">
<properties>
<property name="strict" value="false" />
</properties>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode">
<properties>
<property name="maxPercentage" value="50" />
</properties>
</rule>
<!-- Coding Standard Package -->
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"></rule>
<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"></rule>
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses">
<properties>
<property name="searchAnnotations" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"></rule>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"></rule>
<!-- Ban some functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="sizeof" value="count"/>
<element key="delete" value="unset"/>
<element key="print" value="echo"/>
<element key="is_null" value="null"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
</ruleset>