@@ -45,7 +45,7 @@ |
||
| 45 | 45 | * |
| 46 | 46 | * @return array<int, int> |
| 47 | 47 | */ |
| 48 | - public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
| 48 | + public function getErrorList($testFile = 'ScopeIndentUnitTest.inc') |
|
| 49 | 49 | { |
| 50 | 50 | if ($testFile === 'ScopeIndentUnitTest.1.js') { |
| 51 | 51 | return [ |
@@ -15,200 +15,200 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Get a list of CLI values to set before the file is tested. |
|
| 20 | - * |
|
| 21 | - * @param string $testFile The name of the file being tested. |
|
| 22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
| 23 | - * |
|
| 24 | - * @return void |
|
| 25 | - */ |
|
| 26 | - public function setCliValues($testFile, $config) |
|
| 27 | - { |
|
| 28 | - // Tab width setting is only needed for the tabbed file. |
|
| 29 | - if ($testFile === 'ScopeIndentUnitTest.2.inc') { |
|
| 30 | - $config->tabWidth = 4; |
|
| 31 | - } else { |
|
| 32 | - $config->tabWidth = 0; |
|
| 33 | - } |
|
| 34 | - |
|
| 35 | - }//end setCliValues() |
|
| 36 | - |
|
| 37 | - |
|
| 38 | - /** |
|
| 39 | - * Returns the lines where errors should occur. |
|
| 40 | - * |
|
| 41 | - * The key of the array should represent the line number and the value |
|
| 42 | - * should represent the number of errors that should occur on that line. |
|
| 43 | - * |
|
| 44 | - * @param string $testFile The name of the file being tested. |
|
| 45 | - * |
|
| 46 | - * @return array<int, int> |
|
| 47 | - */ |
|
| 48 | - public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
| 49 | - { |
|
| 50 | - if ($testFile === 'ScopeIndentUnitTest.1.js') { |
|
| 51 | - return [ |
|
| 52 | - 6 => 1, |
|
| 53 | - 14 => 1, |
|
| 54 | - 21 => 1, |
|
| 55 | - 30 => 1, |
|
| 56 | - 32 => 1, |
|
| 57 | - 33 => 1, |
|
| 58 | - 34 => 1, |
|
| 59 | - 39 => 1, |
|
| 60 | - 42 => 1, |
|
| 61 | - 59 => 1, |
|
| 62 | - 60 => 1, |
|
| 63 | - 75 => 1, |
|
| 64 | - 120 => 1, |
|
| 65 | - 121 => 1, |
|
| 66 | - 122 => 1, |
|
| 67 | - 123 => 1, |
|
| 68 | - 141 => 1, |
|
| 69 | - 142 => 1, |
|
| 70 | - 155 => 1, |
|
| 71 | - 156 => 1, |
|
| 72 | - 168 => 1, |
|
| 73 | - 184 => 1, |
|
| 74 | - ]; |
|
| 75 | - }//end if |
|
| 76 | - |
|
| 77 | - if ($testFile === 'ScopeIndentUnitTest.3.inc') { |
|
| 78 | - return [ |
|
| 79 | - 6 => 1, |
|
| 80 | - 7 => 1, |
|
| 81 | - 10 => 1, |
|
| 82 | - ]; |
|
| 83 | - } |
|
| 84 | - |
|
| 85 | - if ($testFile === 'ScopeIndentUnitTest.4.inc') { |
|
| 86 | - return []; |
|
| 87 | - } |
|
| 88 | - |
|
| 89 | - return [ |
|
| 90 | - 7 => 1, |
|
| 91 | - 10 => 1, |
|
| 92 | - 13 => 1, |
|
| 93 | - 17 => 1, |
|
| 94 | - 20 => 1, |
|
| 95 | - 24 => 1, |
|
| 96 | - 25 => 1, |
|
| 97 | - 27 => 1, |
|
| 98 | - 28 => 1, |
|
| 99 | - 29 => 1, |
|
| 100 | - 30 => 1, |
|
| 101 | - 58 => 1, |
|
| 102 | - 123 => 1, |
|
| 103 | - 224 => 1, |
|
| 104 | - 225 => 1, |
|
| 105 | - 279 => 1, |
|
| 106 | - 280 => 1, |
|
| 107 | - 281 => 1, |
|
| 108 | - 282 => 1, |
|
| 109 | - 283 => 1, |
|
| 110 | - 284 => 1, |
|
| 111 | - 285 => 1, |
|
| 112 | - 286 => 1, |
|
| 113 | - 336 => 1, |
|
| 114 | - 349 => 1, |
|
| 115 | - 380 => 1, |
|
| 116 | - 386 => 1, |
|
| 117 | - 387 => 1, |
|
| 118 | - 388 => 1, |
|
| 119 | - 389 => 1, |
|
| 120 | - 390 => 1, |
|
| 121 | - 397 => 1, |
|
| 122 | - 419 => 1, |
|
| 123 | - 420 => 1, |
|
| 124 | - 465 => 1, |
|
| 125 | - 467 => 1, |
|
| 126 | - 472 => 1, |
|
| 127 | - 473 => 1, |
|
| 128 | - 474 => 1, |
|
| 129 | - 496 => 1, |
|
| 130 | - 498 => 1, |
|
| 131 | - 500 => 1, |
|
| 132 | - 524 => 1, |
|
| 133 | - 526 => 1, |
|
| 134 | - 544 => 1, |
|
| 135 | - 545 => 1, |
|
| 136 | - 546 => 1, |
|
| 137 | - 639 => 1, |
|
| 138 | - 660 => 1, |
|
| 139 | - 662 => 1, |
|
| 140 | - 802 => 1, |
|
| 141 | - 803 => 1, |
|
| 142 | - 823 => 1, |
|
| 143 | - 858 => 1, |
|
| 144 | - 879 => 1, |
|
| 145 | - 1163 => 1, |
|
| 146 | - 1197 => 1, |
|
| 147 | - 1198 => 1, |
|
| 148 | - 1259 => 1, |
|
| 149 | - 1264 => 1, |
|
| 150 | - 1265 => 1, |
|
| 151 | - 1266 => 1, |
|
| 152 | - 1269 => 1, |
|
| 153 | - 1272 => 1, |
|
| 154 | - 1273 => 1, |
|
| 155 | - 1274 => 1, |
|
| 156 | - 1275 => 1, |
|
| 157 | - 1276 => 1, |
|
| 158 | - 1277 => 1, |
|
| 159 | - 1280 => 1, |
|
| 160 | - 1281 => 1, |
|
| 161 | - 1282 => 1, |
|
| 162 | - 1284 => 1, |
|
| 163 | - 1285 => 1, |
|
| 164 | - 1288 => 1, |
|
| 165 | - 1289 => 1, |
|
| 166 | - 1290 => 1, |
|
| 167 | - 1292 => 1, |
|
| 168 | - 1293 => 1, |
|
| 169 | - 1310 => 1, |
|
| 170 | - 1312 => 1, |
|
| 171 | - 1327 => 1, |
|
| 172 | - 1328 => 1, |
|
| 173 | - 1329 => 1, |
|
| 174 | - 1330 => 1, |
|
| 175 | - 1331 => 1, |
|
| 176 | - 1332 => 1, |
|
| 177 | - 1335 => 1, |
|
| 178 | - 1340 => 1, |
|
| 179 | - 1342 => 1, |
|
| 180 | - 1345 => 1, |
|
| 181 | - 1488 => 1, |
|
| 182 | - 1489 => 1, |
|
| 183 | - 1500 => 1, |
|
| 184 | - 1503 => 1, |
|
| 185 | - 1518 => 1, |
|
| 186 | - 1520 => 1, |
|
| 187 | - 1527 => 1, |
|
| 188 | - 1529 => 1, |
|
| 189 | - 1530 => 1, |
|
| 190 | - 1583 => 1, |
|
| 191 | - 1584 => 1, |
|
| 192 | - 1585 => 1, |
|
| 193 | - 1586 => 1, |
|
| 194 | - ]; |
|
| 195 | - |
|
| 196 | - }//end getErrorList() |
|
| 197 | - |
|
| 198 | - |
|
| 199 | - /** |
|
| 200 | - * Returns the lines where warnings should occur. |
|
| 201 | - * |
|
| 202 | - * The key of the array should represent the line number and the value |
|
| 203 | - * should represent the number of warnings that should occur on that line. |
|
| 204 | - * |
|
| 205 | - * @return array<int, int> |
|
| 206 | - */ |
|
| 207 | - public function getWarningList() |
|
| 208 | - { |
|
| 209 | - return []; |
|
| 210 | - |
|
| 211 | - }//end getWarningList() |
|
| 18 | + /** |
|
| 19 | + * Get a list of CLI values to set before the file is tested. |
|
| 20 | + * |
|
| 21 | + * @param string $testFile The name of the file being tested. |
|
| 22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
| 23 | + * |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 26 | + public function setCliValues($testFile, $config) |
|
| 27 | + { |
|
| 28 | + // Tab width setting is only needed for the tabbed file. |
|
| 29 | + if ($testFile === 'ScopeIndentUnitTest.2.inc') { |
|
| 30 | + $config->tabWidth = 4; |
|
| 31 | + } else { |
|
| 32 | + $config->tabWidth = 0; |
|
| 33 | + } |
|
| 34 | + |
|
| 35 | + }//end setCliValues() |
|
| 36 | + |
|
| 37 | + |
|
| 38 | + /** |
|
| 39 | + * Returns the lines where errors should occur. |
|
| 40 | + * |
|
| 41 | + * The key of the array should represent the line number and the value |
|
| 42 | + * should represent the number of errors that should occur on that line. |
|
| 43 | + * |
|
| 44 | + * @param string $testFile The name of the file being tested. |
|
| 45 | + * |
|
| 46 | + * @return array<int, int> |
|
| 47 | + */ |
|
| 48 | + public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
| 49 | + { |
|
| 50 | + if ($testFile === 'ScopeIndentUnitTest.1.js') { |
|
| 51 | + return [ |
|
| 52 | + 6 => 1, |
|
| 53 | + 14 => 1, |
|
| 54 | + 21 => 1, |
|
| 55 | + 30 => 1, |
|
| 56 | + 32 => 1, |
|
| 57 | + 33 => 1, |
|
| 58 | + 34 => 1, |
|
| 59 | + 39 => 1, |
|
| 60 | + 42 => 1, |
|
| 61 | + 59 => 1, |
|
| 62 | + 60 => 1, |
|
| 63 | + 75 => 1, |
|
| 64 | + 120 => 1, |
|
| 65 | + 121 => 1, |
|
| 66 | + 122 => 1, |
|
| 67 | + 123 => 1, |
|
| 68 | + 141 => 1, |
|
| 69 | + 142 => 1, |
|
| 70 | + 155 => 1, |
|
| 71 | + 156 => 1, |
|
| 72 | + 168 => 1, |
|
| 73 | + 184 => 1, |
|
| 74 | + ]; |
|
| 75 | + }//end if |
|
| 76 | + |
|
| 77 | + if ($testFile === 'ScopeIndentUnitTest.3.inc') { |
|
| 78 | + return [ |
|
| 79 | + 6 => 1, |
|
| 80 | + 7 => 1, |
|
| 81 | + 10 => 1, |
|
| 82 | + ]; |
|
| 83 | + } |
|
| 84 | + |
|
| 85 | + if ($testFile === 'ScopeIndentUnitTest.4.inc') { |
|
| 86 | + return []; |
|
| 87 | + } |
|
| 88 | + |
|
| 89 | + return [ |
|
| 90 | + 7 => 1, |
|
| 91 | + 10 => 1, |
|
| 92 | + 13 => 1, |
|
| 93 | + 17 => 1, |
|
| 94 | + 20 => 1, |
|
| 95 | + 24 => 1, |
|
| 96 | + 25 => 1, |
|
| 97 | + 27 => 1, |
|
| 98 | + 28 => 1, |
|
| 99 | + 29 => 1, |
|
| 100 | + 30 => 1, |
|
| 101 | + 58 => 1, |
|
| 102 | + 123 => 1, |
|
| 103 | + 224 => 1, |
|
| 104 | + 225 => 1, |
|
| 105 | + 279 => 1, |
|
| 106 | + 280 => 1, |
|
| 107 | + 281 => 1, |
|
| 108 | + 282 => 1, |
|
| 109 | + 283 => 1, |
|
| 110 | + 284 => 1, |
|
| 111 | + 285 => 1, |
|
| 112 | + 286 => 1, |
|
| 113 | + 336 => 1, |
|
| 114 | + 349 => 1, |
|
| 115 | + 380 => 1, |
|
| 116 | + 386 => 1, |
|
| 117 | + 387 => 1, |
|
| 118 | + 388 => 1, |
|
| 119 | + 389 => 1, |
|
| 120 | + 390 => 1, |
|
| 121 | + 397 => 1, |
|
| 122 | + 419 => 1, |
|
| 123 | + 420 => 1, |
|
| 124 | + 465 => 1, |
|
| 125 | + 467 => 1, |
|
| 126 | + 472 => 1, |
|
| 127 | + 473 => 1, |
|
| 128 | + 474 => 1, |
|
| 129 | + 496 => 1, |
|
| 130 | + 498 => 1, |
|
| 131 | + 500 => 1, |
|
| 132 | + 524 => 1, |
|
| 133 | + 526 => 1, |
|
| 134 | + 544 => 1, |
|
| 135 | + 545 => 1, |
|
| 136 | + 546 => 1, |
|
| 137 | + 639 => 1, |
|
| 138 | + 660 => 1, |
|
| 139 | + 662 => 1, |
|
| 140 | + 802 => 1, |
|
| 141 | + 803 => 1, |
|
| 142 | + 823 => 1, |
|
| 143 | + 858 => 1, |
|
| 144 | + 879 => 1, |
|
| 145 | + 1163 => 1, |
|
| 146 | + 1197 => 1, |
|
| 147 | + 1198 => 1, |
|
| 148 | + 1259 => 1, |
|
| 149 | + 1264 => 1, |
|
| 150 | + 1265 => 1, |
|
| 151 | + 1266 => 1, |
|
| 152 | + 1269 => 1, |
|
| 153 | + 1272 => 1, |
|
| 154 | + 1273 => 1, |
|
| 155 | + 1274 => 1, |
|
| 156 | + 1275 => 1, |
|
| 157 | + 1276 => 1, |
|
| 158 | + 1277 => 1, |
|
| 159 | + 1280 => 1, |
|
| 160 | + 1281 => 1, |
|
| 161 | + 1282 => 1, |
|
| 162 | + 1284 => 1, |
|
| 163 | + 1285 => 1, |
|
| 164 | + 1288 => 1, |
|
| 165 | + 1289 => 1, |
|
| 166 | + 1290 => 1, |
|
| 167 | + 1292 => 1, |
|
| 168 | + 1293 => 1, |
|
| 169 | + 1310 => 1, |
|
| 170 | + 1312 => 1, |
|
| 171 | + 1327 => 1, |
|
| 172 | + 1328 => 1, |
|
| 173 | + 1329 => 1, |
|
| 174 | + 1330 => 1, |
|
| 175 | + 1331 => 1, |
|
| 176 | + 1332 => 1, |
|
| 177 | + 1335 => 1, |
|
| 178 | + 1340 => 1, |
|
| 179 | + 1342 => 1, |
|
| 180 | + 1345 => 1, |
|
| 181 | + 1488 => 1, |
|
| 182 | + 1489 => 1, |
|
| 183 | + 1500 => 1, |
|
| 184 | + 1503 => 1, |
|
| 185 | + 1518 => 1, |
|
| 186 | + 1520 => 1, |
|
| 187 | + 1527 => 1, |
|
| 188 | + 1529 => 1, |
|
| 189 | + 1530 => 1, |
|
| 190 | + 1583 => 1, |
|
| 191 | + 1584 => 1, |
|
| 192 | + 1585 => 1, |
|
| 193 | + 1586 => 1, |
|
| 194 | + ]; |
|
| 195 | + |
|
| 196 | + }//end getErrorList() |
|
| 197 | + |
|
| 198 | + |
|
| 199 | + /** |
|
| 200 | + * Returns the lines where warnings should occur. |
|
| 201 | + * |
|
| 202 | + * The key of the array should represent the line number and the value |
|
| 203 | + * should represent the number of warnings that should occur on that line. |
|
| 204 | + * |
|
| 205 | + * @return array<int, int> |
|
| 206 | + */ |
|
| 207 | + public function getWarningList() |
|
| 208 | + { |
|
| 209 | + return []; |
|
| 210 | + |
|
| 211 | + }//end getWarningList() |
|
| 212 | 212 | |
| 213 | 213 | |
| 214 | 214 | }//end class |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | |
| 125 | 125 | /** This is a T_DOC_COMMENT |
| 126 | - */ |
|
| 126 | + */ |
|
| 127 | 127 | |
| 128 | 128 | /* |
| 129 | 129 | This T_COMMENT has a newline in it. |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | if (true) { |
| 173 | - echo 'hello'; |
|
| 173 | + echo 'hello'; |
|
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | 176 | array_push($braces, $token); |
@@ -416,8 +416,8 @@ discard block |
||
| 416 | 416 | public static function myFunction() |
| 417 | 417 | { |
| 418 | 418 | if (empty($keywords) === FALSE) { |
| 419 | - $keywords = 'foo'; |
|
| 420 | - $existing = 'foo'; |
|
| 419 | + $keywords = 'foo'; |
|
| 420 | + $existing = 'foo'; |
|
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | return $keywords; |
@@ -664,7 +664,7 @@ discard block |
||
| 664 | 664 | |
| 665 | 665 | function foo() |
| 666 | 666 | { |
| 667 | - $failingTests[$testName][] = array( |
|
| 667 | + $failingTests[$testName][] = array( |
|
| 668 | 668 | 'comment' => self::_replaceKeywords($failingComment, $result), |
| 669 | 669 | 'screenshot' => Test::getScreenshotPath( |
| 670 | 670 | $projectid, |
@@ -254,11 +254,11 @@ discard block |
||
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | switch ($foo) { |
| 257 | - case 1: |
|
| 258 | - switch ($bar) { |
|
| 257 | + case 1: |
|
| 258 | + switch ($bar) { |
|
| 259 | 259 | default: |
| 260 | 260 | echo $string{1}; |
| 261 | - } |
|
| 261 | + } |
|
| 262 | 262 | break; |
| 263 | 263 | } |
| 264 | 264 | |
@@ -274,25 +274,25 @@ discard block |
||
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | switch ($foo) { |
| 277 | - case 1: |
|
| 278 | - switch ($bar) { |
|
| 279 | - default: |
|
| 280 | - if ($something) { |
|
| 281 | - echo $string{1}; |
|
| 282 | - } else if ($else) { |
|
| 283 | - switch ($else) { |
|
| 277 | + case 1: |
|
| 278 | + switch ($bar) { |
|
| 284 | 279 | default: |
| 280 | + if ($something) { |
|
| 281 | + echo $string{1}; |
|
| 282 | + } else if ($else) { |
|
| 283 | + switch ($else) { |
|
| 284 | + default: |
|
| 285 | + } |
|
| 285 | 286 | } |
| 286 | - } |
|
| 287 | 287 | } |
| 288 | 288 | break; |
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | switch ($name) { |
| 292 | - case "1": |
|
| 293 | - case "2": |
|
| 294 | - case "3": |
|
| 295 | - return true; |
|
| 292 | + case "1": |
|
| 293 | + case "2": |
|
| 294 | + case "3": |
|
| 295 | + return true; |
|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | switch ($name) { |
@@ -314,16 +314,16 @@ discard block |
||
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | switch ($name) { |
| 317 | - case "1": |
|
| 318 | - switch ($name2) { |
|
| 317 | + case "1": |
|
| 318 | + switch ($name2) { |
|
| 319 | 319 | case "1": |
| 320 | 320 | break; |
| 321 | 321 | case "2": |
| 322 | 322 | break; |
| 323 | - } |
|
| 324 | - break; |
|
| 325 | - case "2": |
|
| 323 | + } |
|
| 326 | 324 | break; |
| 325 | + case "2": |
|
| 326 | + break; |
|
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | switch (true) { |
@@ -339,17 +339,17 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | switch (true) { |
| 342 | - case true: { |
|
| 343 | - echo 'hi'; |
|
| 344 | - } |
|
| 345 | - // No break here. |
|
| 346 | - case false: |
|
| 347 | - case true: |
|
| 348 | - case null:{ |
|
| 349 | - echo 'hi'; |
|
| 342 | + case true: { |
|
| 343 | + echo 'hi'; |
|
| 344 | + } |
|
| 345 | + // No break here. |
|
| 346 | + case false: |
|
| 347 | + case true: |
|
| 348 | + case null:{ |
|
| 350 | 349 | echo 'hi'; |
| 351 | - } |
|
| 352 | - break; |
|
| 350 | + echo 'hi'; |
|
| 351 | + } |
|
| 352 | + break; |
|
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | switch (true) { |
@@ -910,29 +910,29 @@ discard block |
||
| 910 | 910 | } |
| 911 | 911 | |
| 912 | 912 | switch ($foo) { |
| 913 | - case 1: |
|
| 914 | - return array(); |
|
| 915 | - case 2: |
|
| 916 | - return ''; |
|
| 917 | - case 3: |
|
| 918 | - return $function(); |
|
| 919 | - case 4: |
|
| 920 | - return $functionCall($param[0]); |
|
| 921 | - case 5: |
|
| 922 | - return array() + array(); // Array Merge |
|
| 923 | - case 6: |
|
| 924 | - // String connect |
|
| 925 | - return $functionReturningString('') . $functionReturningString(array()); |
|
| 926 | - case 7: |
|
| 927 | - return functionCall( |
|
| 928 | - $withMultiLineParam[0], |
|
| 929 | - array(), |
|
| 930 | - $functionReturningString( |
|
| 931 | - $withMultiLineParam[1] |
|
| 932 | - ) |
|
| 933 | - ); |
|
| 934 | - case 8: |
|
| 935 | - return $param[0][0]; |
|
| 913 | + case 1: |
|
| 914 | + return array(); |
|
| 915 | + case 2: |
|
| 916 | + return ''; |
|
| 917 | + case 3: |
|
| 918 | + return $function(); |
|
| 919 | + case 4: |
|
| 920 | + return $functionCall($param[0]); |
|
| 921 | + case 5: |
|
| 922 | + return array() + array(); // Array Merge |
|
| 923 | + case 6: |
|
| 924 | + // String connect |
|
| 925 | + return $functionReturningString('') . $functionReturningString(array()); |
|
| 926 | + case 7: |
|
| 927 | + return functionCall( |
|
| 928 | + $withMultiLineParam[0], |
|
| 929 | + array(), |
|
| 930 | + $functionReturningString( |
|
| 931 | + $withMultiLineParam[1] |
|
| 932 | + ) |
|
| 933 | + ); |
|
| 934 | + case 8: |
|
| 935 | + return $param[0][0]; |
|
| 936 | 936 | } |
| 937 | 937 | |
| 938 | 938 | class Test { |
@@ -948,10 +948,10 @@ discard block |
||
| 948 | 948 | } |
| 949 | 949 | |
| 950 | 950 | switch ($x) { |
| 951 | - case 1: |
|
| 952 | - return [1]; |
|
| 953 | - default: |
|
| 954 | - return [2]; |
|
| 951 | + case 1: |
|
| 952 | + return [1]; |
|
| 953 | + default: |
|
| 954 | + return [2]; |
|
| 955 | 955 | } |
| 956 | 956 | |
| 957 | 957 | switch ($foo) { |
@@ -1024,16 +1024,16 @@ discard block |
||
| 1024 | 1024 | } |
| 1025 | 1025 | |
| 1026 | 1026 | switch ($parameter) { |
| 1027 | - case null: |
|
| 1028 | - return [ |
|
| 1029 | - 'foo' => in_array( |
|
| 1030 | - 'foo', |
|
| 1031 | - [] |
|
| 1032 | - ), |
|
| 1033 | - ]; |
|
| 1027 | + case null: |
|
| 1028 | + return [ |
|
| 1029 | + 'foo' => in_array( |
|
| 1030 | + 'foo', |
|
| 1031 | + [] |
|
| 1032 | + ), |
|
| 1033 | + ]; |
|
| 1034 | 1034 | |
| 1035 | - default: |
|
| 1036 | - return []; |
|
| 1035 | + default: |
|
| 1036 | + return []; |
|
| 1037 | 1037 | } |
| 1038 | 1038 | |
| 1039 | 1039 | class SomeClass |
@@ -1183,11 +1183,11 @@ discard block |
||
| 1183 | 1183 | } |
| 1184 | 1184 | |
| 1185 | 1185 | switch ($a) { |
| 1186 | - case 0: |
|
| 1187 | - $a = function () { |
|
| 1188 | - }; |
|
| 1189 | - case 1: |
|
| 1190 | - break; |
|
| 1186 | + case 0: |
|
| 1187 | + $a = function () { |
|
| 1188 | + }; |
|
| 1189 | + case 1: |
|
| 1190 | + break; |
|
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | 1193 | class Test |
@@ -1395,14 +1395,14 @@ discard block |
||
| 1395 | 1395 | |
| 1396 | 1396 | switch($foo) |
| 1397 | 1397 | { |
| 1398 | - case 1: |
|
| 1399 | - $value = 1; break; |
|
| 1400 | - case 2: |
|
| 1401 | - if ($bar) { |
|
| 1402 | - break; |
|
| 1403 | - } |
|
| 1404 | - default: |
|
| 1405 | - $value = 0; |
|
| 1398 | + case 1: |
|
| 1399 | + $value = 1; break; |
|
| 1400 | + case 2: |
|
| 1401 | + if ($bar) { |
|
| 1402 | + break; |
|
| 1403 | + } |
|
| 1404 | + default: |
|
| 1405 | + $value = 0; |
|
| 1406 | 1406 | } |
| 1407 | 1407 | |
| 1408 | 1408 | switch ($x) { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | do { |
| 28 | 28 | echo 'hello'; |
| 29 | - } while (TRUE); |
|
| 29 | + }while (TRUE); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | function hello3() |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | - } while (true); |
|
| 105 | + }while (true); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | if ($last >= 3 && |
| 167 | 167 | $ts[0]['token'] != T_CLASS && |
| 168 | 168 | $ts[$last - 2]['token'] == T_OBJECT_OPERATOR && |
| 169 | - $ts[$last - 3]['token'] == T_VARIABLE ) { |
|
| 169 | + $ts[$last - 3]['token'] == T_VARIABLE) { |
|
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | if (true) { |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | function c() |
| 367 | 367 | { |
| 368 | 368 | $this->doSomething( |
| 369 | - function () { |
|
| 369 | + function() { |
|
| 370 | 370 | echo 123; |
| 371 | 371 | } |
| 372 | 372 | ); |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | }//end class |
| 428 | 428 | |
| 429 | 429 | $var = call_user_func( |
| 430 | - $new_var = function () use (&$a) { |
|
| 430 | + $new_var = function() use (&$a) { |
|
| 431 | 431 | if ($a > 0) { |
| 432 | 432 | return $a++; |
| 433 | 433 | } else { |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | { |
| 443 | 443 | return array( |
| 444 | 444 | 'functions' => Array( |
| 445 | - 'function1' => function ($a, $b, $c) { |
|
| 445 | + 'function1' => function($a, $b, $c) { |
|
| 446 | 446 | $a = $b + $c; |
| 447 | 447 | $b = $c / 2; |
| 448 | 448 | return Array($a, $b, $c); |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | <?php } |
| 513 | 513 | |
| 514 | 514 | $list = [ |
| 515 | - 'fn' => function ($a) { |
|
| 515 | + 'fn' => function($a) { |
|
| 516 | 516 | if ($a === true) { |
| 517 | 517 | echo 'hi'; |
| 518 | 518 | } |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | ]; |
| 521 | 521 | |
| 522 | 522 | $list = [ |
| 523 | - 'fn' => function ($a) { |
|
| 523 | + 'fn' => function($a) { |
|
| 524 | 524 | if ($a === true) { |
| 525 | 525 | echo 'hi'; |
| 526 | 526 | } |
@@ -576,11 +576,11 @@ discard block |
||
| 576 | 576 | $array |
| 577 | 577 | ); |
| 578 | 578 | |
| 579 | -function foo(){return function(){};} |
|
| 579 | +function foo() {return function() {};} |
|
| 580 | 580 | |
| 581 | 581 | $mockedDatabase->expects($this->at(2)) |
| 582 | 582 | ->with($this->callback( |
| 583 | - function ($subject) |
|
| 583 | + function($subject) |
|
| 584 | 584 | { |
| 585 | 585 | } |
| 586 | 586 | ) |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | ->appaend('bar') |
| 594 | 594 | ->appaend('baz') |
| 595 | 595 | ->outputUsing( |
| 596 | - function () |
|
| 596 | + function() |
|
| 597 | 597 | { |
| 598 | 598 | } |
| 599 | 599 | ); |
@@ -643,13 +643,13 @@ discard block |
||
| 643 | 643 | $var = [ |
| 644 | 644 | [ |
| 645 | 645 | '1' => |
| 646 | - function () { |
|
| 646 | + function() { |
|
| 647 | 647 | return true; |
| 648 | 648 | }, |
| 649 | 649 | ], |
| 650 | 650 | [ |
| 651 | 651 | '1' => |
| 652 | - function () { |
|
| 652 | + function() { |
|
| 653 | 653 | return true; |
| 654 | 654 | }, |
| 655 | 655 | '2' => true, |
@@ -677,7 +677,7 @@ discard block |
||
| 677 | 677 | $this->mockedDatabase |
| 678 | 678 | ->with( |
| 679 | 679 | $this->callback( |
| 680 | - function () { |
|
| 680 | + function() { |
|
| 681 | 681 | return; |
| 682 | 682 | } |
| 683 | 683 | ) |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | static::where($c) |
| 693 | 693 | ->where($c) |
| 694 | 694 | ->where( |
| 695 | - function ($d) { |
|
| 695 | + function($d) { |
|
| 696 | 696 | $d->whereNull(); |
| 697 | 697 | $d->orWhere(); |
| 698 | 698 | } |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | |
| 715 | 715 | $foo->load( |
| 716 | 716 | array( |
| 717 | - 'bar' => function ($baz) { |
|
| 717 | + 'bar' => function($baz) { |
|
| 718 | 718 | $baz->call(); |
| 719 | 719 | } |
| 720 | 720 | ) |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | |
| 725 | 725 | $foo = array_unique( |
| 726 | 726 | array_map( |
| 727 | - function ($entry) { |
|
| 727 | + function($entry) { |
|
| 728 | 728 | return $entry * 2; |
| 729 | 729 | }, |
| 730 | 730 | array() |
@@ -751,12 +751,12 @@ discard block |
||
| 751 | 751 | appaend('bar')-> |
| 752 | 752 | appaend('baz')-> |
| 753 | 753 | outputUsing( |
| 754 | - function () |
|
| 754 | + function() |
|
| 755 | 755 | { |
| 756 | 756 | } |
| 757 | 757 | ); |
| 758 | 758 | |
| 759 | -$str = 'the items I want to show are: ' . |
|
| 759 | +$str = 'the items I want to show are: '. |
|
| 760 | 760 | implode( |
| 761 | 761 | ', ', |
| 762 | 762 | array('a', 'b', 'c') |
@@ -771,14 +771,14 @@ discard block |
||
| 771 | 771 | echo $str; |
| 772 | 772 | |
| 773 | 773 | bar([ |
| 774 | - 'foo' => foo(function () { |
|
| 774 | + 'foo' => foo(function() { |
|
| 775 | 775 | return 'foo'; |
| 776 | 776 | }) |
| 777 | 777 | ]); |
| 778 | 778 | |
| 779 | 779 | $domains = array_unique( |
| 780 | 780 | array_map( |
| 781 | - function ($url) { |
|
| 781 | + function($url) { |
|
| 782 | 782 | $urlObject = new \Purl\Url($url); |
| 783 | 783 | return $urlObject->registerableDomain; |
| 784 | 784 | }, |
@@ -827,10 +827,10 @@ discard block |
||
| 827 | 827 | foo(); |
| 828 | 828 | |
| 829 | 829 | array( |
| 830 | - 'key1' => function ($bar) { |
|
| 830 | + 'key1' => function($bar) { |
|
| 831 | 831 | return $bar; |
| 832 | 832 | }, |
| 833 | - 'key2' => function ($foo) { |
|
| 833 | + 'key2' => function($foo) { |
|
| 834 | 834 | return $foo; |
| 835 | 835 | }, |
| 836 | 836 | ); |
@@ -922,7 +922,7 @@ discard block |
||
| 922 | 922 | return array() + array(); // Array Merge |
| 923 | 923 | case 6: |
| 924 | 924 | // String connect |
| 925 | - return $functionReturningString('') . $functionReturningString(array()); |
|
| 925 | + return $functionReturningString('').$functionReturningString(array()); |
|
| 926 | 926 | case 7: |
| 927 | 927 | return functionCall( |
| 928 | 928 | $withMultiLineParam[0], |
@@ -940,7 +940,7 @@ discard block |
||
| 940 | 940 | public |
| 941 | 941 | $foo |
| 942 | 942 | ,$bar |
| 943 | - ,$baz = [ ] |
|
| 943 | + ,$baz = [] |
|
| 944 | 944 | ; |
| 945 | 945 | |
| 946 | 946 | public function wtfindent() { |
@@ -956,7 +956,7 @@ discard block |
||
| 956 | 956 | |
| 957 | 957 | switch ($foo) { |
| 958 | 958 | case self::FOO: |
| 959 | - return $this->bar($gfoo, function ($id) { |
|
| 959 | + return $this->bar($gfoo, function($id) { |
|
| 960 | 960 | return FOO::bar($id); |
| 961 | 961 | }, $values); |
| 962 | 962 | case self::BAR: |
@@ -1040,9 +1040,9 @@ discard block |
||
| 1040 | 1040 | { |
| 1041 | 1041 | public function someFunc() |
| 1042 | 1042 | { |
| 1043 | - a(function () { |
|
| 1043 | + a(function() { |
|
| 1044 | 1044 | echo "a"; |
| 1045 | - })->b(function () { |
|
| 1045 | + })->b(function() { |
|
| 1046 | 1046 | echo "b"; |
| 1047 | 1047 | }); |
| 1048 | 1048 | |
@@ -1084,7 +1084,7 @@ discard block |
||
| 1084 | 1084 | } |
| 1085 | 1085 | |
| 1086 | 1086 | $foo = foo( |
| 1087 | - function () { |
|
| 1087 | + function() { |
|
| 1088 | 1088 | $foo->debug( |
| 1089 | 1089 | $a, |
| 1090 | 1090 | $b |
@@ -1128,7 +1128,7 @@ discard block |
||
| 1128 | 1128 | ]; |
| 1129 | 1129 | |
| 1130 | 1130 | $foo = [ |
| 1131 | - function () { |
|
| 1131 | + function() { |
|
| 1132 | 1132 | if ($foo) { |
| 1133 | 1133 | return 'foo'; |
| 1134 | 1134 | } |
@@ -1136,8 +1136,8 @@ discard block |
||
| 1136 | 1136 | ]; |
| 1137 | 1137 | |
| 1138 | 1138 | $foo |
| 1139 | - ->bar(foo(function () { |
|
| 1140 | - }), foo(function () { |
|
| 1139 | + ->bar(foo(function() { |
|
| 1140 | + }), foo(function() { |
|
| 1141 | 1141 | })); |
| 1142 | 1142 | |
| 1143 | 1143 | echo 'foo'; |
@@ -1156,7 +1156,7 @@ discard block |
||
| 1156 | 1156 | } |
| 1157 | 1157 | |
| 1158 | 1158 | $foo = foo( |
| 1159 | - function () { |
|
| 1159 | + function() { |
|
| 1160 | 1160 | $foo->debug( |
| 1161 | 1161 | $a, |
| 1162 | 1162 | $b |
@@ -1177,14 +1177,14 @@ discard block |
||
| 1177 | 1177 | 'key2' => $var2, |
| 1178 | 1178 | ] = $data; |
| 1179 | 1179 | foreach ($var1 as $method) { |
| 1180 | - echo $method . $var2; |
|
| 1180 | + echo $method.$var2; |
|
| 1181 | 1181 | } |
| 1182 | 1182 | } |
| 1183 | 1183 | } |
| 1184 | 1184 | |
| 1185 | 1185 | switch ($a) { |
| 1186 | 1186 | case 0: |
| 1187 | - $a = function () { |
|
| 1187 | + $a = function() { |
|
| 1188 | 1188 | }; |
| 1189 | 1189 | case 1: |
| 1190 | 1190 | break; |
@@ -1229,7 +1229,7 @@ discard block |
||
| 1229 | 1229 | } |
| 1230 | 1230 | |
| 1231 | 1231 | array_map( |
| 1232 | - static function ( $item ) { |
|
| 1232 | + static function($item) { |
|
| 1233 | 1233 | echo $item; |
| 1234 | 1234 | }, |
| 1235 | 1235 | $some_array |
@@ -1238,7 +1238,7 @@ discard block |
||
| 1238 | 1238 | /** |
| 1239 | 1239 | * Comment. |
| 1240 | 1240 | */ |
| 1241 | -$a(function () use ($app) { |
|
| 1241 | +$a(function() use ($app) { |
|
| 1242 | 1242 | echo 'hi'; |
| 1243 | 1243 | })(); |
| 1244 | 1244 | |
@@ -1247,26 +1247,26 @@ discard block |
||
| 1247 | 1247 | function foo() |
| 1248 | 1248 | { |
| 1249 | 1249 | $foo('some |
| 1250 | - long description', function () { |
|
| 1250 | + long description', function() { |
|
| 1251 | 1251 | }); |
| 1252 | 1252 | |
| 1253 | 1253 | $foo('some |
| 1254 | 1254 | long |
| 1255 | - description', function () { |
|
| 1255 | + description', function() { |
|
| 1256 | 1256 | }); |
| 1257 | 1257 | |
| 1258 | 1258 | $foo( |
| 1259 | -'some long description', function () { |
|
| 1259 | +'some long description', function() { |
|
| 1260 | 1260 | }); |
| 1261 | 1261 | } |
| 1262 | 1262 | |
| 1263 | -switch ( $a ) { |
|
| 1263 | +switch ($a) { |
|
| 1264 | 1264 | case 'a': |
| 1265 | 1265 | $b = 2; |
| 1266 | 1266 | /** |
| 1267 | 1267 | * A comment. |
| 1268 | 1268 | */ |
| 1269 | - apply_filter( 'something', $b ); |
|
| 1269 | + apply_filter('something', $b); |
|
| 1270 | 1270 | break; |
| 1271 | 1271 | |
| 1272 | 1272 | case 'aa': |
@@ -1274,7 +1274,7 @@ discard block |
||
| 1274 | 1274 | /* |
| 1275 | 1275 | * A comment. |
| 1276 | 1276 | */ |
| 1277 | - apply_filter( 'something', $b ); |
|
| 1277 | + apply_filter('something', $b); |
|
| 1278 | 1278 | break; |
| 1279 | 1279 | |
| 1280 | 1280 | case 'b': |
@@ -1383,7 +1383,7 @@ discard block |
||
| 1383 | 1383 | <?php |
| 1384 | 1384 | } |
| 1385 | 1385 | |
| 1386 | -foo(function () { |
|
| 1386 | +foo(function() { |
|
| 1387 | 1387 | if ($conditionA && |
| 1388 | 1388 | $conditionB |
| 1389 | 1389 | ) { |
@@ -1393,7 +1393,7 @@ discard block |
||
| 1393 | 1393 | } |
| 1394 | 1394 | }); |
| 1395 | 1395 | |
| 1396 | -switch($foo) |
|
| 1396 | +switch ($foo) |
|
| 1397 | 1397 | { |
| 1398 | 1398 | case 1: |
| 1399 | 1399 | $value = 1; break; |
@@ -1430,7 +1430,7 @@ discard block |
||
| 1430 | 1430 | ]; |
| 1431 | 1431 | |
| 1432 | 1432 | $query = Model::query() |
| 1433 | - ->when($a, function () { |
|
| 1433 | + ->when($a, function() { |
|
| 1434 | 1434 | static $b = ''; |
| 1435 | 1435 | }); |
| 1436 | 1436 | |
@@ -1514,16 +1514,16 @@ discard block |
||
| 1514 | 1514 | } |
| 1515 | 1515 | |
| 1516 | 1516 | $list = [ |
| 1517 | - 'fn' => function ($a) { |
|
| 1517 | + 'fn' => function($a) { |
|
| 1518 | 1518 | if ($a === true) { |
| 1519 | 1519 | echo 'hi'; |
| 1520 | 1520 | } |
| 1521 | 1521 | }, |
| 1522 | - 'fn' => function ($a) { |
|
| 1522 | + 'fn' => function($a) { |
|
| 1523 | 1523 | if ($a === true) { |
| 1524 | 1524 | echo 'hi'; |
| 1525 | 1525 | $list2 = [ |
| 1526 | - 'fn' => function ($a) { |
|
| 1526 | + 'fn' => function($a) { |
|
| 1527 | 1527 | if ($a === true) { |
| 1528 | 1528 | echo 'hi'; |
| 1529 | 1529 | } |
@@ -61,8 +61,12 @@ discard block |
||
| 61 | 61 | public function open() |
| 62 | 62 | { |
| 63 | 63 | // Some inline stuff that shouldn't error |
| 64 | - if (TRUE) echo 'hello'; |
|
| 65 | - foreach ($tokens as $token) echo $token; |
|
| 64 | + if (TRUE) { |
|
| 65 | + echo 'hello'; |
|
| 66 | + } |
|
| 67 | + foreach ($tokens as $token) { |
|
| 68 | + echo $token; |
|
| 69 | + } |
|
| 66 | 70 | } |
| 67 | 71 | |
| 68 | 72 | /** |
@@ -794,13 +798,18 @@ discard block |
||
| 794 | 798 | elseif ($a == 6) : |
| 795 | 799 | echo "a equals 6"; |
| 796 | 800 | echo "!!!"; |
| 797 | -else : |
|
| 801 | +else { |
|
| 802 | + : |
|
| 798 | 803 | echo "a is neither 5 nor 6"; |
| 804 | +} |
|
| 799 | 805 | endif; |
| 800 | 806 | |
| 801 | 807 | if ($foo): |
| 802 | -if ($bar) $foo = 1; |
|
| 803 | -elseif ($baz) $foo = 2; |
|
| 808 | +if ($bar) { |
|
| 809 | + $foo = 1; |
|
| 810 | +} elseif ($baz) { |
|
| 811 | + $foo = 2; |
|
| 812 | +} |
|
| 804 | 813 | endif; |
| 805 | 814 | |
| 806 | 815 | $this |
@@ -1581,8 +1590,7 @@ discard block |
||
| 1581 | 1590 | |
| 1582 | 1591 | <?php |
| 1583 | 1592 | if (true) { // first error after line above is here |
| 1584 | - } |
|
| 1585 | - else if (true) { |
|
| 1593 | + } else if (true) { |
|
| 1586 | 1594 | } |
| 1587 | 1595 | |
| 1588 | 1596 | $a = 1; |
@@ -15,39 +15,39 @@ |
||
| 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 => 1, |
|
| 30 | - 5 => 1, |
|
| 31 | - 7 => 1, |
|
| 32 | - 8 => 1, |
|
| 33 | - ]; |
|
| 34 | - |
|
| 35 | - }//end getErrorList() |
|
| 36 | - |
|
| 37 | - |
|
| 38 | - /** |
|
| 39 | - * Returns the lines where warnings should occur. |
|
| 40 | - * |
|
| 41 | - * The key of the array should represent the line number and the value |
|
| 42 | - * should represent the number of warnings that should occur on that line. |
|
| 43 | - * |
|
| 44 | - * @return array<int, int> |
|
| 45 | - */ |
|
| 46 | - public function getWarningList() |
|
| 47 | - { |
|
| 48 | - return []; |
|
| 49 | - |
|
| 50 | - }//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 | + 3 => 1, |
|
| 30 | + 5 => 1, |
|
| 31 | + 7 => 1, |
|
| 32 | + 8 => 1, |
|
| 33 | + ]; |
|
| 34 | + |
|
| 35 | + }//end getErrorList() |
|
| 36 | + |
|
| 37 | + |
|
| 38 | + /** |
|
| 39 | + * Returns the lines where warnings should occur. |
|
| 40 | + * |
|
| 41 | + * The key of the array should represent the line number and the value |
|
| 42 | + * should represent the number of warnings that should occur on that line. |
|
| 43 | + * |
|
| 44 | + * @return array<int, int> |
|
| 45 | + */ |
|
| 46 | + public function getWarningList() |
|
| 47 | + { |
|
| 48 | + return []; |
|
| 49 | + |
|
| 50 | + }//end getWarningList() |
|
| 51 | 51 | |
| 52 | 52 | |
| 53 | 53 | }//end class |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | * |
| 48 | 48 | * @return array<int, int> |
| 49 | 49 | */ |
| 50 | - public function getErrorList($testFile='') |
|
| 50 | + public function getErrorList($testFile = '') |
|
| 51 | 51 | { |
| 52 | 52 | switch ($testFile) { |
| 53 | 53 | case 'DisallowLongArraySyntaxUnitTest.1.inc': |
@@ -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 | - * @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 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
| 32 | - return [ |
|
| 33 | - 2 => 1, |
|
| 34 | - 4 => 1, |
|
| 35 | - 6 => 1, |
|
| 36 | - 7 => 1, |
|
| 37 | - 12 => 1, |
|
| 38 | - ]; |
|
| 39 | - case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
| 40 | - return [ |
|
| 41 | - 2 => 1, |
|
| 42 | - 9 => 1, |
|
| 43 | - ]; |
|
| 44 | - default: |
|
| 45 | - return []; |
|
| 46 | - }//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 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
| 32 | + return [ |
|
| 33 | + 2 => 1, |
|
| 34 | + 4 => 1, |
|
| 35 | + 6 => 1, |
|
| 36 | + 7 => 1, |
|
| 37 | + 12 => 1, |
|
| 38 | + ]; |
|
| 39 | + case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
| 40 | + return [ |
|
| 41 | + 2 => 1, |
|
| 42 | + 9 => 1, |
|
| 43 | + ]; |
|
| 44 | + default: |
|
| 45 | + return []; |
|
| 46 | + }//end switch |
|
| 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 |
@@ -28,21 +28,21 @@ |
||
| 28 | 28 | public function getErrorList($testFile='') |
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | - case 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
| 32 | - return [ |
|
| 33 | - 2 => 1, |
|
| 34 | - 4 => 1, |
|
| 35 | - 6 => 1, |
|
| 36 | - 7 => 1, |
|
| 37 | - 12 => 1, |
|
| 38 | - ]; |
|
| 39 | - case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
| 40 | - return [ |
|
| 41 | - 2 => 1, |
|
| 42 | - 9 => 1, |
|
| 43 | - ]; |
|
| 44 | - default: |
|
| 45 | - return []; |
|
| 31 | + case 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
| 32 | + return [ |
|
| 33 | + 2 => 1, |
|
| 34 | + 4 => 1, |
|
| 35 | + 6 => 1, |
|
| 36 | + 7 => 1, |
|
| 37 | + 12 => 1, |
|
| 38 | + ]; |
|
| 39 | + case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
| 40 | + return [ |
|
| 41 | + 2 => 1, |
|
| 42 | + 9 => 1, |
|
| 43 | + ]; |
|
| 44 | + default: |
|
| 45 | + return []; |
|
| 46 | 46 | }//end switch |
| 47 | 47 | |
| 48 | 48 | }//end getErrorList() |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | * |
| 41 | 41 | * @return array<int, int> |
| 42 | 42 | */ |
| 43 | - public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
| 43 | + public function getWarningList($testFile = 'MultipleStatementAlignmentUnitTest.inc') |
|
| 44 | 44 | { |
| 45 | 45 | switch ($testFile) { |
| 46 | 46 | case 'MultipleStatementAlignmentUnitTest.inc': |
@@ -15,152 +15,152 @@ |
||
| 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 []; |
|
| 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 | 29 | |
| 30 | - }//end getErrorList() |
|
| 30 | + }//end getErrorList() |
|
| 31 | 31 | |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Returns the lines where warnings should occur. |
|
| 35 | - * |
|
| 36 | - * The key of the array should represent the line number and the value |
|
| 37 | - * should represent the number of warnings that should occur on that line. |
|
| 38 | - * |
|
| 39 | - * @param string $testFile The name of the file being tested. |
|
| 40 | - * |
|
| 41 | - * @return array<int, int> |
|
| 42 | - */ |
|
| 43 | - public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
| 44 | - { |
|
| 45 | - switch ($testFile) { |
|
| 46 | - case 'MultipleStatementAlignmentUnitTest.inc': |
|
| 47 | - return [ |
|
| 48 | - 11 => 1, |
|
| 49 | - 12 => 1, |
|
| 50 | - 23 => 1, |
|
| 51 | - 24 => 1, |
|
| 52 | - 26 => 1, |
|
| 53 | - 27 => 1, |
|
| 54 | - 37 => 1, |
|
| 55 | - 38 => 1, |
|
| 56 | - 48 => 1, |
|
| 57 | - 50 => 1, |
|
| 58 | - 51 => 1, |
|
| 59 | - 61 => 1, |
|
| 60 | - 62 => 1, |
|
| 61 | - 64 => 1, |
|
| 62 | - 65 => 1, |
|
| 63 | - 71 => 1, |
|
| 64 | - 78 => 1, |
|
| 65 | - 79 => 1, |
|
| 66 | - 86 => 1, |
|
| 67 | - 92 => 1, |
|
| 68 | - 93 => 1, |
|
| 69 | - 94 => 1, |
|
| 70 | - 95 => 1, |
|
| 71 | - 123 => 1, |
|
| 72 | - 124 => 1, |
|
| 73 | - 126 => 1, |
|
| 74 | - 129 => 1, |
|
| 75 | - 154 => 1, |
|
| 76 | - 161 => 1, |
|
| 77 | - 178 => 1, |
|
| 78 | - 179 => 1, |
|
| 79 | - 182 => 1, |
|
| 80 | - 206 => 1, |
|
| 81 | - 207 => 1, |
|
| 82 | - 252 => 1, |
|
| 83 | - 257 => 1, |
|
| 84 | - 263 => 1, |
|
| 85 | - 269 => 1, |
|
| 86 | - 293 => 1, |
|
| 87 | - 295 => 1, |
|
| 88 | - 296 => 1, |
|
| 89 | - 297 => 1, |
|
| 90 | - 301 => 1, |
|
| 91 | - 303 => 1, |
|
| 92 | - 308 => 1, |
|
| 93 | - 311 => 1, |
|
| 94 | - 313 => 1, |
|
| 95 | - 314 => 1, |
|
| 96 | - 321 => 1, |
|
| 97 | - 322 => 1, |
|
| 98 | - 324 => 1, |
|
| 99 | - 329 => 1, |
|
| 100 | - 331 => 1, |
|
| 101 | - 336 => 1, |
|
| 102 | - 339 => 1, |
|
| 103 | - 341 => 1, |
|
| 104 | - 342 => 1, |
|
| 105 | - 349 => 1, |
|
| 106 | - 350 => 1, |
|
| 107 | - 352 => 1, |
|
| 108 | - 357 => 1, |
|
| 109 | - 364 => 1, |
|
| 110 | - 396 => 1, |
|
| 111 | - 398 => 1, |
|
| 112 | - 399 => 1, |
|
| 113 | - 401 => 1, |
|
| 114 | - 420 => 1, |
|
| 115 | - 422 => 1, |
|
| 116 | - 436 => 1, |
|
| 117 | - 438 => 1, |
|
| 118 | - 442 => 1, |
|
| 119 | - 443 => 1, |
|
| 120 | - 454 => 1, |
|
| 121 | - 487 => 1, |
|
| 122 | - 499 => 1, |
|
| 123 | - 500 => 1, |
|
| 124 | - ]; |
|
| 125 | - break; |
|
| 126 | - case 'MultipleStatementAlignmentUnitTest.js': |
|
| 127 | - return [ |
|
| 128 | - 11 => 1, |
|
| 129 | - 12 => 1, |
|
| 130 | - 23 => 1, |
|
| 131 | - 24 => 1, |
|
| 132 | - 26 => 1, |
|
| 133 | - 27 => 1, |
|
| 134 | - 37 => 1, |
|
| 135 | - 38 => 1, |
|
| 136 | - 48 => 1, |
|
| 137 | - 50 => 1, |
|
| 138 | - 51 => 1, |
|
| 139 | - 61 => 1, |
|
| 140 | - 62 => 1, |
|
| 141 | - 64 => 1, |
|
| 142 | - 65 => 1, |
|
| 143 | - 71 => 1, |
|
| 144 | - 78 => 1, |
|
| 145 | - 79 => 1, |
|
| 146 | - 81 => 1, |
|
| 147 | - 82 => 1, |
|
| 148 | - 83 => 1, |
|
| 149 | - 85 => 1, |
|
| 150 | - 86 => 1, |
|
| 151 | - 100 => 1, |
|
| 152 | - 112 => 1, |
|
| 153 | - 113 => 1, |
|
| 154 | - 114 => 1, |
|
| 155 | - 117 => 1, |
|
| 156 | - ]; |
|
| 157 | - break; |
|
| 158 | - default: |
|
| 159 | - return []; |
|
| 160 | - break; |
|
| 161 | - }//end switch |
|
| 33 | + /** |
|
| 34 | + * Returns the lines where warnings should occur. |
|
| 35 | + * |
|
| 36 | + * The key of the array should represent the line number and the value |
|
| 37 | + * should represent the number of warnings that should occur on that line. |
|
| 38 | + * |
|
| 39 | + * @param string $testFile The name of the file being tested. |
|
| 40 | + * |
|
| 41 | + * @return array<int, int> |
|
| 42 | + */ |
|
| 43 | + public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
| 44 | + { |
|
| 45 | + switch ($testFile) { |
|
| 46 | + case 'MultipleStatementAlignmentUnitTest.inc': |
|
| 47 | + return [ |
|
| 48 | + 11 => 1, |
|
| 49 | + 12 => 1, |
|
| 50 | + 23 => 1, |
|
| 51 | + 24 => 1, |
|
| 52 | + 26 => 1, |
|
| 53 | + 27 => 1, |
|
| 54 | + 37 => 1, |
|
| 55 | + 38 => 1, |
|
| 56 | + 48 => 1, |
|
| 57 | + 50 => 1, |
|
| 58 | + 51 => 1, |
|
| 59 | + 61 => 1, |
|
| 60 | + 62 => 1, |
|
| 61 | + 64 => 1, |
|
| 62 | + 65 => 1, |
|
| 63 | + 71 => 1, |
|
| 64 | + 78 => 1, |
|
| 65 | + 79 => 1, |
|
| 66 | + 86 => 1, |
|
| 67 | + 92 => 1, |
|
| 68 | + 93 => 1, |
|
| 69 | + 94 => 1, |
|
| 70 | + 95 => 1, |
|
| 71 | + 123 => 1, |
|
| 72 | + 124 => 1, |
|
| 73 | + 126 => 1, |
|
| 74 | + 129 => 1, |
|
| 75 | + 154 => 1, |
|
| 76 | + 161 => 1, |
|
| 77 | + 178 => 1, |
|
| 78 | + 179 => 1, |
|
| 79 | + 182 => 1, |
|
| 80 | + 206 => 1, |
|
| 81 | + 207 => 1, |
|
| 82 | + 252 => 1, |
|
| 83 | + 257 => 1, |
|
| 84 | + 263 => 1, |
|
| 85 | + 269 => 1, |
|
| 86 | + 293 => 1, |
|
| 87 | + 295 => 1, |
|
| 88 | + 296 => 1, |
|
| 89 | + 297 => 1, |
|
| 90 | + 301 => 1, |
|
| 91 | + 303 => 1, |
|
| 92 | + 308 => 1, |
|
| 93 | + 311 => 1, |
|
| 94 | + 313 => 1, |
|
| 95 | + 314 => 1, |
|
| 96 | + 321 => 1, |
|
| 97 | + 322 => 1, |
|
| 98 | + 324 => 1, |
|
| 99 | + 329 => 1, |
|
| 100 | + 331 => 1, |
|
| 101 | + 336 => 1, |
|
| 102 | + 339 => 1, |
|
| 103 | + 341 => 1, |
|
| 104 | + 342 => 1, |
|
| 105 | + 349 => 1, |
|
| 106 | + 350 => 1, |
|
| 107 | + 352 => 1, |
|
| 108 | + 357 => 1, |
|
| 109 | + 364 => 1, |
|
| 110 | + 396 => 1, |
|
| 111 | + 398 => 1, |
|
| 112 | + 399 => 1, |
|
| 113 | + 401 => 1, |
|
| 114 | + 420 => 1, |
|
| 115 | + 422 => 1, |
|
| 116 | + 436 => 1, |
|
| 117 | + 438 => 1, |
|
| 118 | + 442 => 1, |
|
| 119 | + 443 => 1, |
|
| 120 | + 454 => 1, |
|
| 121 | + 487 => 1, |
|
| 122 | + 499 => 1, |
|
| 123 | + 500 => 1, |
|
| 124 | + ]; |
|
| 125 | + break; |
|
| 126 | + case 'MultipleStatementAlignmentUnitTest.js': |
|
| 127 | + return [ |
|
| 128 | + 11 => 1, |
|
| 129 | + 12 => 1, |
|
| 130 | + 23 => 1, |
|
| 131 | + 24 => 1, |
|
| 132 | + 26 => 1, |
|
| 133 | + 27 => 1, |
|
| 134 | + 37 => 1, |
|
| 135 | + 38 => 1, |
|
| 136 | + 48 => 1, |
|
| 137 | + 50 => 1, |
|
| 138 | + 51 => 1, |
|
| 139 | + 61 => 1, |
|
| 140 | + 62 => 1, |
|
| 141 | + 64 => 1, |
|
| 142 | + 65 => 1, |
|
| 143 | + 71 => 1, |
|
| 144 | + 78 => 1, |
|
| 145 | + 79 => 1, |
|
| 146 | + 81 => 1, |
|
| 147 | + 82 => 1, |
|
| 148 | + 83 => 1, |
|
| 149 | + 85 => 1, |
|
| 150 | + 86 => 1, |
|
| 151 | + 100 => 1, |
|
| 152 | + 112 => 1, |
|
| 153 | + 113 => 1, |
|
| 154 | + 114 => 1, |
|
| 155 | + 117 => 1, |
|
| 156 | + ]; |
|
| 157 | + break; |
|
| 158 | + default: |
|
| 159 | + return []; |
|
| 160 | + break; |
|
| 161 | + }//end switch |
|
| 162 | 162 | |
| 163 | - }//end getWarningList() |
|
| 163 | + }//end getWarningList() |
|
| 164 | 164 | |
| 165 | 165 | |
| 166 | 166 | }//end class |
@@ -43,121 +43,121 @@ |
||
| 43 | 43 | public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
| 44 | 44 | { |
| 45 | 45 | switch ($testFile) { |
| 46 | - case 'MultipleStatementAlignmentUnitTest.inc': |
|
| 47 | - return [ |
|
| 48 | - 11 => 1, |
|
| 49 | - 12 => 1, |
|
| 50 | - 23 => 1, |
|
| 51 | - 24 => 1, |
|
| 52 | - 26 => 1, |
|
| 53 | - 27 => 1, |
|
| 54 | - 37 => 1, |
|
| 55 | - 38 => 1, |
|
| 56 | - 48 => 1, |
|
| 57 | - 50 => 1, |
|
| 58 | - 51 => 1, |
|
| 59 | - 61 => 1, |
|
| 60 | - 62 => 1, |
|
| 61 | - 64 => 1, |
|
| 62 | - 65 => 1, |
|
| 63 | - 71 => 1, |
|
| 64 | - 78 => 1, |
|
| 65 | - 79 => 1, |
|
| 66 | - 86 => 1, |
|
| 67 | - 92 => 1, |
|
| 68 | - 93 => 1, |
|
| 69 | - 94 => 1, |
|
| 70 | - 95 => 1, |
|
| 71 | - 123 => 1, |
|
| 72 | - 124 => 1, |
|
| 73 | - 126 => 1, |
|
| 74 | - 129 => 1, |
|
| 75 | - 154 => 1, |
|
| 76 | - 161 => 1, |
|
| 77 | - 178 => 1, |
|
| 78 | - 179 => 1, |
|
| 79 | - 182 => 1, |
|
| 80 | - 206 => 1, |
|
| 81 | - 207 => 1, |
|
| 82 | - 252 => 1, |
|
| 83 | - 257 => 1, |
|
| 84 | - 263 => 1, |
|
| 85 | - 269 => 1, |
|
| 86 | - 293 => 1, |
|
| 87 | - 295 => 1, |
|
| 88 | - 296 => 1, |
|
| 89 | - 297 => 1, |
|
| 90 | - 301 => 1, |
|
| 91 | - 303 => 1, |
|
| 92 | - 308 => 1, |
|
| 93 | - 311 => 1, |
|
| 94 | - 313 => 1, |
|
| 95 | - 314 => 1, |
|
| 96 | - 321 => 1, |
|
| 97 | - 322 => 1, |
|
| 98 | - 324 => 1, |
|
| 99 | - 329 => 1, |
|
| 100 | - 331 => 1, |
|
| 101 | - 336 => 1, |
|
| 102 | - 339 => 1, |
|
| 103 | - 341 => 1, |
|
| 104 | - 342 => 1, |
|
| 105 | - 349 => 1, |
|
| 106 | - 350 => 1, |
|
| 107 | - 352 => 1, |
|
| 108 | - 357 => 1, |
|
| 109 | - 364 => 1, |
|
| 110 | - 396 => 1, |
|
| 111 | - 398 => 1, |
|
| 112 | - 399 => 1, |
|
| 113 | - 401 => 1, |
|
| 114 | - 420 => 1, |
|
| 115 | - 422 => 1, |
|
| 116 | - 436 => 1, |
|
| 117 | - 438 => 1, |
|
| 118 | - 442 => 1, |
|
| 119 | - 443 => 1, |
|
| 120 | - 454 => 1, |
|
| 121 | - 487 => 1, |
|
| 122 | - 499 => 1, |
|
| 123 | - 500 => 1, |
|
| 124 | - ]; |
|
| 125 | - break; |
|
| 126 | - case 'MultipleStatementAlignmentUnitTest.js': |
|
| 127 | - return [ |
|
| 128 | - 11 => 1, |
|
| 129 | - 12 => 1, |
|
| 130 | - 23 => 1, |
|
| 131 | - 24 => 1, |
|
| 132 | - 26 => 1, |
|
| 133 | - 27 => 1, |
|
| 134 | - 37 => 1, |
|
| 135 | - 38 => 1, |
|
| 136 | - 48 => 1, |
|
| 137 | - 50 => 1, |
|
| 138 | - 51 => 1, |
|
| 139 | - 61 => 1, |
|
| 140 | - 62 => 1, |
|
| 141 | - 64 => 1, |
|
| 142 | - 65 => 1, |
|
| 143 | - 71 => 1, |
|
| 144 | - 78 => 1, |
|
| 145 | - 79 => 1, |
|
| 146 | - 81 => 1, |
|
| 147 | - 82 => 1, |
|
| 148 | - 83 => 1, |
|
| 149 | - 85 => 1, |
|
| 150 | - 86 => 1, |
|
| 151 | - 100 => 1, |
|
| 152 | - 112 => 1, |
|
| 153 | - 113 => 1, |
|
| 154 | - 114 => 1, |
|
| 155 | - 117 => 1, |
|
| 156 | - ]; |
|
| 157 | - break; |
|
| 158 | - default: |
|
| 159 | - return []; |
|
| 160 | - break; |
|
| 46 | + case 'MultipleStatementAlignmentUnitTest.inc': |
|
| 47 | + return [ |
|
| 48 | + 11 => 1, |
|
| 49 | + 12 => 1, |
|
| 50 | + 23 => 1, |
|
| 51 | + 24 => 1, |
|
| 52 | + 26 => 1, |
|
| 53 | + 27 => 1, |
|
| 54 | + 37 => 1, |
|
| 55 | + 38 => 1, |
|
| 56 | + 48 => 1, |
|
| 57 | + 50 => 1, |
|
| 58 | + 51 => 1, |
|
| 59 | + 61 => 1, |
|
| 60 | + 62 => 1, |
|
| 61 | + 64 => 1, |
|
| 62 | + 65 => 1, |
|
| 63 | + 71 => 1, |
|
| 64 | + 78 => 1, |
|
| 65 | + 79 => 1, |
|
| 66 | + 86 => 1, |
|
| 67 | + 92 => 1, |
|
| 68 | + 93 => 1, |
|
| 69 | + 94 => 1, |
|
| 70 | + 95 => 1, |
|
| 71 | + 123 => 1, |
|
| 72 | + 124 => 1, |
|
| 73 | + 126 => 1, |
|
| 74 | + 129 => 1, |
|
| 75 | + 154 => 1, |
|
| 76 | + 161 => 1, |
|
| 77 | + 178 => 1, |
|
| 78 | + 179 => 1, |
|
| 79 | + 182 => 1, |
|
| 80 | + 206 => 1, |
|
| 81 | + 207 => 1, |
|
| 82 | + 252 => 1, |
|
| 83 | + 257 => 1, |
|
| 84 | + 263 => 1, |
|
| 85 | + 269 => 1, |
|
| 86 | + 293 => 1, |
|
| 87 | + 295 => 1, |
|
| 88 | + 296 => 1, |
|
| 89 | + 297 => 1, |
|
| 90 | + 301 => 1, |
|
| 91 | + 303 => 1, |
|
| 92 | + 308 => 1, |
|
| 93 | + 311 => 1, |
|
| 94 | + 313 => 1, |
|
| 95 | + 314 => 1, |
|
| 96 | + 321 => 1, |
|
| 97 | + 322 => 1, |
|
| 98 | + 324 => 1, |
|
| 99 | + 329 => 1, |
|
| 100 | + 331 => 1, |
|
| 101 | + 336 => 1, |
|
| 102 | + 339 => 1, |
|
| 103 | + 341 => 1, |
|
| 104 | + 342 => 1, |
|
| 105 | + 349 => 1, |
|
| 106 | + 350 => 1, |
|
| 107 | + 352 => 1, |
|
| 108 | + 357 => 1, |
|
| 109 | + 364 => 1, |
|
| 110 | + 396 => 1, |
|
| 111 | + 398 => 1, |
|
| 112 | + 399 => 1, |
|
| 113 | + 401 => 1, |
|
| 114 | + 420 => 1, |
|
| 115 | + 422 => 1, |
|
| 116 | + 436 => 1, |
|
| 117 | + 438 => 1, |
|
| 118 | + 442 => 1, |
|
| 119 | + 443 => 1, |
|
| 120 | + 454 => 1, |
|
| 121 | + 487 => 1, |
|
| 122 | + 499 => 1, |
|
| 123 | + 500 => 1, |
|
| 124 | + ]; |
|
| 125 | + break; |
|
| 126 | + case 'MultipleStatementAlignmentUnitTest.js': |
|
| 127 | + return [ |
|
| 128 | + 11 => 1, |
|
| 129 | + 12 => 1, |
|
| 130 | + 23 => 1, |
|
| 131 | + 24 => 1, |
|
| 132 | + 26 => 1, |
|
| 133 | + 27 => 1, |
|
| 134 | + 37 => 1, |
|
| 135 | + 38 => 1, |
|
| 136 | + 48 => 1, |
|
| 137 | + 50 => 1, |
|
| 138 | + 51 => 1, |
|
| 139 | + 61 => 1, |
|
| 140 | + 62 => 1, |
|
| 141 | + 64 => 1, |
|
| 142 | + 65 => 1, |
|
| 143 | + 71 => 1, |
|
| 144 | + 78 => 1, |
|
| 145 | + 79 => 1, |
|
| 146 | + 81 => 1, |
|
| 147 | + 82 => 1, |
|
| 148 | + 83 => 1, |
|
| 149 | + 85 => 1, |
|
| 150 | + 86 => 1, |
|
| 151 | + 100 => 1, |
|
| 152 | + 112 => 1, |
|
| 153 | + 113 => 1, |
|
| 154 | + 114 => 1, |
|
| 155 | + 117 => 1, |
|
| 156 | + ]; |
|
| 157 | + break; |
|
| 158 | + default: |
|
| 159 | + return []; |
|
| 160 | + break; |
|
| 161 | 161 | }//end switch |
| 162 | 162 | |
| 163 | 163 | }//end getWarningList() |
@@ -16,6 +16,6 @@ |
||
| 16 | 16 | $code = '<'.'?php '; |
| 17 | 17 | |
| 18 | 18 | $string = 'This is a really long string. ' |
| 19 | - . 'It is being used for errors. ' |
|
| 20 | - . 'The message is not translated.'; |
|
| 19 | + . 'It is being used for errors. ' |
|
| 20 | + . 'The message is not translated.'; |
|
| 21 | 21 | ?> |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $x = 'My '.'string'; |
| 3 | -$x = 'My '. 1234; |
|
| 3 | +$x = 'My '.1234; |
|
| 4 | 4 | $x = 'My '.$y.' test'; |
| 5 | 5 | |
| 6 | 6 | echo $data['my'.'index']; |
| 7 | -echo $data['my'. 4]; |
|
| 7 | +echo $data['my'.4]; |
|
| 8 | 8 | echo $data['my'.$x]; |
| 9 | 9 | echo $data[$x.$y.'My'.'String']; |
| 10 | 10 | |
@@ -15,59 +15,59 @@ |
||
| 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='UnnecessaryStringConcatUnitTest.inc') |
|
| 29 | - { |
|
| 30 | - switch ($testFile) { |
|
| 31 | - case 'UnnecessaryStringConcatUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 2 => 1, |
|
| 34 | - 6 => 1, |
|
| 35 | - 9 => 1, |
|
| 36 | - 12 => 1, |
|
| 37 | - 19 => 1, |
|
| 38 | - 20 => 1, |
|
| 39 | - ]; |
|
| 40 | - break; |
|
| 41 | - case 'UnnecessaryStringConcatUnitTest.js': |
|
| 42 | - return [ |
|
| 43 | - 1 => 1, |
|
| 44 | - 8 => 1, |
|
| 45 | - 11 => 1, |
|
| 46 | - 14 => 1, |
|
| 47 | - 15 => 1, |
|
| 48 | - ]; |
|
| 49 | - break; |
|
| 50 | - default: |
|
| 51 | - return []; |
|
| 52 | - break; |
|
| 53 | - }//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='UnnecessaryStringConcatUnitTest.inc') |
|
| 29 | + { |
|
| 30 | + switch ($testFile) { |
|
| 31 | + case 'UnnecessaryStringConcatUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 2 => 1, |
|
| 34 | + 6 => 1, |
|
| 35 | + 9 => 1, |
|
| 36 | + 12 => 1, |
|
| 37 | + 19 => 1, |
|
| 38 | + 20 => 1, |
|
| 39 | + ]; |
|
| 40 | + break; |
|
| 41 | + case 'UnnecessaryStringConcatUnitTest.js': |
|
| 42 | + return [ |
|
| 43 | + 1 => 1, |
|
| 44 | + 8 => 1, |
|
| 45 | + 11 => 1, |
|
| 46 | + 14 => 1, |
|
| 47 | + 15 => 1, |
|
| 48 | + ]; |
|
| 49 | + break; |
|
| 50 | + default: |
|
| 51 | + return []; |
|
| 52 | + break; |
|
| 53 | + }//end switch |
|
| 54 | 54 | |
| 55 | - }//end getErrorList() |
|
| 55 | + }//end getErrorList() |
|
| 56 | 56 | |
| 57 | 57 | |
| 58 | - /** |
|
| 59 | - * Returns the lines where warnings should occur. |
|
| 60 | - * |
|
| 61 | - * The key of the array should represent the line number and the value |
|
| 62 | - * should represent the number of warnings that should occur on that line. |
|
| 63 | - * |
|
| 64 | - * @return array<int, int> |
|
| 65 | - */ |
|
| 66 | - public function getWarningList() |
|
| 67 | - { |
|
| 68 | - return []; |
|
| 58 | + /** |
|
| 59 | + * Returns the lines where warnings should occur. |
|
| 60 | + * |
|
| 61 | + * The key of the array should represent the line number and the value |
|
| 62 | + * should represent the number of warnings that should occur on that line. |
|
| 63 | + * |
|
| 64 | + * @return array<int, int> |
|
| 65 | + */ |
|
| 66 | + public function getWarningList() |
|
| 67 | + { |
|
| 68 | + return []; |
|
| 69 | 69 | |
| 70 | - }//end getWarningList() |
|
| 70 | + }//end getWarningList() |
|
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | }//end class |
@@ -28,28 +28,28 @@ |
||
| 28 | 28 | public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') |
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | - case 'UnnecessaryStringConcatUnitTest.inc': |
|
| 32 | - return [ |
|
| 33 | - 2 => 1, |
|
| 34 | - 6 => 1, |
|
| 35 | - 9 => 1, |
|
| 36 | - 12 => 1, |
|
| 37 | - 19 => 1, |
|
| 38 | - 20 => 1, |
|
| 39 | - ]; |
|
| 40 | - break; |
|
| 41 | - case 'UnnecessaryStringConcatUnitTest.js': |
|
| 42 | - return [ |
|
| 43 | - 1 => 1, |
|
| 44 | - 8 => 1, |
|
| 45 | - 11 => 1, |
|
| 46 | - 14 => 1, |
|
| 47 | - 15 => 1, |
|
| 48 | - ]; |
|
| 49 | - break; |
|
| 50 | - default: |
|
| 51 | - return []; |
|
| 52 | - break; |
|
| 31 | + case 'UnnecessaryStringConcatUnitTest.inc': |
|
| 32 | + return [ |
|
| 33 | + 2 => 1, |
|
| 34 | + 6 => 1, |
|
| 35 | + 9 => 1, |
|
| 36 | + 12 => 1, |
|
| 37 | + 19 => 1, |
|
| 38 | + 20 => 1, |
|
| 39 | + ]; |
|
| 40 | + break; |
|
| 41 | + case 'UnnecessaryStringConcatUnitTest.js': |
|
| 42 | + return [ |
|
| 43 | + 1 => 1, |
|
| 44 | + 8 => 1, |
|
| 45 | + 11 => 1, |
|
| 46 | + 14 => 1, |
|
| 47 | + 15 => 1, |
|
| 48 | + ]; |
|
| 49 | + break; |
|
| 50 | + default: |
|
| 51 | + return []; |
|
| 52 | + break; |
|
| 53 | 53 | }//end switch |
| 54 | 54 | |
| 55 | 55 | }//end getErrorList() |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return array<int, int> |
| 27 | 27 | */ |
| 28 | - public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') |
|
| 28 | + public function getErrorList($testFile = 'UnnecessaryStringConcatUnitTest.inc') |
|
| 29 | 29 | { |
| 30 | 30 | switch ($testFile) { |
| 31 | 31 | case 'UnnecessaryStringConcatUnitTest.inc': |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @return array<int, int> |
| 42 | 42 | */ |
| 43 | - public function getErrorList($testFile='') |
|
| 43 | + public function getErrorList($testFile = '') |
|
| 44 | 44 | { |
| 45 | 45 | switch ($testFile) { |
| 46 | 46 | case 'LineLengthUnitTest.1.inc': |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @return array<int, int> |
| 75 | 75 | */ |
| 76 | - public function getWarningList($testFile='') |
|
| 76 | + public function getWarningList($testFile = '') |
|
| 77 | 77 | { |
| 78 | 78 | switch ($testFile) { |
| 79 | 79 | case 'LineLengthUnitTest.1.inc': |
@@ -15,97 +15,97 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Get a list of CLI values to set before the file is tested. |
|
| 20 | - * |
|
| 21 | - * @param string $testFile The name of the file being tested. |
|
| 22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
| 23 | - * |
|
| 24 | - * @return void |
|
| 25 | - */ |
|
| 26 | - public function setCliValues($testFile, $config) |
|
| 27 | - { |
|
| 28 | - $config->tabWidth = 4; |
|
| 18 | + /** |
|
| 19 | + * Get a list of CLI values to set before the file is tested. |
|
| 20 | + * |
|
| 21 | + * @param string $testFile The name of the file being tested. |
|
| 22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
| 23 | + * |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 26 | + public function setCliValues($testFile, $config) |
|
| 27 | + { |
|
| 28 | + $config->tabWidth = 4; |
|
| 29 | 29 | |
| 30 | - }//end setCliValues() |
|
| 30 | + }//end setCliValues() |
|
| 31 | 31 | |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Returns the lines where errors should occur. |
|
| 35 | - * |
|
| 36 | - * The key of the array should represent the line number and the value |
|
| 37 | - * should represent the number of errors that should occur on that line. |
|
| 38 | - * |
|
| 39 | - * @param string $testFile The name of the file being tested. |
|
| 40 | - * |
|
| 41 | - * @return array<int, int> |
|
| 42 | - */ |
|
| 43 | - public function getErrorList($testFile='') |
|
| 44 | - { |
|
| 45 | - switch ($testFile) { |
|
| 46 | - case 'LineLengthUnitTest.1.inc': |
|
| 47 | - return [ |
|
| 48 | - 31 => 1, |
|
| 49 | - 34 => 1, |
|
| 50 | - 45 => 1, |
|
| 51 | - 82 => 1, |
|
| 52 | - ]; |
|
| 53 | - break; |
|
| 54 | - case 'LineLengthUnitTest.2.inc': |
|
| 55 | - case 'LineLengthUnitTest.3.inc': |
|
| 56 | - return [7 => 1]; |
|
| 57 | - break; |
|
| 58 | - default: |
|
| 59 | - return []; |
|
| 60 | - break; |
|
| 61 | - }//end switch |
|
| 33 | + /** |
|
| 34 | + * Returns the lines where errors should occur. |
|
| 35 | + * |
|
| 36 | + * The key of the array should represent the line number and the value |
|
| 37 | + * should represent the number of errors that should occur on that line. |
|
| 38 | + * |
|
| 39 | + * @param string $testFile The name of the file being tested. |
|
| 40 | + * |
|
| 41 | + * @return array<int, int> |
|
| 42 | + */ |
|
| 43 | + public function getErrorList($testFile='') |
|
| 44 | + { |
|
| 45 | + switch ($testFile) { |
|
| 46 | + case 'LineLengthUnitTest.1.inc': |
|
| 47 | + return [ |
|
| 48 | + 31 => 1, |
|
| 49 | + 34 => 1, |
|
| 50 | + 45 => 1, |
|
| 51 | + 82 => 1, |
|
| 52 | + ]; |
|
| 53 | + break; |
|
| 54 | + case 'LineLengthUnitTest.2.inc': |
|
| 55 | + case 'LineLengthUnitTest.3.inc': |
|
| 56 | + return [7 => 1]; |
|
| 57 | + break; |
|
| 58 | + default: |
|
| 59 | + return []; |
|
| 60 | + break; |
|
| 61 | + }//end switch |
|
| 62 | 62 | |
| 63 | - }//end getErrorList() |
|
| 63 | + }//end getErrorList() |
|
| 64 | 64 | |
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * Returns the lines where warnings should occur. |
|
| 68 | - * |
|
| 69 | - * The key of the array should represent the line number and the value |
|
| 70 | - * should represent the number of warnings that should occur on that line. |
|
| 71 | - * |
|
| 72 | - * @param string $testFile The name of the file being tested. |
|
| 73 | - * |
|
| 74 | - * @return array<int, int> |
|
| 75 | - */ |
|
| 76 | - public function getWarningList($testFile='') |
|
| 77 | - { |
|
| 78 | - switch ($testFile) { |
|
| 79 | - case 'LineLengthUnitTest.1.inc': |
|
| 80 | - return [ |
|
| 81 | - 9 => 1, |
|
| 82 | - 15 => 1, |
|
| 83 | - 21 => 1, |
|
| 84 | - 24 => 1, |
|
| 85 | - 29 => 1, |
|
| 86 | - 37 => 1, |
|
| 87 | - 63 => 1, |
|
| 88 | - 73 => 1, |
|
| 89 | - 75 => 1, |
|
| 90 | - 84 => 1, |
|
| 91 | - ]; |
|
| 92 | - break; |
|
| 93 | - case 'LineLengthUnitTest.2.inc': |
|
| 94 | - case 'LineLengthUnitTest.3.inc': |
|
| 95 | - return [6 => 1]; |
|
| 96 | - break; |
|
| 97 | - case 'LineLengthUnitTest.4.inc': |
|
| 98 | - return [ |
|
| 99 | - 10 => 1, |
|
| 100 | - 14 => 1, |
|
| 101 | - ]; |
|
| 102 | - break; |
|
| 103 | - default: |
|
| 104 | - return []; |
|
| 105 | - break; |
|
| 106 | - }//end switch |
|
| 66 | + /** |
|
| 67 | + * Returns the lines where warnings should occur. |
|
| 68 | + * |
|
| 69 | + * The key of the array should represent the line number and the value |
|
| 70 | + * should represent the number of warnings that should occur on that line. |
|
| 71 | + * |
|
| 72 | + * @param string $testFile The name of the file being tested. |
|
| 73 | + * |
|
| 74 | + * @return array<int, int> |
|
| 75 | + */ |
|
| 76 | + public function getWarningList($testFile='') |
|
| 77 | + { |
|
| 78 | + switch ($testFile) { |
|
| 79 | + case 'LineLengthUnitTest.1.inc': |
|
| 80 | + return [ |
|
| 81 | + 9 => 1, |
|
| 82 | + 15 => 1, |
|
| 83 | + 21 => 1, |
|
| 84 | + 24 => 1, |
|
| 85 | + 29 => 1, |
|
| 86 | + 37 => 1, |
|
| 87 | + 63 => 1, |
|
| 88 | + 73 => 1, |
|
| 89 | + 75 => 1, |
|
| 90 | + 84 => 1, |
|
| 91 | + ]; |
|
| 92 | + break; |
|
| 93 | + case 'LineLengthUnitTest.2.inc': |
|
| 94 | + case 'LineLengthUnitTest.3.inc': |
|
| 95 | + return [6 => 1]; |
|
| 96 | + break; |
|
| 97 | + case 'LineLengthUnitTest.4.inc': |
|
| 98 | + return [ |
|
| 99 | + 10 => 1, |
|
| 100 | + 14 => 1, |
|
| 101 | + ]; |
|
| 102 | + break; |
|
| 103 | + default: |
|
| 104 | + return []; |
|
| 105 | + break; |
|
| 106 | + }//end switch |
|
| 107 | 107 | |
| 108 | - }//end getWarningList() |
|
| 108 | + }//end getWarningList() |
|
| 109 | 109 | |
| 110 | 110 | |
| 111 | 111 | }//end class |
@@ -43,21 +43,21 @@ discard block |
||
| 43 | 43 | public function getErrorList($testFile='') |
| 44 | 44 | { |
| 45 | 45 | switch ($testFile) { |
| 46 | - case 'LineLengthUnitTest.1.inc': |
|
| 47 | - return [ |
|
| 48 | - 31 => 1, |
|
| 49 | - 34 => 1, |
|
| 50 | - 45 => 1, |
|
| 51 | - 82 => 1, |
|
| 52 | - ]; |
|
| 53 | - break; |
|
| 54 | - case 'LineLengthUnitTest.2.inc': |
|
| 55 | - case 'LineLengthUnitTest.3.inc': |
|
| 56 | - return [7 => 1]; |
|
| 57 | - break; |
|
| 58 | - default: |
|
| 59 | - return []; |
|
| 60 | - break; |
|
| 46 | + case 'LineLengthUnitTest.1.inc': |
|
| 47 | + return [ |
|
| 48 | + 31 => 1, |
|
| 49 | + 34 => 1, |
|
| 50 | + 45 => 1, |
|
| 51 | + 82 => 1, |
|
| 52 | + ]; |
|
| 53 | + break; |
|
| 54 | + case 'LineLengthUnitTest.2.inc': |
|
| 55 | + case 'LineLengthUnitTest.3.inc': |
|
| 56 | + return [7 => 1]; |
|
| 57 | + break; |
|
| 58 | + default: |
|
| 59 | + return []; |
|
| 60 | + break; |
|
| 61 | 61 | }//end switch |
| 62 | 62 | |
| 63 | 63 | }//end getErrorList() |
@@ -76,33 +76,33 @@ discard block |
||
| 76 | 76 | public function getWarningList($testFile='') |
| 77 | 77 | { |
| 78 | 78 | switch ($testFile) { |
| 79 | - case 'LineLengthUnitTest.1.inc': |
|
| 80 | - return [ |
|
| 81 | - 9 => 1, |
|
| 82 | - 15 => 1, |
|
| 83 | - 21 => 1, |
|
| 84 | - 24 => 1, |
|
| 85 | - 29 => 1, |
|
| 86 | - 37 => 1, |
|
| 87 | - 63 => 1, |
|
| 88 | - 73 => 1, |
|
| 89 | - 75 => 1, |
|
| 90 | - 84 => 1, |
|
| 91 | - ]; |
|
| 92 | - break; |
|
| 93 | - case 'LineLengthUnitTest.2.inc': |
|
| 94 | - case 'LineLengthUnitTest.3.inc': |
|
| 95 | - return [6 => 1]; |
|
| 96 | - break; |
|
| 97 | - case 'LineLengthUnitTest.4.inc': |
|
| 98 | - return [ |
|
| 99 | - 10 => 1, |
|
| 100 | - 14 => 1, |
|
| 101 | - ]; |
|
| 102 | - break; |
|
| 103 | - default: |
|
| 104 | - return []; |
|
| 105 | - break; |
|
| 79 | + case 'LineLengthUnitTest.1.inc': |
|
| 80 | + return [ |
|
| 81 | + 9 => 1, |
|
| 82 | + 15 => 1, |
|
| 83 | + 21 => 1, |
|
| 84 | + 24 => 1, |
|
| 85 | + 29 => 1, |
|
| 86 | + 37 => 1, |
|
| 87 | + 63 => 1, |
|
| 88 | + 73 => 1, |
|
| 89 | + 75 => 1, |
|
| 90 | + 84 => 1, |
|
| 91 | + ]; |
|
| 92 | + break; |
|
| 93 | + case 'LineLengthUnitTest.2.inc': |
|
| 94 | + case 'LineLengthUnitTest.3.inc': |
|
| 95 | + return [6 => 1]; |
|
| 96 | + break; |
|
| 97 | + case 'LineLengthUnitTest.4.inc': |
|
| 98 | + return [ |
|
| 99 | + 10 => 1, |
|
| 100 | + 14 => 1, |
|
| 101 | + ]; |
|
| 102 | + break; |
|
| 103 | + default: |
|
| 104 | + return []; |
|
| 105 | + break; |
|
| 106 | 106 | }//end switch |
| 107 | 107 | |
| 108 | 108 | }//end getWarningList() |
@@ -15,49 +15,49 @@ |
||
| 15 | 15 | { |
| 16 | 16 | |
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * Get a list of CLI values to set before the file is tested. |
|
| 20 | - * |
|
| 21 | - * @param string $testFile The name of the file being tested. |
|
| 22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
| 23 | - * |
|
| 24 | - * @return void |
|
| 25 | - */ |
|
| 26 | - public function setCliValues($testFile, $config) |
|
| 27 | - { |
|
| 28 | - $config->tabWidth = 4; |
|
| 29 | - |
|
| 30 | - }//end setCliValues() |
|
| 31 | - |
|
| 32 | - |
|
| 33 | - /** |
|
| 34 | - * Returns the lines where errors should occur. |
|
| 35 | - * |
|
| 36 | - * The key of the array should represent the line number and the value |
|
| 37 | - * should represent the number of errors that should occur on that line. |
|
| 38 | - * |
|
| 39 | - * @return array<int, int> |
|
| 40 | - */ |
|
| 41 | - public function getErrorList() |
|
| 42 | - { |
|
| 43 | - return [1 => 1]; |
|
| 44 | - |
|
| 45 | - }//end getErrorList() |
|
| 46 | - |
|
| 47 | - |
|
| 48 | - /** |
|
| 49 | - * Returns the lines where warnings should occur. |
|
| 50 | - * |
|
| 51 | - * The key of the array should represent the line number and the value |
|
| 52 | - * should represent the number of warnings that should occur on that line. |
|
| 53 | - * |
|
| 54 | - * @return array<int, int> |
|
| 55 | - */ |
|
| 56 | - public function getWarningList() |
|
| 57 | - { |
|
| 58 | - return []; |
|
| 59 | - |
|
| 60 | - }//end getWarningList() |
|
| 18 | + /** |
|
| 19 | + * Get a list of CLI values to set before the file is tested. |
|
| 20 | + * |
|
| 21 | + * @param string $testFile The name of the file being tested. |
|
| 22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
| 23 | + * |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 26 | + public function setCliValues($testFile, $config) |
|
| 27 | + { |
|
| 28 | + $config->tabWidth = 4; |
|
| 29 | + |
|
| 30 | + }//end setCliValues() |
|
| 31 | + |
|
| 32 | + |
|
| 33 | + /** |
|
| 34 | + * Returns the lines where errors should occur. |
|
| 35 | + * |
|
| 36 | + * The key of the array should represent the line number and the value |
|
| 37 | + * should represent the number of errors that should occur on that line. |
|
| 38 | + * |
|
| 39 | + * @return array<int, int> |
|
| 40 | + */ |
|
| 41 | + public function getErrorList() |
|
| 42 | + { |
|
| 43 | + return [1 => 1]; |
|
| 44 | + |
|
| 45 | + }//end getErrorList() |
|
| 46 | + |
|
| 47 | + |
|
| 48 | + /** |
|
| 49 | + * Returns the lines where warnings should occur. |
|
| 50 | + * |
|
| 51 | + * The key of the array should represent the line number and the value |
|
| 52 | + * should represent the number of warnings that should occur on that line. |
|
| 53 | + * |
|
| 54 | + * @return array<int, int> |
|
| 55 | + */ |
|
| 56 | + public function getWarningList() |
|
| 57 | + { |
|
| 58 | + return []; |
|
| 59 | + |
|
| 60 | + }//end getWarningList() |
|
| 61 | 61 | |
| 62 | 62 | |
| 63 | 63 | }//end class |