This repository has been archived by the owner on Nov 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
114 lines (102 loc) · 4.62 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.1"?>
<ruleset name="NastuzziSamy">
<description>NastuzziSamy's standards</description>
<!-- Directories -->
<file>src</file>
<!-- Custom params -->
<arg name="basepath" value="."/>
<arg name="colors" />
<arg name="parallel" value="25" />
<arg value="sp"/>
<!-- Except some Zend rules -->
<rule ref="Zend">
<exclude name="Generic.Arrays.DisallowLongArraySyntax" />
<exclude name="Generic.WhiteSpace.DisallowTabIndent" />
<exclude name="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore" />
<exclude name="Zend.NamingConventions.ValidVariableName.NotCamelCaps" />
<exclude name="PEAR.Functions.FunctionCallSignature" />
</rule>
<!-- Space before functions -->
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>
<property name="spacing" value="1" />
<property name="spacingBeforeFirst" value="0" />
<property name="spacingAfterLast" value="0" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace">
<exclude name="Squiz.WhiteSpace.FunctionClosingBraceSpace.SpacingBeforeClose" />
</rule>
<!-- Length rules -->
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="128" />
<property name="absoluteLineLimit" value="null" />
<property name="ignoreComments" value="true" />
</properties>
</rule>
<!-- Comment rules -->
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Squiz.Commenting.DocCommentAlignment" />
<rule ref="Squiz.Commenting.EmptyCatchComment" />
<rule ref="Squiz.Commenting.PostStatementComment" />
<rule ref="Squiz.Commenting.FileComment">
<type>warning</type>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
<exclude name="Squiz.Commenting.FileComment.MissingSubpackageTag" />
<exclude name="Squiz.Commenting.FileComment.SubpackageTagOrder" />
<exclude name="Squiz.Commenting.FileComment.IncorrectAuthor" />
<exclude name="Squiz.Commenting.FileComment.AuthorTagOrder" />
<exclude name="Squiz.Commenting.FileComment.DuplicateAuthorTag" />
<exclude name="Squiz.Commenting.FileComment.PackageTagOrder" />
<exclude name="Squiz.Commenting.FileComment.IncorrectCopyright" />
<exclude name="Squiz.Commenting.FileComment.CopyrightTagOrder" />
</rule>
<rule ref="Squiz.Commenting.FunctionComment">
<type>warning</type>
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.NoComma" />
<!-- Fix array indentation -->
<rule ref="Generic.Arrays.ArrayIndent" />
<!-- Forbid 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="dd" value="null"/>
<element key="create_function" value="null"/>
</property>
</properties>
</rule>
<!-- End file required -->
<rule ref="PSR2.Files.EndFileNewline"/>
<!-- No PHP end tags -->
<rule ref="Zend.Files.ClosingTag"/>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<exclude name="Squiz.Functions.GlobalFunction" />
</rule>
<!-- Random rules -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="Squiz.ControlStructures.ElseIfDeclaration" />
<rule ref="Squiz.Formatting.OperatorBracket" />
<rule ref="Squiz.Scope.MethodScope" />
<rule ref="Squiz.Strings.ConcatenationSpacing" />
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing" />
<rule ref="Squiz.WhiteSpace.OperatorSpacing" />
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.LowerCaseKeyword"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
<rule ref="Generic.WhiteSpace.ScopeIndent"/>
<rule ref="PSR2.Classes.PropertyDeclaration"/>
<rule ref="PSR2.Methods.MethodDeclaration"/>
</ruleset>