Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
class VariableCommentUnitTest
3
{
4
 
5
    /**
6
     * short description of the member variable.
7
     *
8
     * long description of member variable. Can span over multiple
9
     * lines and can have multiple paragraphs.
10
     *
11
     * @var   array
12
     * @since %release_version%
13
     * @see   otherFunctions()
14
     * @see   anotherFunctions()
15
     */
16
     public $variableName = array();
17
 
18
 
19
     // Not "/**" style comment.
20
     //
21
     // @var   string
22
     // @since 4.0.0
23
     private  $_incorrectCommentStyle = '';
24
 
25
 
26
     protected $noComment = '';
27
 
28
 
29
    /**
30
     *
31
     * Extra newline before short comment.
32
     *
33
     * @var   string
34
     * @since %release_version%
35
     * @since another.since.tag
36
     */
37
     public $extraNewlineBeforeShort = '';
38
 
39
 
40
    /**
41
     * Extra newline between short description.
42
     *
43
     *
44
     *
45
     * - Long description,
46
     * with wrong tag order.
47
     *
48
     * @since %release_version%
49
     * @var   string
50
     */
51
     private $_extraNewlineBetween = '';
52
 
53
 
54
    /**
55
     * Extra newline before tags.
56
     *
57
     * Long description,
58
     * with two var tags.
59
     *
60
     *
61
     * @var   string
62
     * @var   array
63
     * @since incorrect.version.number
64
     */
65
     protected $extraNewlineBeforeTags = '';
66
 
67
 
68
    /**
69
     * No newline before tags, var tag missing.
70
     * @since 4.0.12
71
     * @see   otherFunctions()
72
     */
73
     protected $noNewlineBeforeTags = '';
74
 
75
 
76
    /**
77
     * Short comment that spans multiple
78
     * lines and does not end with a full stop
79
     * also var type is missing
80
     *
81
     * @var
82
     * @since
83
     */
84
     public $singleLineFullStopShortComment = '';
85
 
86
 
87
    /**
88
     * Incorrect tag indentation.
89
     *
90
     * @var     string
91
     * @since    %release_version%
92
     * @see        otherFunctions()
93
     * @see anotherFunctions()
94
     * @see
95
     */
96
     public $singleLineFullStopShortComment = '';
97
 
98
 
99
    /**
100
     * Missing since tag
101
     *
102
     * @var     string
103
     */
104
     public $missingSinceTag = '';
105
 
106
 
107
    /**
108
     * Unknown summary tag
109
     *
110
     * @var     string
111
     * @since   mysource4-was-released
112
     * @summary unknown tag
113
     */
114
     public $missingSinceTag = '';
115
 
116
 
117
    /**
118
     * T_VARIABLE check, without scope.
119
     *
120
     * @var   string
121
     * @since 4.0.0
122
     */
123
     $variableCheck = '';
124
 
125
 
126
    /**
127
     * T_VARIABLE check, var in string and in function.
128
     *
129
     * @param integer $var1 First variable.
130
     * @param integer $var2 Second variable.
131
     *
132
     * @return integer
133
     */
134
    protected function checkVariable($var1, $var2)
135
    {
136
        $var4 = 'A normal variable';
137
        $var5 = PHP_CodeSniffer_Tokens::$operators;
138
        echo "Printing $var1 $var2 and unknown $var3 in a double quoted  string\n";
139
        foreach (self::$_array as $index => $content) {
140
            echo $content;
141
        }
142
 
143
        return $var1;
144
 
145
    }//end checkVariable()
146
 
147
 
148
    /**
149
     *
150
     *
151
     */
152
     $emptyVarDoc = '';
153
 
154
     /**
155
     * Var type checking (int v.s. integer).
156
     *
157
     * @var   int
158
     * @since %release_version%
159
     */
160
     private $_varSimpleTypeCheck;
161
 
162
 
163
     /**
164
     * Var type checking (array(int => string) v.s. array(int => string)).
165
     *
166
     * @var   array(int => string)
167
     * @since %release_version%
168
     */
169
     private $_varArrayTypeCheck;
170
 
171
 
172
     /**
173
     * Var type checking (STRING v.s. string).
174
     *
175
     * @var   STRING
176
     * @since %release_version%
177
     */
178
     private $_varCaseTypeCheck;
179
 
180
 
181
    /**
182
     * @var   integer
183
     * @since %release_version%
184
     */
185
     private $_varWithNoShortComment;
186
 
187
     protected $noComment2 = '';
188
 
189
 
190
}//end class
191
 
192
 
193
/**
194
 * VariableCommentUnitTest2.
195
 *
196
 * Long description goes here.
197
 *
198
 * @since 4.0.0
199
 */
200
class VariableCommentUnitTest2
201
{
202
 
203
   public $hello;
204
 
205
}//end class
206
 
207
?>