@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='') |
|
28 | + public function getErrorList($testFile = '') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'ArrayDeclarationUnitTest.1.inc': |
@@ -15,222 +15,222 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'ArrayDeclarationUnitTest.1.inc': |
|
32 | - return [ |
|
33 | - 2 => 1, |
|
34 | - 8 => 2, |
|
35 | - 10 => 2, |
|
36 | - 22 => 1, |
|
37 | - 23 => 2, |
|
38 | - 24 => 2, |
|
39 | - 25 => 1, |
|
40 | - 31 => 2, |
|
41 | - 35 => 1, |
|
42 | - 36 => 2, |
|
43 | - 41 => 1, |
|
44 | - 46 => 1, |
|
45 | - 47 => 1, |
|
46 | - 50 => 1, |
|
47 | - 51 => 1, |
|
48 | - 53 => 1, |
|
49 | - 56 => 1, |
|
50 | - 58 => 1, |
|
51 | - 61 => 1, |
|
52 | - 62 => 1, |
|
53 | - 63 => 1, |
|
54 | - 64 => 1, |
|
55 | - 65 => 1, |
|
56 | - 66 => 3, |
|
57 | - 70 => 1, |
|
58 | - 76 => 2, |
|
59 | - 77 => 1, |
|
60 | - 78 => 7, |
|
61 | - 79 => 2, |
|
62 | - 81 => 2, |
|
63 | - 82 => 4, |
|
64 | - 87 => 1, |
|
65 | - 88 => 1, |
|
66 | - 92 => 1, |
|
67 | - 97 => 1, |
|
68 | - 100 => 1, |
|
69 | - 101 => 1, |
|
70 | - 102 => 1, |
|
71 | - 105 => 1, |
|
72 | - 106 => 1, |
|
73 | - 107 => 1, |
|
74 | - 125 => 1, |
|
75 | - 126 => 1, |
|
76 | - 141 => 1, |
|
77 | - 144 => 1, |
|
78 | - 146 => 1, |
|
79 | - 148 => 1, |
|
80 | - 151 => 1, |
|
81 | - 157 => 1, |
|
82 | - 173 => 1, |
|
83 | - 174 => 3, |
|
84 | - 179 => 1, |
|
85 | - 182 => 1, |
|
86 | - 188 => 1, |
|
87 | - 207 => 1, |
|
88 | - 212 => 2, |
|
89 | - 214 => 1, |
|
90 | - 218 => 2, |
|
91 | - 219 => 2, |
|
92 | - 223 => 1, |
|
93 | - 255 => 1, |
|
94 | - 294 => 1, |
|
95 | - 295 => 1, |
|
96 | - 296 => 1, |
|
97 | - 311 => 1, |
|
98 | - 317 => 1, |
|
99 | - 339 => 2, |
|
100 | - 348 => 2, |
|
101 | - 352 => 2, |
|
102 | - 355 => 3, |
|
103 | - 358 => 3, |
|
104 | - 359 => 2, |
|
105 | - 360 => 1, |
|
106 | - 362 => 1, |
|
107 | - 363 => 2, |
|
108 | - 364 => 1, |
|
109 | - 365 => 2, |
|
110 | - 366 => 2, |
|
111 | - 367 => 2, |
|
112 | - 368 => 2, |
|
113 | - 369 => 1, |
|
114 | - 370 => 1, |
|
115 | - 383 => 1, |
|
116 | - 394 => 1, |
|
117 | - 400 => 1, |
|
118 | - 406 => 1, |
|
119 | - 441 => 1, |
|
120 | - 444 => 2, |
|
121 | - 445 => 2, |
|
122 | - 447 => 2, |
|
123 | - 448 => 3, |
|
124 | - 467 => 1, |
|
125 | - 471 => 1, |
|
126 | - 472 => 1, |
|
127 | - ]; |
|
128 | - case 'ArrayDeclarationUnitTest.2.inc': |
|
129 | - return [ |
|
130 | - 2 => 1, |
|
131 | - 10 => 1, |
|
132 | - 23 => 2, |
|
133 | - 24 => 2, |
|
134 | - 25 => 1, |
|
135 | - 31 => 2, |
|
136 | - 36 => 2, |
|
137 | - 41 => 1, |
|
138 | - 46 => 1, |
|
139 | - 47 => 1, |
|
140 | - 51 => 1, |
|
141 | - 53 => 1, |
|
142 | - 56 => 1, |
|
143 | - 61 => 1, |
|
144 | - 63 => 1, |
|
145 | - 64 => 1, |
|
146 | - 65 => 1, |
|
147 | - 66 => 2, |
|
148 | - 70 => 1, |
|
149 | - 76 => 1, |
|
150 | - 77 => 1, |
|
151 | - 78 => 7, |
|
152 | - 79 => 2, |
|
153 | - 81 => 2, |
|
154 | - 82 => 4, |
|
155 | - 87 => 1, |
|
156 | - 88 => 1, |
|
157 | - 92 => 1, |
|
158 | - 97 => 1, |
|
159 | - 100 => 1, |
|
160 | - 101 => 1, |
|
161 | - 102 => 1, |
|
162 | - 105 => 1, |
|
163 | - 106 => 1, |
|
164 | - 107 => 1, |
|
165 | - 125 => 1, |
|
166 | - 126 => 1, |
|
167 | - 141 => 1, |
|
168 | - 144 => 1, |
|
169 | - 146 => 1, |
|
170 | - 148 => 1, |
|
171 | - 151 => 1, |
|
172 | - 157 => 1, |
|
173 | - 173 => 1, |
|
174 | - 174 => 3, |
|
175 | - 179 => 1, |
|
176 | - 190 => 1, |
|
177 | - 191 => 1, |
|
178 | - 192 => 1, |
|
179 | - 207 => 1, |
|
180 | - 210 => 1, |
|
181 | - 211 => 1, |
|
182 | - 215 => 1, |
|
183 | - 247 => 1, |
|
184 | - 286 => 1, |
|
185 | - 287 => 1, |
|
186 | - 288 => 1, |
|
187 | - 303 => 1, |
|
188 | - 309 => 1, |
|
189 | - 331 => 2, |
|
190 | - 345 => 3, |
|
191 | - 348 => 3, |
|
192 | - 349 => 2, |
|
193 | - 350 => 1, |
|
194 | - 352 => 2, |
|
195 | - 353 => 2, |
|
196 | - 354 => 2, |
|
197 | - 355 => 2, |
|
198 | - 356 => 2, |
|
199 | - 357 => 1, |
|
200 | - 358 => 1, |
|
201 | - 372 => 1, |
|
202 | - 383 => 1, |
|
203 | - 389 => 1, |
|
204 | - 395 => 1, |
|
205 | - 430 => 1, |
|
206 | - 433 => 2, |
|
207 | - 434 => 2, |
|
208 | - 436 => 2, |
|
209 | - 437 => 3, |
|
210 | - 456 => 1, |
|
211 | - 460 => 1, |
|
212 | - 461 => 1, |
|
213 | - ]; |
|
214 | - default: |
|
215 | - return []; |
|
216 | - }//end switch |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'ArrayDeclarationUnitTest.1.inc': |
|
32 | + return [ |
|
33 | + 2 => 1, |
|
34 | + 8 => 2, |
|
35 | + 10 => 2, |
|
36 | + 22 => 1, |
|
37 | + 23 => 2, |
|
38 | + 24 => 2, |
|
39 | + 25 => 1, |
|
40 | + 31 => 2, |
|
41 | + 35 => 1, |
|
42 | + 36 => 2, |
|
43 | + 41 => 1, |
|
44 | + 46 => 1, |
|
45 | + 47 => 1, |
|
46 | + 50 => 1, |
|
47 | + 51 => 1, |
|
48 | + 53 => 1, |
|
49 | + 56 => 1, |
|
50 | + 58 => 1, |
|
51 | + 61 => 1, |
|
52 | + 62 => 1, |
|
53 | + 63 => 1, |
|
54 | + 64 => 1, |
|
55 | + 65 => 1, |
|
56 | + 66 => 3, |
|
57 | + 70 => 1, |
|
58 | + 76 => 2, |
|
59 | + 77 => 1, |
|
60 | + 78 => 7, |
|
61 | + 79 => 2, |
|
62 | + 81 => 2, |
|
63 | + 82 => 4, |
|
64 | + 87 => 1, |
|
65 | + 88 => 1, |
|
66 | + 92 => 1, |
|
67 | + 97 => 1, |
|
68 | + 100 => 1, |
|
69 | + 101 => 1, |
|
70 | + 102 => 1, |
|
71 | + 105 => 1, |
|
72 | + 106 => 1, |
|
73 | + 107 => 1, |
|
74 | + 125 => 1, |
|
75 | + 126 => 1, |
|
76 | + 141 => 1, |
|
77 | + 144 => 1, |
|
78 | + 146 => 1, |
|
79 | + 148 => 1, |
|
80 | + 151 => 1, |
|
81 | + 157 => 1, |
|
82 | + 173 => 1, |
|
83 | + 174 => 3, |
|
84 | + 179 => 1, |
|
85 | + 182 => 1, |
|
86 | + 188 => 1, |
|
87 | + 207 => 1, |
|
88 | + 212 => 2, |
|
89 | + 214 => 1, |
|
90 | + 218 => 2, |
|
91 | + 219 => 2, |
|
92 | + 223 => 1, |
|
93 | + 255 => 1, |
|
94 | + 294 => 1, |
|
95 | + 295 => 1, |
|
96 | + 296 => 1, |
|
97 | + 311 => 1, |
|
98 | + 317 => 1, |
|
99 | + 339 => 2, |
|
100 | + 348 => 2, |
|
101 | + 352 => 2, |
|
102 | + 355 => 3, |
|
103 | + 358 => 3, |
|
104 | + 359 => 2, |
|
105 | + 360 => 1, |
|
106 | + 362 => 1, |
|
107 | + 363 => 2, |
|
108 | + 364 => 1, |
|
109 | + 365 => 2, |
|
110 | + 366 => 2, |
|
111 | + 367 => 2, |
|
112 | + 368 => 2, |
|
113 | + 369 => 1, |
|
114 | + 370 => 1, |
|
115 | + 383 => 1, |
|
116 | + 394 => 1, |
|
117 | + 400 => 1, |
|
118 | + 406 => 1, |
|
119 | + 441 => 1, |
|
120 | + 444 => 2, |
|
121 | + 445 => 2, |
|
122 | + 447 => 2, |
|
123 | + 448 => 3, |
|
124 | + 467 => 1, |
|
125 | + 471 => 1, |
|
126 | + 472 => 1, |
|
127 | + ]; |
|
128 | + case 'ArrayDeclarationUnitTest.2.inc': |
|
129 | + return [ |
|
130 | + 2 => 1, |
|
131 | + 10 => 1, |
|
132 | + 23 => 2, |
|
133 | + 24 => 2, |
|
134 | + 25 => 1, |
|
135 | + 31 => 2, |
|
136 | + 36 => 2, |
|
137 | + 41 => 1, |
|
138 | + 46 => 1, |
|
139 | + 47 => 1, |
|
140 | + 51 => 1, |
|
141 | + 53 => 1, |
|
142 | + 56 => 1, |
|
143 | + 61 => 1, |
|
144 | + 63 => 1, |
|
145 | + 64 => 1, |
|
146 | + 65 => 1, |
|
147 | + 66 => 2, |
|
148 | + 70 => 1, |
|
149 | + 76 => 1, |
|
150 | + 77 => 1, |
|
151 | + 78 => 7, |
|
152 | + 79 => 2, |
|
153 | + 81 => 2, |
|
154 | + 82 => 4, |
|
155 | + 87 => 1, |
|
156 | + 88 => 1, |
|
157 | + 92 => 1, |
|
158 | + 97 => 1, |
|
159 | + 100 => 1, |
|
160 | + 101 => 1, |
|
161 | + 102 => 1, |
|
162 | + 105 => 1, |
|
163 | + 106 => 1, |
|
164 | + 107 => 1, |
|
165 | + 125 => 1, |
|
166 | + 126 => 1, |
|
167 | + 141 => 1, |
|
168 | + 144 => 1, |
|
169 | + 146 => 1, |
|
170 | + 148 => 1, |
|
171 | + 151 => 1, |
|
172 | + 157 => 1, |
|
173 | + 173 => 1, |
|
174 | + 174 => 3, |
|
175 | + 179 => 1, |
|
176 | + 190 => 1, |
|
177 | + 191 => 1, |
|
178 | + 192 => 1, |
|
179 | + 207 => 1, |
|
180 | + 210 => 1, |
|
181 | + 211 => 1, |
|
182 | + 215 => 1, |
|
183 | + 247 => 1, |
|
184 | + 286 => 1, |
|
185 | + 287 => 1, |
|
186 | + 288 => 1, |
|
187 | + 303 => 1, |
|
188 | + 309 => 1, |
|
189 | + 331 => 2, |
|
190 | + 345 => 3, |
|
191 | + 348 => 3, |
|
192 | + 349 => 2, |
|
193 | + 350 => 1, |
|
194 | + 352 => 2, |
|
195 | + 353 => 2, |
|
196 | + 354 => 2, |
|
197 | + 355 => 2, |
|
198 | + 356 => 2, |
|
199 | + 357 => 1, |
|
200 | + 358 => 1, |
|
201 | + 372 => 1, |
|
202 | + 383 => 1, |
|
203 | + 389 => 1, |
|
204 | + 395 => 1, |
|
205 | + 430 => 1, |
|
206 | + 433 => 2, |
|
207 | + 434 => 2, |
|
208 | + 436 => 2, |
|
209 | + 437 => 3, |
|
210 | + 456 => 1, |
|
211 | + 460 => 1, |
|
212 | + 461 => 1, |
|
213 | + ]; |
|
214 | + default: |
|
215 | + return []; |
|
216 | + }//end switch |
|
217 | 217 | |
218 | - }//end getErrorList() |
|
218 | + }//end getErrorList() |
|
219 | 219 | |
220 | 220 | |
221 | - /** |
|
222 | - * Returns the lines where warnings should occur. |
|
223 | - * |
|
224 | - * The key of the array should represent the line number and the value |
|
225 | - * should represent the number of warnings that should occur on that line. |
|
226 | - * |
|
227 | - * @return array<int, int> |
|
228 | - */ |
|
229 | - public function getWarningList() |
|
230 | - { |
|
231 | - return []; |
|
221 | + /** |
|
222 | + * Returns the lines where warnings should occur. |
|
223 | + * |
|
224 | + * The key of the array should represent the line number and the value |
|
225 | + * should represent the number of warnings that should occur on that line. |
|
226 | + * |
|
227 | + * @return array<int, int> |
|
228 | + */ |
|
229 | + public function getWarningList() |
|
230 | + { |
|
231 | + return []; |
|
232 | 232 | |
233 | - }//end getWarningList() |
|
233 | + }//end getWarningList() |
|
234 | 234 | |
235 | 235 | |
236 | 236 | }//end class |
@@ -28,191 +28,191 @@ |
||
28 | 28 | public function getErrorList($testFile='') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'ArrayDeclarationUnitTest.1.inc': |
|
32 | - return [ |
|
33 | - 2 => 1, |
|
34 | - 8 => 2, |
|
35 | - 10 => 2, |
|
36 | - 22 => 1, |
|
37 | - 23 => 2, |
|
38 | - 24 => 2, |
|
39 | - 25 => 1, |
|
40 | - 31 => 2, |
|
41 | - 35 => 1, |
|
42 | - 36 => 2, |
|
43 | - 41 => 1, |
|
44 | - 46 => 1, |
|
45 | - 47 => 1, |
|
46 | - 50 => 1, |
|
47 | - 51 => 1, |
|
48 | - 53 => 1, |
|
49 | - 56 => 1, |
|
50 | - 58 => 1, |
|
51 | - 61 => 1, |
|
52 | - 62 => 1, |
|
53 | - 63 => 1, |
|
54 | - 64 => 1, |
|
55 | - 65 => 1, |
|
56 | - 66 => 3, |
|
57 | - 70 => 1, |
|
58 | - 76 => 2, |
|
59 | - 77 => 1, |
|
60 | - 78 => 7, |
|
61 | - 79 => 2, |
|
62 | - 81 => 2, |
|
63 | - 82 => 4, |
|
64 | - 87 => 1, |
|
65 | - 88 => 1, |
|
66 | - 92 => 1, |
|
67 | - 97 => 1, |
|
68 | - 100 => 1, |
|
69 | - 101 => 1, |
|
70 | - 102 => 1, |
|
71 | - 105 => 1, |
|
72 | - 106 => 1, |
|
73 | - 107 => 1, |
|
74 | - 125 => 1, |
|
75 | - 126 => 1, |
|
76 | - 141 => 1, |
|
77 | - 144 => 1, |
|
78 | - 146 => 1, |
|
79 | - 148 => 1, |
|
80 | - 151 => 1, |
|
81 | - 157 => 1, |
|
82 | - 173 => 1, |
|
83 | - 174 => 3, |
|
84 | - 179 => 1, |
|
85 | - 182 => 1, |
|
86 | - 188 => 1, |
|
87 | - 207 => 1, |
|
88 | - 212 => 2, |
|
89 | - 214 => 1, |
|
90 | - 218 => 2, |
|
91 | - 219 => 2, |
|
92 | - 223 => 1, |
|
93 | - 255 => 1, |
|
94 | - 294 => 1, |
|
95 | - 295 => 1, |
|
96 | - 296 => 1, |
|
97 | - 311 => 1, |
|
98 | - 317 => 1, |
|
99 | - 339 => 2, |
|
100 | - 348 => 2, |
|
101 | - 352 => 2, |
|
102 | - 355 => 3, |
|
103 | - 358 => 3, |
|
104 | - 359 => 2, |
|
105 | - 360 => 1, |
|
106 | - 362 => 1, |
|
107 | - 363 => 2, |
|
108 | - 364 => 1, |
|
109 | - 365 => 2, |
|
110 | - 366 => 2, |
|
111 | - 367 => 2, |
|
112 | - 368 => 2, |
|
113 | - 369 => 1, |
|
114 | - 370 => 1, |
|
115 | - 383 => 1, |
|
116 | - 394 => 1, |
|
117 | - 400 => 1, |
|
118 | - 406 => 1, |
|
119 | - 441 => 1, |
|
120 | - 444 => 2, |
|
121 | - 445 => 2, |
|
122 | - 447 => 2, |
|
123 | - 448 => 3, |
|
124 | - 467 => 1, |
|
125 | - 471 => 1, |
|
126 | - 472 => 1, |
|
127 | - ]; |
|
128 | - case 'ArrayDeclarationUnitTest.2.inc': |
|
129 | - return [ |
|
130 | - 2 => 1, |
|
131 | - 10 => 1, |
|
132 | - 23 => 2, |
|
133 | - 24 => 2, |
|
134 | - 25 => 1, |
|
135 | - 31 => 2, |
|
136 | - 36 => 2, |
|
137 | - 41 => 1, |
|
138 | - 46 => 1, |
|
139 | - 47 => 1, |
|
140 | - 51 => 1, |
|
141 | - 53 => 1, |
|
142 | - 56 => 1, |
|
143 | - 61 => 1, |
|
144 | - 63 => 1, |
|
145 | - 64 => 1, |
|
146 | - 65 => 1, |
|
147 | - 66 => 2, |
|
148 | - 70 => 1, |
|
149 | - 76 => 1, |
|
150 | - 77 => 1, |
|
151 | - 78 => 7, |
|
152 | - 79 => 2, |
|
153 | - 81 => 2, |
|
154 | - 82 => 4, |
|
155 | - 87 => 1, |
|
156 | - 88 => 1, |
|
157 | - 92 => 1, |
|
158 | - 97 => 1, |
|
159 | - 100 => 1, |
|
160 | - 101 => 1, |
|
161 | - 102 => 1, |
|
162 | - 105 => 1, |
|
163 | - 106 => 1, |
|
164 | - 107 => 1, |
|
165 | - 125 => 1, |
|
166 | - 126 => 1, |
|
167 | - 141 => 1, |
|
168 | - 144 => 1, |
|
169 | - 146 => 1, |
|
170 | - 148 => 1, |
|
171 | - 151 => 1, |
|
172 | - 157 => 1, |
|
173 | - 173 => 1, |
|
174 | - 174 => 3, |
|
175 | - 179 => 1, |
|
176 | - 190 => 1, |
|
177 | - 191 => 1, |
|
178 | - 192 => 1, |
|
179 | - 207 => 1, |
|
180 | - 210 => 1, |
|
181 | - 211 => 1, |
|
182 | - 215 => 1, |
|
183 | - 247 => 1, |
|
184 | - 286 => 1, |
|
185 | - 287 => 1, |
|
186 | - 288 => 1, |
|
187 | - 303 => 1, |
|
188 | - 309 => 1, |
|
189 | - 331 => 2, |
|
190 | - 345 => 3, |
|
191 | - 348 => 3, |
|
192 | - 349 => 2, |
|
193 | - 350 => 1, |
|
194 | - 352 => 2, |
|
195 | - 353 => 2, |
|
196 | - 354 => 2, |
|
197 | - 355 => 2, |
|
198 | - 356 => 2, |
|
199 | - 357 => 1, |
|
200 | - 358 => 1, |
|
201 | - 372 => 1, |
|
202 | - 383 => 1, |
|
203 | - 389 => 1, |
|
204 | - 395 => 1, |
|
205 | - 430 => 1, |
|
206 | - 433 => 2, |
|
207 | - 434 => 2, |
|
208 | - 436 => 2, |
|
209 | - 437 => 3, |
|
210 | - 456 => 1, |
|
211 | - 460 => 1, |
|
212 | - 461 => 1, |
|
213 | - ]; |
|
214 | - default: |
|
215 | - return []; |
|
31 | + case 'ArrayDeclarationUnitTest.1.inc': |
|
32 | + return [ |
|
33 | + 2 => 1, |
|
34 | + 8 => 2, |
|
35 | + 10 => 2, |
|
36 | + 22 => 1, |
|
37 | + 23 => 2, |
|
38 | + 24 => 2, |
|
39 | + 25 => 1, |
|
40 | + 31 => 2, |
|
41 | + 35 => 1, |
|
42 | + 36 => 2, |
|
43 | + 41 => 1, |
|
44 | + 46 => 1, |
|
45 | + 47 => 1, |
|
46 | + 50 => 1, |
|
47 | + 51 => 1, |
|
48 | + 53 => 1, |
|
49 | + 56 => 1, |
|
50 | + 58 => 1, |
|
51 | + 61 => 1, |
|
52 | + 62 => 1, |
|
53 | + 63 => 1, |
|
54 | + 64 => 1, |
|
55 | + 65 => 1, |
|
56 | + 66 => 3, |
|
57 | + 70 => 1, |
|
58 | + 76 => 2, |
|
59 | + 77 => 1, |
|
60 | + 78 => 7, |
|
61 | + 79 => 2, |
|
62 | + 81 => 2, |
|
63 | + 82 => 4, |
|
64 | + 87 => 1, |
|
65 | + 88 => 1, |
|
66 | + 92 => 1, |
|
67 | + 97 => 1, |
|
68 | + 100 => 1, |
|
69 | + 101 => 1, |
|
70 | + 102 => 1, |
|
71 | + 105 => 1, |
|
72 | + 106 => 1, |
|
73 | + 107 => 1, |
|
74 | + 125 => 1, |
|
75 | + 126 => 1, |
|
76 | + 141 => 1, |
|
77 | + 144 => 1, |
|
78 | + 146 => 1, |
|
79 | + 148 => 1, |
|
80 | + 151 => 1, |
|
81 | + 157 => 1, |
|
82 | + 173 => 1, |
|
83 | + 174 => 3, |
|
84 | + 179 => 1, |
|
85 | + 182 => 1, |
|
86 | + 188 => 1, |
|
87 | + 207 => 1, |
|
88 | + 212 => 2, |
|
89 | + 214 => 1, |
|
90 | + 218 => 2, |
|
91 | + 219 => 2, |
|
92 | + 223 => 1, |
|
93 | + 255 => 1, |
|
94 | + 294 => 1, |
|
95 | + 295 => 1, |
|
96 | + 296 => 1, |
|
97 | + 311 => 1, |
|
98 | + 317 => 1, |
|
99 | + 339 => 2, |
|
100 | + 348 => 2, |
|
101 | + 352 => 2, |
|
102 | + 355 => 3, |
|
103 | + 358 => 3, |
|
104 | + 359 => 2, |
|
105 | + 360 => 1, |
|
106 | + 362 => 1, |
|
107 | + 363 => 2, |
|
108 | + 364 => 1, |
|
109 | + 365 => 2, |
|
110 | + 366 => 2, |
|
111 | + 367 => 2, |
|
112 | + 368 => 2, |
|
113 | + 369 => 1, |
|
114 | + 370 => 1, |
|
115 | + 383 => 1, |
|
116 | + 394 => 1, |
|
117 | + 400 => 1, |
|
118 | + 406 => 1, |
|
119 | + 441 => 1, |
|
120 | + 444 => 2, |
|
121 | + 445 => 2, |
|
122 | + 447 => 2, |
|
123 | + 448 => 3, |
|
124 | + 467 => 1, |
|
125 | + 471 => 1, |
|
126 | + 472 => 1, |
|
127 | + ]; |
|
128 | + case 'ArrayDeclarationUnitTest.2.inc': |
|
129 | + return [ |
|
130 | + 2 => 1, |
|
131 | + 10 => 1, |
|
132 | + 23 => 2, |
|
133 | + 24 => 2, |
|
134 | + 25 => 1, |
|
135 | + 31 => 2, |
|
136 | + 36 => 2, |
|
137 | + 41 => 1, |
|
138 | + 46 => 1, |
|
139 | + 47 => 1, |
|
140 | + 51 => 1, |
|
141 | + 53 => 1, |
|
142 | + 56 => 1, |
|
143 | + 61 => 1, |
|
144 | + 63 => 1, |
|
145 | + 64 => 1, |
|
146 | + 65 => 1, |
|
147 | + 66 => 2, |
|
148 | + 70 => 1, |
|
149 | + 76 => 1, |
|
150 | + 77 => 1, |
|
151 | + 78 => 7, |
|
152 | + 79 => 2, |
|
153 | + 81 => 2, |
|
154 | + 82 => 4, |
|
155 | + 87 => 1, |
|
156 | + 88 => 1, |
|
157 | + 92 => 1, |
|
158 | + 97 => 1, |
|
159 | + 100 => 1, |
|
160 | + 101 => 1, |
|
161 | + 102 => 1, |
|
162 | + 105 => 1, |
|
163 | + 106 => 1, |
|
164 | + 107 => 1, |
|
165 | + 125 => 1, |
|
166 | + 126 => 1, |
|
167 | + 141 => 1, |
|
168 | + 144 => 1, |
|
169 | + 146 => 1, |
|
170 | + 148 => 1, |
|
171 | + 151 => 1, |
|
172 | + 157 => 1, |
|
173 | + 173 => 1, |
|
174 | + 174 => 3, |
|
175 | + 179 => 1, |
|
176 | + 190 => 1, |
|
177 | + 191 => 1, |
|
178 | + 192 => 1, |
|
179 | + 207 => 1, |
|
180 | + 210 => 1, |
|
181 | + 211 => 1, |
|
182 | + 215 => 1, |
|
183 | + 247 => 1, |
|
184 | + 286 => 1, |
|
185 | + 287 => 1, |
|
186 | + 288 => 1, |
|
187 | + 303 => 1, |
|
188 | + 309 => 1, |
|
189 | + 331 => 2, |
|
190 | + 345 => 3, |
|
191 | + 348 => 3, |
|
192 | + 349 => 2, |
|
193 | + 350 => 1, |
|
194 | + 352 => 2, |
|
195 | + 353 => 2, |
|
196 | + 354 => 2, |
|
197 | + 355 => 2, |
|
198 | + 356 => 2, |
|
199 | + 357 => 1, |
|
200 | + 358 => 1, |
|
201 | + 372 => 1, |
|
202 | + 383 => 1, |
|
203 | + 389 => 1, |
|
204 | + 395 => 1, |
|
205 | + 430 => 1, |
|
206 | + 433 => 2, |
|
207 | + 434 => 2, |
|
208 | + 436 => 2, |
|
209 | + 437 => 3, |
|
210 | + 456 => 1, |
|
211 | + 460 => 1, |
|
212 | + 461 => 1, |
|
213 | + ]; |
|
214 | + default: |
|
215 | + return []; |
|
216 | 216 | }//end switch |
217 | 217 | |
218 | 218 | }//end getErrorList() |
@@ -7,8 +7,8 @@ |
||
7 | 7 | } else if ($array [ ($index + 1) ] === null) { |
8 | 8 | } |
9 | 9 | $array = [ |
10 | - 'foo' => 'bar', |
|
11 | - 'bar' => 'foo', |
|
10 | + 'foo' => 'bar', |
|
11 | + 'bar' => 'foo', |
|
12 | 12 | ]; |
13 | 13 | |
14 | 14 | if ($foo) {} |
@@ -2,9 +2,9 @@ discard block |
||
2 | 2 | $myArray['key'] = $value; |
3 | 3 | $myArray[/* key start */'key'] = $value; |
4 | 4 | $myArray[/* key start */'key'/* key end */] = $value; |
5 | -$myArray [ 'key' ] = $value; |
|
5 | +$myArray ['key'] = $value; |
|
6 | 6 | if ($array[($index + 1)] === true) { |
7 | -} else if ($array [ ($index + 1) ] === null) { |
|
7 | +} else if ($array [($index + 1)] === null) { |
|
8 | 8 | } |
9 | 9 | $array = [ |
10 | 10 | 'foo' => 'bar', |
@@ -14,18 +14,18 @@ discard block |
||
14 | 14 | if ($foo) {} |
15 | 15 | [$a, $b] = $c; |
16 | 16 | |
17 | -echo foo()[ 1 ]; |
|
17 | +echo foo()[1]; |
|
18 | 18 | |
19 | 19 | echo $this->addedCustomFunctions['nonce']; |
20 | -echo $this->deprecated_functions[ $function_name ]['version']; |
|
20 | +echo $this->deprecated_functions[$function_name]['version']; |
|
21 | 21 | |
22 | -echo [ 1,2,3 ][0]; |
|
23 | -echo [ 1,2,3 ][ 0 ]; |
|
24 | -echo 'PHP'[ 0 ]; |
|
22 | +echo [1, 2, 3][0]; |
|
23 | +echo [1, 2, 3][0]; |
|
24 | +echo 'PHP'[0]; |
|
25 | 25 | |
26 | 26 | $array = []; |
27 | 27 | $var = $var[$var[$var]]]; // Syntax error |
28 | 28 | $var = $var[$var[$var]; // Syntax error |
29 | 29 | |
30 | -$myArray[ /* key start */'key'] = $value; |
|
31 | -$myArray[ /* key start */'key'/* key end */ ] = $value; |
|
30 | +$myArray[/* key start */'key'] = $value; |
|
31 | +$myArray[/* key start */'key'/* key end */] = $value; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'OperatorBracketUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'OperatorBracketUnitTest.inc': |
@@ -15,103 +15,103 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'OperatorBracketUnitTest.inc': |
|
32 | - return [ |
|
33 | - 3 => 1, |
|
34 | - 6 => 1, |
|
35 | - 9 => 1, |
|
36 | - 12 => 1, |
|
37 | - 15 => 1, |
|
38 | - 18 => 2, |
|
39 | - 20 => 1, |
|
40 | - 25 => 1, |
|
41 | - 28 => 1, |
|
42 | - 31 => 1, |
|
43 | - 34 => 1, |
|
44 | - 37 => 1, |
|
45 | - 40 => 1, |
|
46 | - 43 => 2, |
|
47 | - 45 => 1, |
|
48 | - 47 => 5, |
|
49 | - 48 => 1, |
|
50 | - 50 => 2, |
|
51 | - 55 => 2, |
|
52 | - 56 => 1, |
|
53 | - 63 => 2, |
|
54 | - 64 => 1, |
|
55 | - 67 => 1, |
|
56 | - 86 => 1, |
|
57 | - 90 => 1, |
|
58 | - 109 => 1, |
|
59 | - 130 => 1, |
|
60 | - 134 => 1, |
|
61 | - 135 => 2, |
|
62 | - 137 => 1, |
|
63 | - 139 => 1, |
|
64 | - 150 => 1, |
|
65 | - 161 => 1, |
|
66 | - 163 => 2, |
|
67 | - 165 => 2, |
|
68 | - 169 => 1, |
|
69 | - 174 => 1, |
|
70 | - 176 => 1, |
|
71 | - 185 => 1, |
|
72 | - 189 => 1, |
|
73 | - 193 => 1, |
|
74 | - 194 => 2, |
|
75 | - ]; |
|
76 | - break; |
|
77 | - case 'OperatorBracketUnitTest.js': |
|
78 | - return [ |
|
79 | - 5 => 1, |
|
80 | - 8 => 1, |
|
81 | - 11 => 1, |
|
82 | - 14 => 1, |
|
83 | - 24 => 1, |
|
84 | - 30 => 1, |
|
85 | - 33 => 1, |
|
86 | - 36 => 1, |
|
87 | - 39 => 1, |
|
88 | - 46 => 1, |
|
89 | - 47 => 1, |
|
90 | - 63 => 1, |
|
91 | - 108 => 1, |
|
92 | - ]; |
|
93 | - break; |
|
94 | - default: |
|
95 | - return []; |
|
96 | - break; |
|
97 | - }//end switch |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'OperatorBracketUnitTest.inc': |
|
32 | + return [ |
|
33 | + 3 => 1, |
|
34 | + 6 => 1, |
|
35 | + 9 => 1, |
|
36 | + 12 => 1, |
|
37 | + 15 => 1, |
|
38 | + 18 => 2, |
|
39 | + 20 => 1, |
|
40 | + 25 => 1, |
|
41 | + 28 => 1, |
|
42 | + 31 => 1, |
|
43 | + 34 => 1, |
|
44 | + 37 => 1, |
|
45 | + 40 => 1, |
|
46 | + 43 => 2, |
|
47 | + 45 => 1, |
|
48 | + 47 => 5, |
|
49 | + 48 => 1, |
|
50 | + 50 => 2, |
|
51 | + 55 => 2, |
|
52 | + 56 => 1, |
|
53 | + 63 => 2, |
|
54 | + 64 => 1, |
|
55 | + 67 => 1, |
|
56 | + 86 => 1, |
|
57 | + 90 => 1, |
|
58 | + 109 => 1, |
|
59 | + 130 => 1, |
|
60 | + 134 => 1, |
|
61 | + 135 => 2, |
|
62 | + 137 => 1, |
|
63 | + 139 => 1, |
|
64 | + 150 => 1, |
|
65 | + 161 => 1, |
|
66 | + 163 => 2, |
|
67 | + 165 => 2, |
|
68 | + 169 => 1, |
|
69 | + 174 => 1, |
|
70 | + 176 => 1, |
|
71 | + 185 => 1, |
|
72 | + 189 => 1, |
|
73 | + 193 => 1, |
|
74 | + 194 => 2, |
|
75 | + ]; |
|
76 | + break; |
|
77 | + case 'OperatorBracketUnitTest.js': |
|
78 | + return [ |
|
79 | + 5 => 1, |
|
80 | + 8 => 1, |
|
81 | + 11 => 1, |
|
82 | + 14 => 1, |
|
83 | + 24 => 1, |
|
84 | + 30 => 1, |
|
85 | + 33 => 1, |
|
86 | + 36 => 1, |
|
87 | + 39 => 1, |
|
88 | + 46 => 1, |
|
89 | + 47 => 1, |
|
90 | + 63 => 1, |
|
91 | + 108 => 1, |
|
92 | + ]; |
|
93 | + break; |
|
94 | + default: |
|
95 | + return []; |
|
96 | + break; |
|
97 | + }//end switch |
|
98 | 98 | |
99 | - }//end getErrorList() |
|
99 | + }//end getErrorList() |
|
100 | 100 | |
101 | 101 | |
102 | - /** |
|
103 | - * Returns the lines where warnings should occur. |
|
104 | - * |
|
105 | - * The key of the array should represent the line number and the value |
|
106 | - * should represent the number of warnings that should occur on that line. |
|
107 | - * |
|
108 | - * @return array<int, int> |
|
109 | - */ |
|
110 | - public function getWarningList() |
|
111 | - { |
|
112 | - return []; |
|
102 | + /** |
|
103 | + * Returns the lines where warnings should occur. |
|
104 | + * |
|
105 | + * The key of the array should represent the line number and the value |
|
106 | + * should represent the number of warnings that should occur on that line. |
|
107 | + * |
|
108 | + * @return array<int, int> |
|
109 | + */ |
|
110 | + public function getWarningList() |
|
111 | + { |
|
112 | + return []; |
|
113 | 113 | |
114 | - }//end getWarningList() |
|
114 | + }//end getWarningList() |
|
115 | 115 | |
116 | 116 | |
117 | 117 | }//end class |
@@ -28,72 +28,72 @@ |
||
28 | 28 | public function getErrorList($testFile='OperatorBracketUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'OperatorBracketUnitTest.inc': |
|
32 | - return [ |
|
33 | - 3 => 1, |
|
34 | - 6 => 1, |
|
35 | - 9 => 1, |
|
36 | - 12 => 1, |
|
37 | - 15 => 1, |
|
38 | - 18 => 2, |
|
39 | - 20 => 1, |
|
40 | - 25 => 1, |
|
41 | - 28 => 1, |
|
42 | - 31 => 1, |
|
43 | - 34 => 1, |
|
44 | - 37 => 1, |
|
45 | - 40 => 1, |
|
46 | - 43 => 2, |
|
47 | - 45 => 1, |
|
48 | - 47 => 5, |
|
49 | - 48 => 1, |
|
50 | - 50 => 2, |
|
51 | - 55 => 2, |
|
52 | - 56 => 1, |
|
53 | - 63 => 2, |
|
54 | - 64 => 1, |
|
55 | - 67 => 1, |
|
56 | - 86 => 1, |
|
57 | - 90 => 1, |
|
58 | - 109 => 1, |
|
59 | - 130 => 1, |
|
60 | - 134 => 1, |
|
61 | - 135 => 2, |
|
62 | - 137 => 1, |
|
63 | - 139 => 1, |
|
64 | - 150 => 1, |
|
65 | - 161 => 1, |
|
66 | - 163 => 2, |
|
67 | - 165 => 2, |
|
68 | - 169 => 1, |
|
69 | - 174 => 1, |
|
70 | - 176 => 1, |
|
71 | - 185 => 1, |
|
72 | - 189 => 1, |
|
73 | - 193 => 1, |
|
74 | - 194 => 2, |
|
75 | - ]; |
|
76 | - break; |
|
77 | - case 'OperatorBracketUnitTest.js': |
|
78 | - return [ |
|
79 | - 5 => 1, |
|
80 | - 8 => 1, |
|
81 | - 11 => 1, |
|
82 | - 14 => 1, |
|
83 | - 24 => 1, |
|
84 | - 30 => 1, |
|
85 | - 33 => 1, |
|
86 | - 36 => 1, |
|
87 | - 39 => 1, |
|
88 | - 46 => 1, |
|
89 | - 47 => 1, |
|
90 | - 63 => 1, |
|
91 | - 108 => 1, |
|
92 | - ]; |
|
93 | - break; |
|
94 | - default: |
|
95 | - return []; |
|
96 | - break; |
|
31 | + case 'OperatorBracketUnitTest.inc': |
|
32 | + return [ |
|
33 | + 3 => 1, |
|
34 | + 6 => 1, |
|
35 | + 9 => 1, |
|
36 | + 12 => 1, |
|
37 | + 15 => 1, |
|
38 | + 18 => 2, |
|
39 | + 20 => 1, |
|
40 | + 25 => 1, |
|
41 | + 28 => 1, |
|
42 | + 31 => 1, |
|
43 | + 34 => 1, |
|
44 | + 37 => 1, |
|
45 | + 40 => 1, |
|
46 | + 43 => 2, |
|
47 | + 45 => 1, |
|
48 | + 47 => 5, |
|
49 | + 48 => 1, |
|
50 | + 50 => 2, |
|
51 | + 55 => 2, |
|
52 | + 56 => 1, |
|
53 | + 63 => 2, |
|
54 | + 64 => 1, |
|
55 | + 67 => 1, |
|
56 | + 86 => 1, |
|
57 | + 90 => 1, |
|
58 | + 109 => 1, |
|
59 | + 130 => 1, |
|
60 | + 134 => 1, |
|
61 | + 135 => 2, |
|
62 | + 137 => 1, |
|
63 | + 139 => 1, |
|
64 | + 150 => 1, |
|
65 | + 161 => 1, |
|
66 | + 163 => 2, |
|
67 | + 165 => 2, |
|
68 | + 169 => 1, |
|
69 | + 174 => 1, |
|
70 | + 176 => 1, |
|
71 | + 185 => 1, |
|
72 | + 189 => 1, |
|
73 | + 193 => 1, |
|
74 | + 194 => 2, |
|
75 | + ]; |
|
76 | + break; |
|
77 | + case 'OperatorBracketUnitTest.js': |
|
78 | + return [ |
|
79 | + 5 => 1, |
|
80 | + 8 => 1, |
|
81 | + 11 => 1, |
|
82 | + 14 => 1, |
|
83 | + 24 => 1, |
|
84 | + 30 => 1, |
|
85 | + 33 => 1, |
|
86 | + 36 => 1, |
|
87 | + 39 => 1, |
|
88 | + 46 => 1, |
|
89 | + 47 => 1, |
|
90 | + 63 => 1, |
|
91 | + 108 => 1, |
|
92 | + ]; |
|
93 | + break; |
|
94 | + default: |
|
95 | + return []; |
|
96 | + break; |
|
97 | 97 | }//end switch |
98 | 98 | |
99 | 99 | }//end getErrorList() |
@@ -105,8 +105,12 @@ |
||
105 | 105 | |
106 | 106 | }//end class |
107 | 107 | |
108 | -if ($index < -1) $index = 0; |
|
109 | -if ($index < - 1) $index = 0; |
|
108 | +if ($index < -1) { |
|
109 | + $index = 0; |
|
110 | +} |
|
111 | +if ($index < - 1) { |
|
112 | + $index = 0; |
|
113 | +} |
|
110 | 114 | |
111 | 115 | $three = ceil($one / $two); |
112 | 116 | $three = ceil(($one / $two) / $four); |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | |
53 | 53 | function myFunction() |
54 | 54 | { |
55 | - $value = ($one + 1) + ($two + 2) + (myFunction() + 2); |
|
56 | - $value = myFunction() + 2; |
|
57 | - $value = (myFunction($var) + myFunction2($var)); |
|
58 | - return -1; |
|
55 | + $value = ($one + 1) + ($two + 2) + (myFunction() + 2); |
|
56 | + $value = myFunction() + 2; |
|
57 | + $value = (myFunction($var) + myFunction2($var)); |
|
58 | + return -1; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $line = substr($line, 0, -2); |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | } |
66 | 66 | |
67 | 67 | if ($pos === count($this->tokens) - 1) { |
68 | - $file = '...'.substr($file, (($padding * -1) + 3)); |
|
68 | + $file = '...'.substr($file, (($padding * -1) + 3)); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | if (substr($basename, -5) !== 'Sniff') { |
72 | - $i = ($this->_tokens[$i]['parenthesis_closer'] + 1); |
|
72 | + $i = ($this->_tokens[$i]['parenthesis_closer'] + 1); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $pos = $this->_getShortCommentEndPos(); |
76 | 76 | if ($pos === -1) { |
77 | - $stackPtr = ($tokens[$next][$to] - 1); |
|
78 | - $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1); |
|
79 | - $var = (($var1 + $var2) + $var3 + $var4) |
|
77 | + $stackPtr = ($tokens[$next][$to] - 1); |
|
78 | + $stackPtr = ($tokens[$next][$pattern[$i]['to']] + 1); |
|
79 | + $var = (($var1 + $var2) + $var3 + $var4) |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | $commentStart = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($commentEnd - 1), null, true) + 1); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $expected .= '...'.substr($tokens[($stackPtr - 2)]['content'], -5).$tokens[$stackPtr]['content']; |
85 | 85 | |
86 | 86 | if (($tokens[$nextToken - 1]['code']) !== T_WHITESPACE) { |
87 | - $errorPos = ($params[(count($params) - 1)]->getLine() + $commentStart); |
|
87 | + $errorPos = ($params[(count($params) - 1)]->getLine() + $commentStart); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | while (($nextSpace = $phpcsFile->findNext(T_WHITESPACE, $nextSpace + 1, $nextBreak)) !== false) { |
@@ -97,10 +97,10 @@ discard block |
||
97 | 97 | { |
98 | 98 | |
99 | 99 | |
100 | - public function &myFunction(array &$one, array &$two) |
|
101 | - { |
|
100 | + public function &myFunction(array &$one, array &$two) |
|
101 | + { |
|
102 | 102 | |
103 | - }//end myFunction() |
|
103 | + }//end myFunction() |
|
104 | 104 | |
105 | 105 | |
106 | 106 | }//end class |
@@ -117,19 +117,19 @@ discard block |
||
117 | 117 | $three = ceil($one[1] / $two); |
118 | 118 | |
119 | 119 | switch ($number % 10) { |
120 | - case -1: |
|
121 | - $suffix = 'st'; |
|
122 | - break; |
|
120 | + case -1: |
|
121 | + $suffix = 'st'; |
|
122 | + break; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | $expectedPermission = array( |
126 | - 'granted' => 4, |
|
127 | - 'denied' => 1, |
|
128 | - 'cascade' => TRUE, |
|
129 | - 'blockergranted' => 2, |
|
130 | - 'blockerdenied' => - 3, |
|
131 | - 'effective' => TRUE, |
|
132 | - ); |
|
126 | + 'granted' => 4, |
|
127 | + 'denied' => 1, |
|
128 | + 'cascade' => TRUE, |
|
129 | + 'blockergranted' => 2, |
|
130 | + 'blockerdenied' => - 3, |
|
131 | + 'effective' => TRUE, |
|
132 | + ); |
|
133 | 133 | |
134 | 134 | $value = (int) isset($blah) + 2; |
135 | 135 | $value = (int) isset($blah) + (int) isset($foo) + (int) isset($bar); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | foo(1 + 2 + 3); |
152 | 152 | |
153 | 153 | if (empty($foo[-1]) === true) { |
154 | - $foo[-1] = 'foo'; |
|
154 | + $foo[-1] = 'foo'; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | try { |
@@ -178,18 +178,18 @@ discard block |
||
178 | 178 | exit -1; |
179 | 179 | |
180 | 180 | $expr = match ($number - 10) { |
181 | - -1 => 0, |
|
181 | + -1 => 0, |
|
182 | 182 | }; |
183 | 183 | |
184 | 184 | $expr = match ($number % 10) { |
185 | - 1 => 2 * $num, |
|
185 | + 1 => 2 * $num, |
|
186 | 186 | }; |
187 | 187 | |
188 | 188 | $expr = match (true) { |
189 | - $num * 100 > 500 => 'expression in key', |
|
189 | + $num * 100 > 500 => 'expression in key', |
|
190 | 190 | }; |
191 | 191 | |
192 | 192 | // PHP 8.0 named parameters. |
193 | 193 | if ($pos === count(value: $this->tokens) - 1) { |
194 | - $file = '...'.substr(string: $file, offset: $padding * -1 + 3); |
|
194 | + $file = '...'.substr(string: $file, offset: $padding * -1 + 3); |
|
195 | 195 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | $line = substr($line, 0, -2); |
62 | 62 | $words = preg_split('|(\s+)|', $line."\n", -1, $flags); |
63 | -if (!isset($this->words[$wordPos-1]) || $this->words[$wordPos-1] !== ' ') { |
|
63 | +if ( ! isset($this->words[$wordPos - 1]) || $this->words[$wordPos - 1] !== ' ') { |
|
64 | 64 | } else if ($this->tokens[$pos + 1] === "\n") { |
65 | 65 | } |
66 | 66 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | 'denied' => 1, |
128 | 128 | 'cascade' => TRUE, |
129 | 129 | 'blockergranted' => 2, |
130 | - 'blockerdenied' => - 3, |
|
130 | + 'blockerdenied' => -3, |
|
131 | 131 | 'effective' => TRUE, |
132 | 132 | ); |
133 | 133 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | $var = $foo['blah'] + []; |
162 | 162 | |
163 | -$a = 2 * ${x} - ${minus}; |
|
163 | +$a = 2 * ${x} -${minus}; |
|
164 | 164 | |
165 | 165 | $foo = $bar ?? $baz ?? ''; |
166 | 166 |
@@ -15,52 +15,52 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 3 => 5, |
|
30 | - 5 => 1, |
|
31 | - 6 => 1, |
|
32 | - 9 => 1, |
|
33 | - 10 => 1, |
|
34 | - 12 => 1, |
|
35 | - 13 => 1, |
|
36 | - 14 => 1, |
|
37 | - 15 => 1, |
|
38 | - 16 => 5, |
|
39 | - 22 => 1, |
|
40 | - 27 => 5, |
|
41 | - 29 => 1, |
|
42 | - 30 => 1, |
|
43 | - 31 => 1, |
|
44 | - 47 => 2, |
|
45 | - 49 => 1, |
|
46 | - ]; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 3 => 5, |
|
30 | + 5 => 1, |
|
31 | + 6 => 1, |
|
32 | + 9 => 1, |
|
33 | + 10 => 1, |
|
34 | + 12 => 1, |
|
35 | + 13 => 1, |
|
36 | + 14 => 1, |
|
37 | + 15 => 1, |
|
38 | + 16 => 5, |
|
39 | + 22 => 1, |
|
40 | + 27 => 5, |
|
41 | + 29 => 1, |
|
42 | + 30 => 1, |
|
43 | + 31 => 1, |
|
44 | + 47 => 2, |
|
45 | + 49 => 1, |
|
46 | + ]; |
|
47 | 47 | |
48 | - }//end getErrorList() |
|
48 | + }//end getErrorList() |
|
49 | 49 | |
50 | 50 | |
51 | - /** |
|
52 | - * Returns the lines where warnings should occur. |
|
53 | - * |
|
54 | - * The key of the array should represent the line number and the value |
|
55 | - * should represent the number of warnings that should occur on that line. |
|
56 | - * |
|
57 | - * @return array<int, int> |
|
58 | - */ |
|
59 | - public function getWarningList() |
|
60 | - { |
|
61 | - return []; |
|
51 | + /** |
|
52 | + * Returns the lines where warnings should occur. |
|
53 | + * |
|
54 | + * The key of the array should represent the line number and the value |
|
55 | + * should represent the number of warnings that should occur on that line. |
|
56 | + * |
|
57 | + * @return array<int, int> |
|
58 | + */ |
|
59 | + public function getWarningList() |
|
60 | + { |
|
61 | + return []; |
|
62 | 62 | |
63 | - }//end getWarningList() |
|
63 | + }//end getWarningList() |
|
64 | 64 | |
65 | 65 | |
66 | 66 | }//end class |
@@ -33,5 +33,5 @@ |
||
33 | 33 | there"; |
34 | 34 | |
35 | 35 | function test() { |
36 | - echo "It Worked'; |
|
36 | + echo "It Worked'; |
|
37 | 37 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | $string = "\$var"; |
18 | 18 | |
19 | 19 | $x = "bar = '$z', |
20 | -baz = '" . $a . "'...$x"; |
|
20 | +baz = '".$a."'...$x"; |
|
21 | 21 | |
22 | 22 | $string = "Hello |
23 | 23 | there"; |
@@ -15,48 +15,48 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 4 => 1, |
|
30 | - 5 => 1, |
|
31 | - 6 => 1, |
|
32 | - 8 => 2, |
|
33 | - 14 => 1, |
|
34 | - 15 => 1, |
|
35 | - 17 => 1, |
|
36 | - 19 => 1, |
|
37 | - 20 => 1, |
|
38 | - 22 => 1, |
|
39 | - 29 => 1, |
|
40 | - 30 => 1, |
|
41 | - 32 => 1, |
|
42 | - ]; |
|
43 | - |
|
44 | - }//end getErrorList() |
|
45 | - |
|
46 | - |
|
47 | - /** |
|
48 | - * Returns the lines where warnings should occur. |
|
49 | - * |
|
50 | - * The key of the array should represent the line number and the value |
|
51 | - * should represent the number of warnings that should occur on that line. |
|
52 | - * |
|
53 | - * @return array<int, int> |
|
54 | - */ |
|
55 | - public function getWarningList() |
|
56 | - { |
|
57 | - return []; |
|
58 | - |
|
59 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 4 => 1, |
|
30 | + 5 => 1, |
|
31 | + 6 => 1, |
|
32 | + 8 => 2, |
|
33 | + 14 => 1, |
|
34 | + 15 => 1, |
|
35 | + 17 => 1, |
|
36 | + 19 => 1, |
|
37 | + 20 => 1, |
|
38 | + 22 => 1, |
|
39 | + 29 => 1, |
|
40 | + 30 => 1, |
|
41 | + 32 => 1, |
|
42 | + ]; |
|
43 | + |
|
44 | + }//end getErrorList() |
|
45 | + |
|
46 | + |
|
47 | + /** |
|
48 | + * Returns the lines where warnings should occur. |
|
49 | + * |
|
50 | + * The key of the array should represent the line number and the value |
|
51 | + * should represent the number of warnings that should occur on that line. |
|
52 | + * |
|
53 | + * @return array<int, int> |
|
54 | + */ |
|
55 | + public function getWarningList() |
|
56 | + { |
|
57 | + return []; |
|
58 | + |
|
59 | + }//end getWarningList() |
|
60 | 60 | |
61 | 61 | |
62 | 62 | }//end class |
@@ -15,41 +15,41 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 5 => 1, |
|
30 | - 6 => 1, |
|
31 | - 7 => 1, |
|
32 | - 8 => 1, |
|
33 | - 9 => 1, |
|
34 | - 13 => 1, |
|
35 | - ]; |
|
36 | - |
|
37 | - }//end getErrorList() |
|
38 | - |
|
39 | - |
|
40 | - /** |
|
41 | - * Returns the lines where warnings should occur. |
|
42 | - * |
|
43 | - * The key of the array should represent the line number and the value |
|
44 | - * should represent the number of warnings that should occur on that line. |
|
45 | - * |
|
46 | - * @return array<int, int> |
|
47 | - */ |
|
48 | - public function getWarningList() |
|
49 | - { |
|
50 | - return []; |
|
51 | - |
|
52 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 5 => 1, |
|
30 | + 6 => 1, |
|
31 | + 7 => 1, |
|
32 | + 8 => 1, |
|
33 | + 9 => 1, |
|
34 | + 13 => 1, |
|
35 | + ]; |
|
36 | + |
|
37 | + }//end getErrorList() |
|
38 | + |
|
39 | + |
|
40 | + /** |
|
41 | + * Returns the lines where warnings should occur. |
|
42 | + * |
|
43 | + * The key of the array should represent the line number and the value |
|
44 | + * should represent the number of warnings that should occur on that line. |
|
45 | + * |
|
46 | + * @return array<int, int> |
|
47 | + */ |
|
48 | + public function getWarningList() |
|
49 | + { |
|
50 | + return []; |
|
51 | + |
|
52 | + }//end getWarningList() |
|
53 | 53 | |
54 | 54 | |
55 | 55 | }//end class |
@@ -6,8 +6,8 @@ |
||
6 | 6 | echo($hello); |
7 | 7 | echo ('hello'); |
8 | 8 | echo ($hello); |
9 | -echo($y) ; |
|
9 | +echo($y); |
|
10 | 10 | echo ($loan_device->returndate == 0) ? 'Not returned' : date('d/m/Y', $loan_device->returndate); |
11 | 11 | ?> |
12 | -<p><?php echo ($foo) ? 'true' : 'false' ?></p> |
|
12 | +<p><?php echo ($foo) ? 'true' : 'false' ?></p> |
|
13 | 13 | <p><?php echo ($foo) ?></p> |