You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- The PHP constants true, false, and null MUST be in lower case. -->
71
+
<ruleref="Generic.PHP.LowerCaseConstant"/>
72
+
73
+
<!-- 3. Namespace and Use Declarations -->
74
+
75
+
<!-- When present, there MUST be one blank line after the namespace declaration. -->
76
+
<!-- checked in Namespaces/NamespaceDeclarationSniff -->
77
+
78
+
<!-- When present, all use declarations MUST go after the namespace declaration.
79
+
There MUST be one use keyword per declaration.
80
+
There MUST be one blank line after the use block. -->
81
+
<!-- checked in Namespaces/UseDeclarationSniff -->
82
+
83
+
<!-- 4. Classes, Properties, and Methods -->
84
+
85
+
<!-- 4.1. Extends and Implements -->
86
+
87
+
<!-- The extends and implements keywords MUST be declared on the same line as the class name.
88
+
The opening brace for the class go MUST go on its own line; the closing brace for the class MUST go on the next line after the body.
89
+
Lists of implements MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one interface per line. -->
90
+
<!-- checked in Classes/ClassDeclarationSniff -->
91
+
92
+
<!-- 4.2. Properties -->
93
+
94
+
<!-- Visibility MUST be declared on all properties.
95
+
The var keyword MUST NOT be used to declare a property.
96
+
There MUST NOT be more than one property declared per statement.
97
+
Property names SHOULD NOT be prefixed with a single underscore to indicate protected or private visibility. -->
98
+
<!-- checked in Classes/PropertyDeclarationSniff -->
99
+
100
+
<!-- 4.3 Methods -->
101
+
102
+
<!-- Visibility MUST be declared on all methods. -->
103
+
<ruleref="Squiz.Scope.MethodScope"/>
104
+
<ruleref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
105
+
106
+
<!-- Method names SHOULD NOT be prefixed with a single underscore to indicate protected or private visibility. -->
107
+
<!-- checked in Methods/MethodDeclarationSniff -->
108
+
109
+
<!-- Method names MUST NOT be declared with a space after the method name. The opening brace MUST go on its own line, and the closing brace MUST go on the next line following the body. There MUST NOT be a space after the opening parenthesis, and there MUST NOT be a space before the closing parenthesis. -->
110
+
<!-- checked in Methods/FunctionClosingBraceSniff -->
<!-- Method arguments with default values MUST go at the end of the argument list. -->
127
+
<ruleref="PEAR.Functions.ValidDefaultValue"/>
128
+
129
+
<!-- Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line. When the argument list is split across multiple lines, the closing parenthesis and opening brace MUST be placed together on their own line with one space between them. -->
<!-- When present, the abstract and final declarations MUST precede the visibility declaration.
135
+
When present, the static declaration MUST come after the visibility declaration. -->
136
+
<!-- checked in Methods/MethodDeclarationSniff -->
137
+
138
+
<!-- 4.6 Method and Function Calls -->
139
+
140
+
<!-- When making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis, there MUST NOT be a space after the opening parenthesis, and there MUST NOT be a space before the closing parenthesis. In the argument list, there MUST NOT be a space before each comma, and there MUST be one space after each comma.
141
+
Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line. -->
<!-- The body of each structure MUST be enclosed by braces. This standardizes how the structures look, and reduces the likelihood of introducing errors as new lines get added to the body. -->
<!-- The keyword elseif SHOULD be used instead of else if so that all control keywords look like single words. -->
179
+
<!-- checked in ControlStructures/ElseIfDeclarationSniff -->
180
+
181
+
<!-- 5.2. switch, case -->
182
+
183
+
<!-- The case statement MUST be indented once from switch, and the break keyword (or other terminating keyword) MUST be indented at the same level as the case body. There MUST be a comment such as // no break when fall-through is intentional in a non-empty case body. -->
184
+
<!-- checked in ControlStructures/SwitchDeclarationSniff -->
185
+
186
+
<!-- 6. Closures -->
187
+
188
+
<!-- Closures MUST be declared with a space after the function keyword, and a space before and after the use keyword.
189
+
The opening brace MUST go on the same line, and the closing brace MUST go on the next line following the body.
190
+
There MUST NOT be a space after the opening parenthesis of the argument list or variable list, and there MUST NOT be a space before the closing parenthesis of the argument list or variable list.
191
+
In the argument list and variable list, there MUST NOT be a space before each comma, and there MUST be one space after each comma.
192
+
Closure arguments with default values MUST go at the end of the argument list.
193
+
Argument lists and variable lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument or variable per line.
194
+
When the ending list (whether or arguments or variables) is split across multiple lines, the closing parenthesis and opening brace MUST be placed together on their own line with one space between them. -->
195
+
<!-- checked in Squiz.Functions.MultiLineFunctionDeclaration -->
0 commit comments