-
-
Notifications
You must be signed in to change notification settings - Fork 94
/
phpcs.xml
82 lines (61 loc) · 2.74 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
74
75
76
77
78
79
80
81
82
<?xml version="1.0"?>
<ruleset name="Weathermap">
<description>The coding standard for Weathermap.</description>
<file>lib</file>
<file>weathermap</file>
<file>editor.php</file>
<exclude-pattern>vendor/*</exclude-pattern>
<arg name="colors"/>
<arg value="np"/>
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</rule>
<!-- Include the whole PSR2 standard -->
<rule ref="PSR2">
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSame"/>
</rule>
<rule ref="Squiz.PHP.DiscouragedFunctions"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<config name="installed_paths" value="vendor/phpcompatibility/php-compatibility,vendor/slevomat/coding-standard"/>
<!-- don't allow commented out code -->
<rule ref="Squiz.PHP.CommentedOutCode"/>
<!-- Check var names, but we don't want leading underscores for private vars -->
<rule ref="Squiz.NamingConventions.ValidVariableName"/>
<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore">
<severity>0</severity>
</rule>
<!-- Only one argument per line in multi-line function calls -->
<rule ref="PEAR.Functions.FunctionCallSignature">
<properties>
<property name="allowMultipleArguments" value="false"/>
</properties>
</rule>
<!-- Have 12 chars padding maximum and always show as errors -->
<rule ref="Generic.Formatting.MultipleStatementAlignment">
<properties>
<property name="maxPadding" value="12"/>
<property name="error" value="true"/>
</properties>
</rule>
<!-- Private methods MUST not be prefixed with an underscore -->
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<type>error</type>
</rule>
<!-- Private properties MUST not be prefixed with an underscore -->
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<type>error</type>
</rule>
<!--
These are PHP7ish
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"/>
<rule ref="SlevomatCodingStandard.Classes.UnusedPrivateElements"/>
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"/>
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/>
<rule ref="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants"/>
<rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/>
<rule ref="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration"/>
-->
<rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/>
<rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
</ruleset>