2
class VariableCommentUnitTest
6
* short description of the member variable.
8
* long description of member variable. Can span over multiple
9
* lines and can have multiple paragraphs.
12
* @see otherFunctions()
13
* @see anotherFunctions()
15
public $variableName = array();
18
// Not "/**" style comment.
21
private $_incorrectCommentStyle = '';
24
protected $noComment = '';
29
* Extra newline before short comment.
33
public $extraNewlineBeforeShort = '';
37
* Extra newline between short description.
45
private $_extraNewlineBetween = '';
49
* Extra newline before tags.
58
protected $extraNewlineBeforeTags = '';
62
* No newline before tags, var tag missing.
63
* @see otherFunctions()
65
protected $noNewlineBeforeTags = '';
69
* Short comment that spans multiple
70
* lines and does not end with a full stop
71
* also var type is missing
75
public $singleLineFullStopShortComment = '';
79
* Incorrect tag indentation.
82
* @see otherFunctions()
83
* @see anotherFunctions()
86
public $singleLineFullStopShortComment = '';
93
* @summary unknown tag
95
public $missingSinceTag = '';
99
* T_VARIABLE check, without scope.
107
* T_VARIABLE check, var in string and in function.
109
* @param integer $var1 First variable.
110
* @param integer $var2 Second variable.
114
protected function checkVariable($var1, $var2)
116
$var4 = 'A normal variable';
117
$var5 = PHP_CodeSniffer_Tokens::$operators;
118
echo "Printing $var1 $var2 and unknown $var3 in a double quoted string\n";
119
foreach (self::$_array as $index => $content) {
125
}//end checkVariable()
135
* Var type checking (int v.s. integer).
139
private $_varSimpleTypeCheck;
143
* Var type checking (array(int => string) v.s. array(int => string)).
145
* @var array(int => string)
147
private $_varArrayTypeCheck;
151
* Var type checking (STRING v.s. string).
155
private $_varCaseTypeCheck;
161
private $_varWithNoShortComment;
163
protected $noComment2 = '';
170
* VariableCommentUnitTest2.
172
* Long description goes here.
175
class VariableCommentUnitTest2
180
/** Comment starts here.
185
private $_varCaseTypeCheck;