-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathphpcs.xml
More file actions
114 lines (96 loc) · 4.19 KB
/
Copy pathphpcs.xml
File metadata and controls
114 lines (96 loc) · 4.19 KB
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.0"?>
<!--
~ Jano Ticketing System
~ Copyright (C) 2016-2019 Andrew Ying and other contributors.
~
~ This file is part of Jano Ticketing System.
~
~ Jano Ticketing System is free software: you can redistribute it and/or
~ modify it under the terms of the GNU Affero General Public License
~ v3.0 supplemented by additional permissions and terms as published at
~ COPYING.md.
~
~ Jano Ticketing System is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public
~ License along with this program. If not, see
~ <http://www.gnu.org/licenses/>.
-->
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Jano"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>Coding standard for Jano Ticketing System.</description>
<file>app</file>
<file>config</file>
<file>database</file>
<file>resources</file>
<file>routes</file>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<arg name="basepath" value="."/>
<arg name="colors"/>
<arg name="parallel" value="75"/>
<arg value="np"/>
<!-- Don't hide tokenizer exceptions -->
<rule ref="Internal.Tokenizer.Exception">
<type>error</type>
</rule>
<!-- Include the whole PSR-1 standard -->
<rule ref="PSR1"/>
<!-- Include the whole PSR-2 standard -->
<rule ref="PSR2"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Formatting.SpaceAfterCast"/>
<rule ref="Generic.Functions.CallTimePassByReference"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
<rule ref="Squiz.ControlStructures.ControlSignature"/>
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration"/>
<rule ref="Squiz.ControlStructures.ForLoopDeclaration"/>
<rule ref="Squiz.ControlStructures.LowercaseDeclaration"/>
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
<rule ref="Squiz.Scope.MemberVarScope"/>
<rule ref="PSR12"/>
<rule ref="PEAR.Commenting.InlineComment"/>
<!-- Import Zend coding standard (which in turn imports PEAR) -->
<rule ref="Zend">
<!-- but exclude their code analyzer -->
<exclude name="Zend.Debug.CodeAnalyzer"/>
<exclude name="Zend.NamingConventions.ValidVariableName.NotCamelCaps"/>
<!-- covered by Squiz ControlSignature, which enforces try/catch as well -->
<exclude name="PEAR.ControlStructures.ControlSignature"/>
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeTags"/>
<!-- do not check line length -->
<exclude name="Generic.Files.LineLength"/>
<!-- covered by Squiz FunctionDeclarationSniff -->
<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
</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>
<rule ref="Zend.NamingConventions.ValidVariableName.PrivateNoUnderscore">
<severity>0</severity>
</rule>
<!-- Ignore variables that contains numbers -->
<rule ref="Zend.NamingConventions.ValidVariableName.ContainsNumbers">
<severity>0</severity>
</rule>
<!-- In practice, Symfony spaces multiline function calls differently than Zend -->
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
<severity>0</severity>
</rule>
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
<severity>0</severity>
</rule>
</ruleset>