@@ -2,5 +2,5 @@ |
||
2 | 2 | function myFunc($blah, $x, $blah) {} |
3 | 3 | function myFunc($a, $b, $c) {} |
4 | 4 | function myFunc($a, $a, $a) {} |
5 | -function myFunc($a='1', $b='1', $a='2') {} |
|
5 | +function myFunc($a = '1', $b = '1', $a = '2') {} |
|
6 | 6 | ?> |
@@ -44,42 +44,42 @@ |
||
44 | 44 | { |
45 | 45 | if ($testFile === 'MultiLineFunctionDeclarationUnitTest.inc') { |
46 | 46 | $errors = array( |
47 | - 2 => 1, |
|
48 | - 3 => 1, |
|
49 | - 4 => 2, |
|
50 | - 5 => 1, |
|
51 | - 7 => 1, |
|
52 | - 11 => 1, |
|
53 | - 12 => 1, |
|
54 | - 13 => 1, |
|
55 | - 16 => 1, |
|
56 | - 36 => 1, |
|
57 | - 43 => 2, |
|
58 | - 48 => 1, |
|
59 | - 81 => 1, |
|
60 | - 82 => 2, |
|
61 | - 88 => 1, |
|
62 | - 102 => 2, |
|
63 | - 137 => 1, |
|
64 | - 141 => 2, |
|
65 | - 142 => 1, |
|
66 | - ); |
|
47 | + 2 => 1, |
|
48 | + 3 => 1, |
|
49 | + 4 => 2, |
|
50 | + 5 => 1, |
|
51 | + 7 => 1, |
|
52 | + 11 => 1, |
|
53 | + 12 => 1, |
|
54 | + 13 => 1, |
|
55 | + 16 => 1, |
|
56 | + 36 => 1, |
|
57 | + 43 => 2, |
|
58 | + 48 => 1, |
|
59 | + 81 => 1, |
|
60 | + 82 => 2, |
|
61 | + 88 => 1, |
|
62 | + 102 => 2, |
|
63 | + 137 => 1, |
|
64 | + 141 => 2, |
|
65 | + 142 => 1, |
|
66 | + ); |
|
67 | 67 | } else { |
68 | 68 | $errors = array( |
69 | - 2 => 1, |
|
70 | - 3 => 1, |
|
71 | - 4 => 2, |
|
72 | - 5 => 1, |
|
73 | - 7 => 1, |
|
74 | - 11 => 1, |
|
75 | - 12 => 1, |
|
76 | - 13 => 1, |
|
77 | - 16 => 1, |
|
78 | - 26 => 1, |
|
79 | - 36 => 1, |
|
80 | - 43 => 2, |
|
81 | - 48 => 1, |
|
82 | - ); |
|
69 | + 2 => 1, |
|
70 | + 3 => 1, |
|
71 | + 4 => 2, |
|
72 | + 5 => 1, |
|
73 | + 7 => 1, |
|
74 | + 11 => 1, |
|
75 | + 12 => 1, |
|
76 | + 13 => 1, |
|
77 | + 16 => 1, |
|
78 | + 26 => 1, |
|
79 | + 36 => 1, |
|
80 | + 43 => 2, |
|
81 | + 48 => 1, |
|
82 | + ); |
|
83 | 83 | }//end if |
84 | 84 | |
85 | 85 | return $errors; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='MultiLineFunctionDeclarationUnitTest.inc') |
|
43 | + public function getErrorList($testFile = 'MultiLineFunctionDeclarationUnitTest.inc') |
|
44 | 44 | { |
45 | 45 | if ($testFile === 'MultiLineFunctionDeclarationUnitTest.inc') { |
46 | 46 | $errors = array( |
@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | return array( |
46 | 46 | 6 => 1, |
47 | - ); |
|
47 | + ); |
|
48 | 48 | |
49 | 49 | }//end getErrorList() |
50 | 50 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | 7 => 1, |
47 | 47 | 8 => 1, |
48 | 48 | 9 => 1, |
49 | - ); |
|
49 | + ); |
|
50 | 50 | |
51 | 51 | }//end getErrorList() |
52 | 52 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | return array( |
46 | 46 | 7 => 1, |
47 | - ); |
|
47 | + ); |
|
48 | 48 | |
49 | 49 | }//end getErrorList() |
50 | 50 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | 153 => 1, |
53 | 53 | 163 => 1, |
54 | 54 | 178 => 1, |
55 | - ); |
|
55 | + ); |
|
56 | 56 | |
57 | 57 | }//end getErrorList() |
58 | 58 |
@@ -43,35 +43,35 @@ |
||
43 | 43 | public function getErrorList() |
44 | 44 | { |
45 | 45 | $errors = array( |
46 | - 8 => 1, |
|
47 | - 20 => 1, |
|
48 | - 24 => 1, |
|
49 | - 30 => 1, |
|
50 | - 31 => 1, |
|
51 | - 34 => 1, |
|
52 | - 40 => 1, |
|
53 | - 45 => 1, |
|
54 | - 49 => 1, |
|
55 | - 51 => 1, |
|
56 | - 53 => 1, |
|
57 | - 57 => 1, |
|
58 | - 60 => 1, |
|
59 | - 61 => 1, |
|
60 | - 63 => 1, |
|
61 | - 65 => 1, |
|
62 | - 68 => 1, |
|
63 | - 70 => 1, |
|
64 | - 72 => 1, |
|
65 | - 75 => 1, |
|
66 | - 84 => 1, |
|
67 | - 87 => 1, |
|
68 | - 89 => 1, |
|
69 | - 92 => 1, |
|
70 | - 111 => 1, |
|
71 | - 159 => 1, |
|
72 | - 181 => 1, |
|
73 | - 188 => 1, |
|
74 | - ); |
|
46 | + 8 => 1, |
|
47 | + 20 => 1, |
|
48 | + 24 => 1, |
|
49 | + 30 => 1, |
|
50 | + 31 => 1, |
|
51 | + 34 => 1, |
|
52 | + 40 => 1, |
|
53 | + 45 => 1, |
|
54 | + 49 => 1, |
|
55 | + 51 => 1, |
|
56 | + 53 => 1, |
|
57 | + 57 => 1, |
|
58 | + 60 => 1, |
|
59 | + 61 => 1, |
|
60 | + 63 => 1, |
|
61 | + 65 => 1, |
|
62 | + 68 => 1, |
|
63 | + 70 => 1, |
|
64 | + 72 => 1, |
|
65 | + 75 => 1, |
|
66 | + 84 => 1, |
|
67 | + 87 => 1, |
|
68 | + 89 => 1, |
|
69 | + 92 => 1, |
|
70 | + 111 => 1, |
|
71 | + 159 => 1, |
|
72 | + 181 => 1, |
|
73 | + 188 => 1, |
|
74 | + ); |
|
75 | 75 | |
76 | 76 | return $errors; |
77 | 77 |
@@ -12,16 +12,16 @@ discard block |
||
12 | 12 | * @see otherFunctions() |
13 | 13 | * @see anotherFunctions() |
14 | 14 | */ |
15 | - public $variableName = array(); |
|
15 | + public $variableName = array(); |
|
16 | 16 | |
17 | 17 | |
18 | - // Not "/**" style comment. |
|
19 | - // |
|
20 | - // @var string |
|
21 | - private $_incorrectCommentStyle = ''; |
|
18 | + // Not "/**" style comment. |
|
19 | + // |
|
20 | + // @var string |
|
21 | + private $_incorrectCommentStyle = ''; |
|
22 | 22 | |
23 | 23 | |
24 | - protected $noComment = ''; |
|
24 | + protected $noComment = ''; |
|
25 | 25 | |
26 | 26 | |
27 | 27 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * |
31 | 31 | * @var string |
32 | 32 | */ |
33 | - public $extraNewlineBeforeShort = ''; |
|
33 | + public $extraNewlineBeforeShort = ''; |
|
34 | 34 | |
35 | 35 | |
36 | 36 | /** |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @var string |
44 | 44 | */ |
45 | - private $_extraNewlineBetween = ''; |
|
45 | + private $_extraNewlineBetween = ''; |
|
46 | 46 | |
47 | 47 | |
48 | 48 | /** |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | * @var string |
56 | 56 | * @var array |
57 | 57 | */ |
58 | - protected $extraNewlineBeforeTags = ''; |
|
58 | + protected $extraNewlineBeforeTags = ''; |
|
59 | 59 | |
60 | 60 | |
61 | 61 | /** |
62 | 62 | * No newline before tags, var tag missing. |
63 | 63 | * @see otherFunctions() |
64 | 64 | */ |
65 | - protected $noNewlineBeforeTags = ''; |
|
65 | + protected $noNewlineBeforeTags = ''; |
|
66 | 66 | |
67 | 67 | |
68 | 68 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * |
73 | 73 | * @var |
74 | 74 | */ |
75 | - public $singleLineFullStopShortComment = ''; |
|
75 | + public $singleLineFullStopShortComment = ''; |
|
76 | 76 | |
77 | 77 | |
78 | 78 | /** |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @see anotherFunctions() |
84 | 84 | * @see |
85 | 85 | */ |
86 | - public $singleLineFullStopShortComment = ''; |
|
86 | + public $singleLineFullStopShortComment = ''; |
|
87 | 87 | |
88 | 88 | |
89 | 89 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * @var string |
93 | 93 | * @summary unknown tag |
94 | 94 | */ |
95 | - public $missingSinceTag = ''; |
|
95 | + public $missingSinceTag = ''; |
|
96 | 96 | |
97 | 97 | |
98 | 98 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | * |
101 | 101 | * @var string |
102 | 102 | */ |
103 | - $variableCheck = ''; |
|
103 | + $variableCheck = ''; |
|
104 | 104 | |
105 | 105 | |
106 | 106 | /** |
@@ -129,38 +129,38 @@ discard block |
||
129 | 129 | * |
130 | 130 | * |
131 | 131 | */ |
132 | - $emptyVarDoc = ''; |
|
132 | + $emptyVarDoc = ''; |
|
133 | 133 | |
134 | - /** |
|
135 | - * Var type checking (int v.s. integer). |
|
136 | - * |
|
137 | - * @var int |
|
138 | - */ |
|
139 | - private $_varSimpleTypeCheck; |
|
134 | + /** |
|
135 | + * Var type checking (int v.s. integer). |
|
136 | + * |
|
137 | + * @var int |
|
138 | + */ |
|
139 | + private $_varSimpleTypeCheck; |
|
140 | 140 | |
141 | 141 | |
142 | - /** |
|
143 | - * Var type checking (array(int => string) v.s. array(int => string)). |
|
144 | - * |
|
145 | - * @var array(int => string) |
|
146 | - */ |
|
147 | - private $_varArrayTypeCheck; |
|
142 | + /** |
|
143 | + * Var type checking (array(int => string) v.s. array(int => string)). |
|
144 | + * |
|
145 | + * @var array(int => string) |
|
146 | + */ |
|
147 | + private $_varArrayTypeCheck; |
|
148 | 148 | |
149 | 149 | |
150 | - /** |
|
151 | - * Var type checking (STRING v.s. string). |
|
152 | - * |
|
153 | - * @var STRING |
|
154 | - */ |
|
155 | - private $_varCaseTypeCheck; |
|
150 | + /** |
|
151 | + * Var type checking (STRING v.s. string). |
|
152 | + * |
|
153 | + * @var STRING |
|
154 | + */ |
|
155 | + private $_varCaseTypeCheck; |
|
156 | 156 | |
157 | 157 | |
158 | 158 | /** |
159 | 159 | * @var integer |
160 | 160 | */ |
161 | - private $_varWithNoShortComment; |
|
161 | + private $_varWithNoShortComment; |
|
162 | 162 | |
163 | - protected $noComment2 = ''; |
|
163 | + protected $noComment2 = ''; |
|
164 | 164 | |
165 | 165 | |
166 | 166 | }//end class |
@@ -175,21 +175,21 @@ discard block |
||
175 | 175 | class VariableCommentUnitTest2 |
176 | 176 | { |
177 | 177 | |
178 | - public $hello; |
|
178 | + public $hello; |
|
179 | 179 | |
180 | 180 | /** Comment starts here. |
181 | 181 | * |
182 | 182 | * @var string |
183 | 183 | * |
184 | 184 | */ |
185 | - private $_varCaseTypeCheck; |
|
186 | - |
|
187 | - /** |
|
188 | - * 这是一条测试评论. |
|
189 | - * |
|
190 | - * @var string |
|
191 | - */ |
|
192 | - public $foo; |
|
185 | + private $_varCaseTypeCheck; |
|
186 | + |
|
187 | + /** |
|
188 | + * 这是一条测试评论. |
|
189 | + * |
|
190 | + * @var string |
|
191 | + */ |
|
192 | + public $foo; |
|
193 | 193 | |
194 | 194 | }//end class |
195 | 195 |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 629 => 1, |
69 | 69 | 663 => 1, |
70 | 70 | 765 => 1, |
71 | - ); |
|
71 | + ); |
|
72 | 72 | break; |
73 | 73 | case 'LongConditionClosingCommentUnitTest.js': |
74 | 74 | return array( |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | 401 => 1, |
85 | 85 | 439 => 1, |
86 | 86 | 444 => 1, |
87 | - ); |
|
87 | + ); |
|
88 | 88 | break; |
89 | 89 | default: |
90 | 90 | return array(); |
@@ -45,50 +45,50 @@ |
||
45 | 45 | public function getErrorList($testFile='LongConditionClosingCommentUnitTest.inc') |
46 | 46 | { |
47 | 47 | switch ($testFile) { |
48 | - case 'LongConditionClosingCommentUnitTest.inc': |
|
49 | - return array( |
|
50 | - 49 => 1, |
|
51 | - 99 => 1, |
|
52 | - 146 => 1, |
|
53 | - 192 => 1, |
|
54 | - 215 => 1, |
|
55 | - 238 => 1, |
|
56 | - 261 => 1, |
|
57 | - 286 => 1, |
|
58 | - 309 => 1, |
|
59 | - 332 => 1, |
|
60 | - 355 => 1, |
|
61 | - 378 => 1, |
|
62 | - 493 => 1, |
|
63 | - 531 => 1, |
|
64 | - 536 => 1, |
|
65 | - 540 => 1, |
|
66 | - 562 => 1, |
|
67 | - 601 => 1, |
|
68 | - 629 => 1, |
|
69 | - 663 => 1, |
|
70 | - 765 => 1, |
|
71 | - ); |
|
72 | - break; |
|
73 | - case 'LongConditionClosingCommentUnitTest.js': |
|
74 | - return array( |
|
75 | - 47 => 1, |
|
76 | - 97 => 1, |
|
77 | - 144 => 1, |
|
78 | - 190 => 1, |
|
79 | - 213 => 1, |
|
80 | - 238 => 1, |
|
81 | - 261 => 1, |
|
82 | - 284 => 1, |
|
83 | - 307 => 1, |
|
84 | - 401 => 1, |
|
85 | - 439 => 1, |
|
86 | - 444 => 1, |
|
87 | - ); |
|
88 | - break; |
|
89 | - default: |
|
90 | - return array(); |
|
91 | - break; |
|
48 | + case 'LongConditionClosingCommentUnitTest.inc': |
|
49 | + return array( |
|
50 | + 49 => 1, |
|
51 | + 99 => 1, |
|
52 | + 146 => 1, |
|
53 | + 192 => 1, |
|
54 | + 215 => 1, |
|
55 | + 238 => 1, |
|
56 | + 261 => 1, |
|
57 | + 286 => 1, |
|
58 | + 309 => 1, |
|
59 | + 332 => 1, |
|
60 | + 355 => 1, |
|
61 | + 378 => 1, |
|
62 | + 493 => 1, |
|
63 | + 531 => 1, |
|
64 | + 536 => 1, |
|
65 | + 540 => 1, |
|
66 | + 562 => 1, |
|
67 | + 601 => 1, |
|
68 | + 629 => 1, |
|
69 | + 663 => 1, |
|
70 | + 765 => 1, |
|
71 | + ); |
|
72 | + break; |
|
73 | + case 'LongConditionClosingCommentUnitTest.js': |
|
74 | + return array( |
|
75 | + 47 => 1, |
|
76 | + 97 => 1, |
|
77 | + 144 => 1, |
|
78 | + 190 => 1, |
|
79 | + 213 => 1, |
|
80 | + 238 => 1, |
|
81 | + 261 => 1, |
|
82 | + 284 => 1, |
|
83 | + 307 => 1, |
|
84 | + 401 => 1, |
|
85 | + 439 => 1, |
|
86 | + 444 => 1, |
|
87 | + ); |
|
88 | + break; |
|
89 | + default: |
|
90 | + return array(); |
|
91 | + break; |
|
92 | 92 | }//end switch |
93 | 93 | |
94 | 94 | }//end getErrorList() |
@@ -42,7 +42,7 @@ |
||
42 | 42 | * |
43 | 43 | * @return array<int, int> |
44 | 44 | */ |
45 | - public function getErrorList($testFile='LongConditionClosingCommentUnitTest.inc') |
|
45 | + public function getErrorList($testFile = 'LongConditionClosingCommentUnitTest.inc') |
|
46 | 46 | { |
47 | 47 | switch ($testFile) { |
48 | 48 | case 'LongConditionClosingCommentUnitTest.inc': |