2
class PHP_CodeSniffer_File
6
* a simple function comment.
10
* @param bool $stackPtr The position in @ @unknown the stack of the token
11
* that opened the scope
12
* @param int $detph How many scope levels down we are.
13
* @param string $index The index
17
private function _functionCall($stackPtr, $depth=1, $index)
21
}//end _functionCall()
24
// Sample function comment
28
public function invalidCommentStyle()
31
}//end invalidCommentStyle()
36
* A simple function comment
40
* 0Long description with extra blank line before and after
45
public function extraDescriptionNewlines()
48
}//end extraDescriptionNewlines()
52
* -A simple function comment.
55
public function missingNewlinesBeforeTags()
58
}//end missingNewlinesBeforeTags()
62
* Access tag should not be treated as a long description.
67
public function accessTag()
77
function PHP_CodeSniffer_File()
88
function _PHP_CodeSniffer_File()
103
function missingComment()
113
public function noReturn($one)
120
* Param not immediate.
123
* @param int $threeSpaces
124
* @param integer $superfluous
128
public function missingDescription($threeSpaces)
131
}//end missingDescroption()
135
* Comments not capitalised.
137
* @param integer $one comment
138
* @param array $two -comment
139
* @param MyClas $three 0comment
144
public function oneSpaceAfterLongestVar($one, $two, MyClass $three)
147
}//end oneSpaceAfterLongestVar()
154
* A simple function comment.
156
* @param string $str The string passed in by reference
160
* @since %release_version%
162
public function functionOutsideClass(&$str)
165
}//end functionOutsideClass()
168
function missingCommentOutsideClass()
171
}//end missingCommentOutsideClass()
175
function tagBeforeComment()
178
}//end tagBeforeComment()
184
* @see FunctionCommentSniff.php
185
* @since unknown.release.date
187
public function noReturnOutsideClass()
190
}//end noReturnOutsideClass()
194
* Missing param comment.
196
* @param integer $one comment
204
* @throws UnknownException unknown
206
public function missingTwoParamComment($one, $two, $three)
209
}//end missingTwoParamComment()
213
* Missing return type.
216
* @throws ExceptionWithNoComment
219
public function missingReturnType()
222
}//end missingReturnType()
226
* Case-sensitive var type check with multiple return type.
228
* @param String $a1 Comment here.
229
* @param BoOL $a2 Comment here.
230
* @param INT $a3 Comment here.
231
* @param aRRay $a4 Comment here.
232
* @param real $a5 Comment here.
233
* @param double $a6 Comment here.
234
* @param Myclass $a7 Comment here.
237
* @return int|object|double|float|array(int=>MyClass)
239
public function caseSensitive($a1, $a2, $a3, arRay $a4, $a5, $a6, myclas $a7)
242
}//end caseSensitive()
246
* More type hint check for custom type and array.
248
* @param array $a1 Comment here.
249
* @param array $a2 Comment here.
250
* @param MyClass $a3 Comment here.
251
* @param MyClass $a4 Comment here.
254
* @return array(int => MyClass)
256
public function typeHint(MyClass $a1, $a2, myclass $a3, $a4)
258
return (3 => 'myclass obj');
264
* Mixed variable type separated by a '|'.
266
* @param array|string $a1 Comment here.
267
* @param mixed $a2 Comment here.
268
* @param string|array $a3 Comment here.
269
* @param MyClass|int $a4 Comment here.
274
public function mixedType($a1, $a2, $a3, $a4)
284
* @param array(MyClass) $a1 OK.
285
* @param array() $a2 Invalid type.
286
* @param array( $a3 Typo.
287
* @param array(int) $a4 Use 'array(integer)' instead.
288
* @param array(int => integer) $a5 Use 'array(integer => integer)' instead.
289
* @param array(integer => bool) $a6 Use 'array(integer => boolean)' instead.
290
* @param aRRay $a7 Use 'array' instead.
291
* @param string $a8 String with unknown type hint.
296
public function mixedArrayType($a1, $a2, array $a3, $a4, $a5, $a6, $a7, unknownTypeHint $a8)
300
}//end mixedArrayType()
332
public function missingShortDescriptionInFunctionComment()
336
}//end missingShortDescriptionInFunctionComment()
343
* Destructor should not include a return tag.
348
function __destruct()
354
* Constructor should not include a return tag.
358
function __construct()
367
* Comment param alignment test.
369
* @param string $varrr1 Comment1..
370
* @param string $vr2 Comment2.
371
* @param string $var3 Comment3..
376
public static function paramAlign($varrr1, $vr2, $var3)
385
* @param string $id Comment.
386
* @param array $design Comment.
391
public static function paint($id, array $design)
398
* Adds specified class name to class attribute of this widget.
403
public function myFunction()
405
if ($condition === FALSE) {
413
* Adds specified class name to class attribute of this widget.
418
public function myFunction()
420
if ($condition === FALSE) {
431
* Adds specified class name to class attribute of this widget.
436
public function myFunction()
438
if ($condition === FALSE) {
449
* @param string $arg1 An argument
457
function myFunction($arg1) {}
461
* An abstract function.
464
* @return array(string)
466
abstract final protected function myFunction();