GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 3da54d...2645ec )
by Drakakis
05:09
created
vendor/squizlabs/php_codesniffer/src/Runner.php 1 patch
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -677,19 +677,19 @@
 block discarded – undo
677 677
                 $input = trim($input);
678 678
 
679 679
                 switch ($input) {
680
-                case 's':
681
-                    break(2);
682
-                case 'q':
683
-                    throw new DeepExitException('', 0);
684
-                default:
685
-                    // Repopulate the sniffs because some of them save their state
686
-                    // and only clear it when the file changes, but we are rechecking
687
-                    // the same file.
688
-                    $file->ruleset->populateTokenListeners();
689
-                    $file->reloadContent();
690
-                    $file->process();
691
-                    $this->reporter->cacheFileReport($file, $this->config);
692
-                    break;
680
+                    case 's':
681
+                        break(2);
682
+                    case 'q':
683
+                        throw new DeepExitException('', 0);
684
+                    default:
685
+                        // Repopulate the sniffs because some of them save their state
686
+                        // and only clear it when the file changes, but we are rechecking
687
+                        // the same file.
688
+                        $file->ruleset->populateTokenListeners();
689
+                        $file->reloadContent();
690
+                        $file->process();
691
+                        $this->reporter->cacheFileReport($file, $this->config);
692
+                        break;
693 693
                 }
694 694
             }//end while
695 695
         }//end if
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Util/Common.php 1 patch
Switch Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -404,19 +404,19 @@
 block discarded – undo
404 404
         } else {
405 405
             $lowerVarType = strtolower($varType);
406 406
             switch ($lowerVarType) {
407
-            case 'bool':
408
-            case 'boolean':
409
-                return 'boolean';
410
-            case 'double':
411
-            case 'real':
412
-            case 'float':
413
-                return 'float';
414
-            case 'int':
415
-            case 'integer':
416
-                return 'integer';
417
-            case 'array()':
418
-            case 'array':
419
-                return 'array';
407
+                case 'bool':
408
+                case 'boolean':
409
+                    return 'boolean';
410
+                case 'double':
411
+                case 'real':
412
+                case 'float':
413
+                    return 'float';
414
+                case 'int':
415
+                case 'integer':
416
+                    return 'integer';
417
+                case 'array()':
418
+                case 'array':
419
+                    return 'array';
420 420
             }//end switch
421 421
 
422 422
             if (strpos($lowerVarType, 'array(') !== false) {
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Tokenizers/PHP.php 1 patch
Switch Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -2429,24 +2429,24 @@  discard block
 block discarded – undo
2429 2429
 
2430 2430
         if ($token[0] === T_STRING) {
2431 2431
             switch ($cacheKey) {
2432
-            case 'false':
2433
-                $newToken['type'] = 'T_FALSE';
2434
-                break;
2435
-            case 'true':
2436
-                $newToken['type'] = 'T_TRUE';
2437
-                break;
2438
-            case 'null':
2439
-                $newToken['type'] = 'T_NULL';
2440
-                break;
2441
-            case 'self':
2442
-                $newToken['type'] = 'T_SELF';
2443
-                break;
2444
-            case 'parent':
2445
-                $newToken['type'] = 'T_PARENT';
2446
-                break;
2447
-            default:
2448
-                $newToken['type'] = 'T_STRING';
2449
-                break;
2432
+                case 'false':
2433
+                    $newToken['type'] = 'T_FALSE';
2434
+                    break;
2435
+                case 'true':
2436
+                    $newToken['type'] = 'T_TRUE';
2437
+                    break;
2438
+                case 'null':
2439
+                    $newToken['type'] = 'T_NULL';
2440
+                    break;
2441
+                case 'self':
2442
+                    $newToken['type'] = 'T_SELF';
2443
+                    break;
2444
+                case 'parent':
2445
+                    $newToken['type'] = 'T_PARENT';
2446
+                    break;
2447
+                default:
2448
+                    $newToken['type'] = 'T_STRING';
2449
+                    break;
2450 2450
             }
2451 2451
 
2452 2452
             $newToken['code'] = constant($newToken['type']);
@@ -2488,87 +2488,87 @@  discard block
 block discarded – undo
2488 2488
         $newToken = [];
2489 2489
 
2490 2490
         switch ($token) {
2491
-        case '{':
2492
-            $newToken['type'] = 'T_OPEN_CURLY_BRACKET';
2493
-            break;
2494
-        case '}':
2495
-            $newToken['type'] = 'T_CLOSE_CURLY_BRACKET';
2496
-            break;
2497
-        case '[':
2498
-            $newToken['type'] = 'T_OPEN_SQUARE_BRACKET';
2499
-            break;
2500
-        case ']':
2501
-            $newToken['type'] = 'T_CLOSE_SQUARE_BRACKET';
2502
-            break;
2503
-        case '(':
2504
-            $newToken['type'] = 'T_OPEN_PARENTHESIS';
2505
-            break;
2506
-        case ')':
2507
-            $newToken['type'] = 'T_CLOSE_PARENTHESIS';
2508
-            break;
2509
-        case ':':
2510
-            $newToken['type'] = 'T_COLON';
2511
-            break;
2512
-        case '.':
2513
-            $newToken['type'] = 'T_STRING_CONCAT';
2514
-            break;
2515
-        case ';':
2516
-            $newToken['type'] = 'T_SEMICOLON';
2517
-            break;
2518
-        case '=':
2519
-            $newToken['type'] = 'T_EQUAL';
2520
-            break;
2521
-        case '*':
2522
-            $newToken['type'] = 'T_MULTIPLY';
2523
-            break;
2524
-        case '/':
2525
-            $newToken['type'] = 'T_DIVIDE';
2526
-            break;
2527
-        case '+':
2528
-            $newToken['type'] = 'T_PLUS';
2529
-            break;
2530
-        case '-':
2531
-            $newToken['type'] = 'T_MINUS';
2532
-            break;
2533
-        case '%':
2534
-            $newToken['type'] = 'T_MODULUS';
2535
-            break;
2536
-        case '^':
2537
-            $newToken['type'] = 'T_BITWISE_XOR';
2538
-            break;
2539
-        case '&':
2540
-            $newToken['type'] = 'T_BITWISE_AND';
2541
-            break;
2542
-        case '|':
2543
-            $newToken['type'] = 'T_BITWISE_OR';
2544
-            break;
2545
-        case '~':
2546
-            $newToken['type'] = 'T_BITWISE_NOT';
2547
-            break;
2548
-        case '<':
2549
-            $newToken['type'] = 'T_LESS_THAN';
2550
-            break;
2551
-        case '>':
2552
-            $newToken['type'] = 'T_GREATER_THAN';
2553
-            break;
2554
-        case '!':
2555
-            $newToken['type'] = 'T_BOOLEAN_NOT';
2556
-            break;
2557
-        case ',':
2558
-            $newToken['type'] = 'T_COMMA';
2559
-            break;
2560
-        case '@':
2561
-            $newToken['type'] = 'T_ASPERAND';
2562
-            break;
2563
-        case '$':
2564
-            $newToken['type'] = 'T_DOLLAR';
2565
-            break;
2566
-        case '`':
2567
-            $newToken['type'] = 'T_BACKTICK';
2568
-            break;
2569
-        default:
2570
-            $newToken['type'] = 'T_NONE';
2571
-            break;
2491
+            case '{':
2492
+                $newToken['type'] = 'T_OPEN_CURLY_BRACKET';
2493
+                break;
2494
+            case '}':
2495
+                $newToken['type'] = 'T_CLOSE_CURLY_BRACKET';
2496
+                break;
2497
+            case '[':
2498
+                $newToken['type'] = 'T_OPEN_SQUARE_BRACKET';
2499
+                break;
2500
+            case ']':
2501
+                $newToken['type'] = 'T_CLOSE_SQUARE_BRACKET';
2502
+                break;
2503
+            case '(':
2504
+                $newToken['type'] = 'T_OPEN_PARENTHESIS';
2505
+                break;
2506
+            case ')':
2507
+                $newToken['type'] = 'T_CLOSE_PARENTHESIS';
2508
+                break;
2509
+            case ':':
2510
+                $newToken['type'] = 'T_COLON';
2511
+                break;
2512
+            case '.':
2513
+                $newToken['type'] = 'T_STRING_CONCAT';
2514
+                break;
2515
+            case ';':
2516
+                $newToken['type'] = 'T_SEMICOLON';
2517
+                break;
2518
+            case '=':
2519
+                $newToken['type'] = 'T_EQUAL';
2520
+                break;
2521
+            case '*':
2522
+                $newToken['type'] = 'T_MULTIPLY';
2523
+                break;
2524
+            case '/':
2525
+                $newToken['type'] = 'T_DIVIDE';
2526
+                break;
2527
+            case '+':
2528
+                $newToken['type'] = 'T_PLUS';
2529
+                break;
2530
+            case '-':
2531
+                $newToken['type'] = 'T_MINUS';
2532
+                break;
2533
+            case '%':
2534
+                $newToken['type'] = 'T_MODULUS';
2535
+                break;
2536
+            case '^':
2537
+                $newToken['type'] = 'T_BITWISE_XOR';
2538
+                break;
2539
+            case '&':
2540
+                $newToken['type'] = 'T_BITWISE_AND';
2541
+                break;
2542
+            case '|':
2543
+                $newToken['type'] = 'T_BITWISE_OR';
2544
+                break;
2545
+            case '~':
2546
+                $newToken['type'] = 'T_BITWISE_NOT';
2547
+                break;
2548
+            case '<':
2549
+                $newToken['type'] = 'T_LESS_THAN';
2550
+                break;
2551
+            case '>':
2552
+                $newToken['type'] = 'T_GREATER_THAN';
2553
+                break;
2554
+            case '!':
2555
+                $newToken['type'] = 'T_BOOLEAN_NOT';
2556
+                break;
2557
+            case ',':
2558
+                $newToken['type'] = 'T_COMMA';
2559
+                break;
2560
+            case '@':
2561
+                $newToken['type'] = 'T_ASPERAND';
2562
+                break;
2563
+            case '$':
2564
+                $newToken['type'] = 'T_DOLLAR';
2565
+                break;
2566
+            case '`':
2567
+                $newToken['type'] = 'T_BACKTICK';
2568
+                break;
2569
+            default:
2570
+                $newToken['type'] = 'T_NONE';
2571
+                break;
2572 2572
         }//end switch
2573 2573
 
2574 2574
         $newToken['code']    = constant($newToken['type']);
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Tokenizers/CSS.php 1 patch
Switch Indentation   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -289,12 +289,32 @@  discard block
 block discarded – undo
289 289
             }
290 290
 
291 291
             switch ($token['code']) {
292
-            case T_OPEN_CURLY_BRACKET:
293
-                // Opening curly brackets for an At-rule do not start a style
294
-                // definition. We also reset the asperand flag here because the next
295
-                // opening curly bracket could be indeed the start of a style
296
-                // definition.
297
-                if ($asperandStart === true) {
292
+                case T_OPEN_CURLY_BRACKET:
293
+                    // Opening curly brackets for an At-rule do not start a style
294
+                    // definition. We also reset the asperand flag here because the next
295
+                    // opening curly bracket could be indeed the start of a style
296
+                    // definition.
297
+                    if ($asperandStart === true) {
298
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
299
+                            if ($inStyleDef === true) {
300
+                                echo "\t\t* style definition closed *".PHP_EOL;
301
+                            }
302
+
303
+                            if ($asperandStart === true) {
304
+                                echo "\t\t* at-rule definition closed *".PHP_EOL;
305
+                            }
306
+                        }
307
+
308
+                        $inStyleDef    = false;
309
+                        $asperandStart = false;
310
+                    } else {
311
+                        $inStyleDef = true;
312
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
313
+                            echo "\t\t* style definition opened *".PHP_EOL;
314
+                        }
315
+                    }
316
+                    break;
317
+                case T_CLOSE_CURLY_BRACKET:
298 318
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
299 319
                         if ($inStyleDef === true) {
300 320
                             echo "\t\t* style definition closed *".PHP_EOL;
@@ -307,184 +327,164 @@  discard block
 block discarded – undo
307 327
 
308 328
                     $inStyleDef    = false;
309 329
                     $asperandStart = false;
310
-                } else {
311
-                    $inStyleDef = true;
312
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
313
-                        echo "\t\t* style definition opened *".PHP_EOL;
314
-                    }
315
-                }
316
-                break;
317
-            case T_CLOSE_CURLY_BRACKET:
318
-                if (PHP_CODESNIFFER_VERBOSITY > 1) {
319
-                    if ($inStyleDef === true) {
320
-                        echo "\t\t* style definition closed *".PHP_EOL;
321
-                    }
322
-
323
-                    if ($asperandStart === true) {
324
-                        echo "\t\t* at-rule definition closed *".PHP_EOL;
325
-                    }
326
-                }
327
-
328
-                $inStyleDef    = false;
329
-                $asperandStart = false;
330
-                break;
331
-            case T_MINUS:
332
-                // Minus signs are often used instead of spaces inside
333
-                // class names, IDs and styles.
334
-                if ($finalTokens[($stackPtr + 1)]['code'] === T_STRING) {
335
-                    if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) {
336
-                        $newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content'];
337
-
330
+                    break;
331
+                case T_MINUS:
332
+                    // Minus signs are often used instead of spaces inside
333
+                    // class names, IDs and styles.
334
+                    if ($finalTokens[($stackPtr + 1)]['code'] === T_STRING) {
335
+                        if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) {
336
+                            $newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content'];
337
+
338
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
339
+                                echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL;
340
+                                $old = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
341
+                                $new = Util\Common::prepareForOutput($newContent);
342
+                                echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
343
+                            }
344
+
345
+                            $finalTokens[($stackPtr + 1)]['content'] = $newContent;
346
+                            unset($finalTokens[$stackPtr]);
347
+                            unset($finalTokens[($stackPtr - 1)]);
348
+                        } else {
349
+                            $newContent = '-'.$finalTokens[($stackPtr + 1)]['content'];
350
+
351
+                            $finalTokens[($stackPtr + 1)]['content'] = $newContent;
352
+                            unset($finalTokens[$stackPtr]);
353
+                        }
354
+                    } else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) {
355
+                        // They can also be used to provide negative numbers.
338 356
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
339
-                            echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL;
340
-                            $old = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
341
-                            $new = Util\Common::prepareForOutput($newContent);
342
-                            echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
357
+                            echo "\t\t* token is part of a negative number; adding content to next token and ignoring *".PHP_EOL;
358
+                            $content = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
359
+                            echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL;
343 360
                         }
344 361
 
345
-                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
362
+                        $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content'];
346 363
                         unset($finalTokens[$stackPtr]);
347
-                        unset($finalTokens[($stackPtr - 1)]);
348
-                    } else {
349
-                        $newContent = '-'.$finalTokens[($stackPtr + 1)]['content'];
350
-
351
-                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
352
-                        unset($finalTokens[$stackPtr]);
353
-                    }
354
-                } else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) {
355
-                    // They can also be used to provide negative numbers.
356
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
357
-                        echo "\t\t* token is part of a negative number; adding content to next token and ignoring *".PHP_EOL;
358
-                        $content = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
359
-                        echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL;
360
-                    }
361
-
362
-                    $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content'];
363
-                    unset($finalTokens[$stackPtr]);
364
-                }//end if
365
-                break;
366
-            case T_COLON:
367
-                // Only interested in colons that are defining styles.
368
-                if ($inStyleDef === false) {
364
+                    }//end if
369 365
                     break;
370
-                }
371
-
372
-                for ($x = ($stackPtr - 1); $x >= 0; $x--) {
373
-                    if (isset(Util\Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
366
+                case T_COLON:
367
+                    // Only interested in colons that are defining styles.
368
+                    if ($inStyleDef === false) {
374 369
                         break;
375 370
                     }
376
-                }
377 371
 
378
-                if (PHP_CODESNIFFER_VERBOSITY > 1) {
379
-                    $type = $finalTokens[$x]['type'];
380
-                    echo "\t\t=> token $x changed from $type to T_STYLE".PHP_EOL;
381
-                }
382
-
383
-                $finalTokens[$x]['type'] = 'T_STYLE';
384
-                $finalTokens[$x]['code'] = T_STYLE;
385
-                break;
386
-            case T_STRING:
387
-                if (strtolower($token['content']) === 'url') {
388
-                    // Find the next content.
389
-                    for ($x = ($stackPtr + 1); $x < $numTokens; $x++) {
372
+                    for ($x = ($stackPtr - 1); $x >= 0; $x--) {
390 373
                         if (isset(Util\Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
391 374
                             break;
392 375
                         }
393 376
                     }
394 377
 
395
-                    // Needs to be in the format "url(" for it to be a URL.
396
-                    if ($finalTokens[$x]['code'] !== T_OPEN_PARENTHESIS) {
397
-                        continue 2;
378
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
379
+                        $type = $finalTokens[$x]['type'];
380
+                        echo "\t\t=> token $x changed from $type to T_STYLE".PHP_EOL;
398 381
                     }
399 382
 
400
-                    // Make sure the content isn't empty.
401
-                    for ($y = ($x + 1); $y < $numTokens; $y++) {
402
-                        if (isset(Util\Tokens::$emptyTokens[$finalTokens[$y]['code']]) === false) {
403
-                            break;
383
+                    $finalTokens[$x]['type'] = 'T_STYLE';
384
+                    $finalTokens[$x]['code'] = T_STYLE;
385
+                    break;
386
+                case T_STRING:
387
+                    if (strtolower($token['content']) === 'url') {
388
+                        // Find the next content.
389
+                        for ($x = ($stackPtr + 1); $x < $numTokens; $x++) {
390
+                            if (isset(Util\Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
391
+                                break;
392
+                            }
404 393
                         }
405
-                    }
406 394
 
407
-                    if ($finalTokens[$y]['code'] === T_CLOSE_PARENTHESIS) {
408
-                        continue 2;
409
-                    }
410
-
411
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
412
-                        for ($i = ($stackPtr + 1); $i <= $y; $i++) {
413
-                            $type    = $finalTokens[$i]['type'];
414
-                            $content = Util\Common::prepareForOutput($finalTokens[$i]['content']);
415
-                            echo "\tProcess token $i: $type => $content".PHP_EOL;
395
+                        // Needs to be in the format "url(" for it to be a URL.
396
+                        if ($finalTokens[$x]['code'] !== T_OPEN_PARENTHESIS) {
397
+                            continue 2;
416 398
                         }
417 399
 
418
-                        echo "\t\t* token starts a URL *".PHP_EOL;
419
-                    }
400
+                        // Make sure the content isn't empty.
401
+                        for ($y = ($x + 1); $y < $numTokens; $y++) {
402
+                            if (isset(Util\Tokens::$emptyTokens[$finalTokens[$y]['code']]) === false) {
403
+                                break;
404
+                            }
405
+                        }
420 406
 
421
-                    // Join all the content together inside the url() statement.
422
-                    $newContent = '';
423
-                    for ($i = ($x + 2); $i < $numTokens; $i++) {
424
-                        if ($finalTokens[$i]['code'] === T_CLOSE_PARENTHESIS) {
425
-                            break;
407
+                        if ($finalTokens[$y]['code'] === T_CLOSE_PARENTHESIS) {
408
+                            continue 2;
426 409
                         }
427 410
 
428
-                        $newContent .= $finalTokens[$i]['content'];
429 411
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
430
-                            $content = Util\Common::prepareForOutput($finalTokens[$i]['content']);
431
-                            echo "\t\t=> token $i added to URL string and ignored: $content".PHP_EOL;
412
+                            for ($i = ($stackPtr + 1); $i <= $y; $i++) {
413
+                                $type    = $finalTokens[$i]['type'];
414
+                                $content = Util\Common::prepareForOutput($finalTokens[$i]['content']);
415
+                                echo "\tProcess token $i: $type => $content".PHP_EOL;
416
+                            }
417
+
418
+                            echo "\t\t* token starts a URL *".PHP_EOL;
432 419
                         }
433 420
 
434
-                        unset($finalTokens[$i]);
435
-                    }
421
+                        // Join all the content together inside the url() statement.
422
+                        $newContent = '';
423
+                        for ($i = ($x + 2); $i < $numTokens; $i++) {
424
+                            if ($finalTokens[$i]['code'] === T_CLOSE_PARENTHESIS) {
425
+                                break;
426
+                            }
436 427
 
437
-                    $stackPtr = $i;
428
+                            $newContent .= $finalTokens[$i]['content'];
429
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
430
+                                $content = Util\Common::prepareForOutput($finalTokens[$i]['content']);
431
+                                echo "\t\t=> token $i added to URL string and ignored: $content".PHP_EOL;
432
+                            }
438 433
 
439
-                    // If the content inside the "url()" is in double quotes
440
-                    // there will only be one token and so we don't have to do
441
-                    // anything except change its type. If it is not empty,
442
-                    // we need to do some token merging.
443
-                    $finalTokens[($x + 1)]['type'] = 'T_URL';
444
-                    $finalTokens[($x + 1)]['code'] = T_URL;
434
+                            unset($finalTokens[$i]);
435
+                        }
445 436
 
446
-                    if ($newContent !== '') {
447
-                        $finalTokens[($x + 1)]['content'] .= $newContent;
448
-                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
449
-                            $content = Util\Common::prepareForOutput($finalTokens[($x + 1)]['content']);
450
-                            echo "\t\t=> token content changed to: $content".PHP_EOL;
437
+                        $stackPtr = $i;
438
+
439
+                        // If the content inside the "url()" is in double quotes
440
+                        // there will only be one token and so we don't have to do
441
+                        // anything except change its type. If it is not empty,
442
+                        // we need to do some token merging.
443
+                        $finalTokens[($x + 1)]['type'] = 'T_URL';
444
+                        $finalTokens[($x + 1)]['code'] = T_URL;
445
+
446
+                        if ($newContent !== '') {
447
+                            $finalTokens[($x + 1)]['content'] .= $newContent;
448
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
449
+                                $content = Util\Common::prepareForOutput($finalTokens[($x + 1)]['content']);
450
+                                echo "\t\t=> token content changed to: $content".PHP_EOL;
451
+                            }
451 452
                         }
452
-                    }
453
-                } else if ($finalTokens[$stackPtr]['content'][0] === '-'
454
-                    && $finalTokens[($stackPtr + 1)]['code'] === T_STRING
455
-                ) {
456
-                    if (isset($finalTokens[($stackPtr - 1)]) === true
457
-                        && $finalTokens[($stackPtr - 1)]['code'] === T_STRING
453
+                    } else if ($finalTokens[$stackPtr]['content'][0] === '-'
454
+                        && $finalTokens[($stackPtr + 1)]['code'] === T_STRING
458 455
                     ) {
459
-                        $newContent = $finalTokens[($stackPtr - 1)]['content'].$finalTokens[$stackPtr]['content'].$finalTokens[($stackPtr + 1)]['content'];
460
-
461
-                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
462
-                            echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL;
463
-                            $old = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
464
-                            $new = Util\Common::prepareForOutput($newContent);
465
-                            echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
456
+                        if (isset($finalTokens[($stackPtr - 1)]) === true
457
+                            && $finalTokens[($stackPtr - 1)]['code'] === T_STRING
458
+                        ) {
459
+                            $newContent = $finalTokens[($stackPtr - 1)]['content'].$finalTokens[$stackPtr]['content'].$finalTokens[($stackPtr + 1)]['content'];
460
+
461
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
462
+                                echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL;
463
+                                $old = Util\Common::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
464
+                                $new = Util\Common::prepareForOutput($newContent);
465
+                                echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
466
+                            }
467
+
468
+                            $finalTokens[($stackPtr + 1)]['content'] = $newContent;
469
+                            unset($finalTokens[$stackPtr]);
470
+                            unset($finalTokens[($stackPtr - 1)]);
471
+                        } else {
472
+                            $newContent = $finalTokens[$stackPtr]['content'].$finalTokens[($stackPtr + 1)]['content'];
473
+
474
+                            $finalTokens[($stackPtr + 1)]['content'] = $newContent;
475
+                            unset($finalTokens[$stackPtr]);
466 476
                         }
467
-
468
-                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
469
-                        unset($finalTokens[$stackPtr]);
470
-                        unset($finalTokens[($stackPtr - 1)]);
471
-                    } else {
472
-                        $newContent = $finalTokens[$stackPtr]['content'].$finalTokens[($stackPtr + 1)]['content'];
473
-
474
-                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
475
-                        unset($finalTokens[$stackPtr]);
477
+                    }//end if
478
+                    break;
479
+                case T_ASPERAND:
480
+                    $asperandStart = true;
481
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
482
+                        echo "\t\t* at-rule definition opened *".PHP_EOL;
476 483
                     }
477
-                }//end if
478
-                break;
479
-            case T_ASPERAND:
480
-                $asperandStart = true;
481
-                if (PHP_CODESNIFFER_VERBOSITY > 1) {
482
-                    echo "\t\t* at-rule definition opened *".PHP_EOL;
483
-                }
484
-                break;
485
-            default:
486
-                // Nothing special to be done with this token.
487
-                break;
484
+                    break;
485
+                default:
486
+                    // Nothing special to be done with this token.
487
+                    break;
488 488
             }//end switch
489 489
         }//end for
490 490
 
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php 1 patch
Switch Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -747,60 +747,60 @@
 block discarded – undo
747 747
             */
748 748
 
749 749
             switch ($this->tokens[$i]['code']) {
750
-            case T_OPEN_SQUARE_BRACKET:
751
-                $squareOpeners[] = $i;
752
-
753
-                if (PHP_CODESNIFFER_VERBOSITY > 1) {
754
-                    echo str_repeat("\t", count($squareOpeners));
755
-                    echo str_repeat("\t", count($curlyOpeners));
756
-                    echo "=> Found square bracket opener at $i".PHP_EOL;
757
-                }
758
-                break;
759
-            case T_OPEN_CURLY_BRACKET:
760
-                if (isset($this->tokens[$i]['scope_closer']) === false) {
761
-                    $curlyOpeners[] = $i;
750
+                case T_OPEN_SQUARE_BRACKET:
751
+                    $squareOpeners[] = $i;
762 752
 
763 753
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
764 754
                         echo str_repeat("\t", count($squareOpeners));
765 755
                         echo str_repeat("\t", count($curlyOpeners));
766
-                        echo "=> Found curly bracket opener at $i".PHP_EOL;
756
+                        echo "=> Found square bracket opener at $i".PHP_EOL;
767 757
                     }
768
-                }
769
-                break;
770
-            case T_CLOSE_SQUARE_BRACKET:
771
-                if (empty($squareOpeners) === false) {
772
-                    $opener = array_pop($squareOpeners);
773
-                    $this->tokens[$i]['bracket_opener']      = $opener;
774
-                    $this->tokens[$i]['bracket_closer']      = $i;
775
-                    $this->tokens[$opener]['bracket_opener'] = $opener;
776
-                    $this->tokens[$opener]['bracket_closer'] = $i;
758
+                    break;
759
+                case T_OPEN_CURLY_BRACKET:
760
+                    if (isset($this->tokens[$i]['scope_closer']) === false) {
761
+                        $curlyOpeners[] = $i;
777 762
 
778
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
779
-                        echo str_repeat("\t", count($squareOpeners));
780
-                        echo str_repeat("\t", count($curlyOpeners));
781
-                        echo "\t=> Found square bracket closer at $i for $opener".PHP_EOL;
763
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
764
+                            echo str_repeat("\t", count($squareOpeners));
765
+                            echo str_repeat("\t", count($curlyOpeners));
766
+                            echo "=> Found curly bracket opener at $i".PHP_EOL;
767
+                        }
782 768
                     }
783
-                }
784
-                break;
785
-            case T_CLOSE_CURLY_BRACKET:
786
-                if (empty($curlyOpeners) === false
787
-                    && isset($this->tokens[$i]['scope_opener']) === false
788
-                ) {
789
-                    $opener = array_pop($curlyOpeners);
790
-                    $this->tokens[$i]['bracket_opener']      = $opener;
791
-                    $this->tokens[$i]['bracket_closer']      = $i;
792
-                    $this->tokens[$opener]['bracket_opener'] = $opener;
793
-                    $this->tokens[$opener]['bracket_closer'] = $i;
769
+                    break;
770
+                case T_CLOSE_SQUARE_BRACKET:
771
+                    if (empty($squareOpeners) === false) {
772
+                        $opener = array_pop($squareOpeners);
773
+                        $this->tokens[$i]['bracket_opener']      = $opener;
774
+                        $this->tokens[$i]['bracket_closer']      = $i;
775
+                        $this->tokens[$opener]['bracket_opener'] = $opener;
776
+                        $this->tokens[$opener]['bracket_closer'] = $i;
794 777
 
795
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
796
-                        echo str_repeat("\t", count($squareOpeners));
797
-                        echo str_repeat("\t", count($curlyOpeners));
798
-                        echo "\t=> Found curly bracket closer at $i for $opener".PHP_EOL;
778
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
779
+                            echo str_repeat("\t", count($squareOpeners));
780
+                            echo str_repeat("\t", count($curlyOpeners));
781
+                            echo "\t=> Found square bracket closer at $i for $opener".PHP_EOL;
782
+                        }
799 783
                     }
800
-                }
801
-                break;
802
-            default:
803
-                continue 2;
784
+                    break;
785
+                case T_CLOSE_CURLY_BRACKET:
786
+                    if (empty($curlyOpeners) === false
787
+                        && isset($this->tokens[$i]['scope_opener']) === false
788
+                    ) {
789
+                        $opener = array_pop($curlyOpeners);
790
+                        $this->tokens[$i]['bracket_opener']      = $opener;
791
+                        $this->tokens[$i]['bracket_closer']      = $i;
792
+                        $this->tokens[$opener]['bracket_opener'] = $opener;
793
+                        $this->tokens[$opener]['bracket_closer'] = $i;
794
+
795
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
796
+                            echo str_repeat("\t", count($squareOpeners));
797
+                            echo str_repeat("\t", count($curlyOpeners));
798
+                            echo "\t=> Found curly bracket closer at $i for $opener".PHP_EOL;
799
+                        }
800
+                    }
801
+                    break;
802
+                default:
803
+                    continue 2;
804 804
             }//end switch
805 805
         }//end for
806 806
 
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Config.php 1 patch
Switch Indentation   +536 added lines, -536 removed lines patch added patch discarded remove patch
@@ -220,38 +220,38 @@  discard block
 block discarded – undo
220 220
         }
221 221
 
222 222
         switch ($name) {
223
-        case 'reportWidth' :
224
-            // Support auto terminal width.
225
-            if ($value === 'auto'
226
-                && function_exists('shell_exec') === true
227
-                && preg_match('|\d+ (\d+)|', shell_exec('stty size 2>&1'), $matches) === 1
228
-            ) {
229
-                $value = (int) $matches[1];
230
-            } else {
231
-                $value = (int) $value;
232
-            }
233
-            break;
234
-        case 'standards' :
235
-            $cleaned = [];
236
-
237
-            // Check if the standard name is valid, or if the case is invalid.
238
-            $installedStandards = Util\Standards::getInstalledStandards();
239
-            foreach ($value as $standard) {
240
-                foreach ($installedStandards as $validStandard) {
241
-                    if (strtolower($standard) === strtolower($validStandard)) {
242
-                        $standard = $validStandard;
243
-                        break;
244
-                    }
223
+            case 'reportWidth' :
224
+                // Support auto terminal width.
225
+                if ($value === 'auto'
226
+                    && function_exists('shell_exec') === true
227
+                    && preg_match('|\d+ (\d+)|', shell_exec('stty size 2>&1'), $matches) === 1
228
+                ) {
229
+                    $value = (int) $matches[1];
230
+                } else {
231
+                    $value = (int) $value;
245 232
                 }
233
+                break;
234
+            case 'standards' :
235
+                $cleaned = [];
236
+
237
+                // Check if the standard name is valid, or if the case is invalid.
238
+                $installedStandards = Util\Standards::getInstalledStandards();
239
+                foreach ($value as $standard) {
240
+                    foreach ($installedStandards as $validStandard) {
241
+                        if (strtolower($standard) === strtolower($validStandard)) {
242
+                            $standard = $validStandard;
243
+                            break;
244
+                        }
245
+                    }
246 246
 
247
-                $cleaned[] = $standard;
248
-            }
247
+                    $cleaned[] = $standard;
248
+                }
249 249
 
250
-            $value = $cleaned;
251
-            break;
252
-        default :
253
-            // No validation required.
254
-            break;
250
+                $value = $cleaned;
251
+                break;
252
+            default :
253
+                // No validation required.
254
+                break;
255 255
         }//end switch
256 256
 
257 257
         $this->settings[$name] = $value;
@@ -595,94 +595,94 @@  discard block
 block discarded – undo
595 595
     public function processShortArgument($arg, $pos)
596 596
     {
597 597
         switch ($arg) {
598
-        case 'h':
599
-        case '?':
600
-            ob_start();
601
-            $this->printUsage();
602
-            $output = ob_get_contents();
603
-            ob_end_clean();
604
-            throw new DeepExitException($output, 0);
605
-        case 'i' :
606
-            ob_start();
607
-            Util\Standards::printInstalledStandards();
608
-            $output = ob_get_contents();
609
-            ob_end_clean();
610
-            throw new DeepExitException($output, 0);
611
-        case 'v' :
612
-            if ($this->quiet === true) {
613
-                // Ignore when quiet mode is enabled.
598
+            case 'h':
599
+            case '?':
600
+                ob_start();
601
+                $this->printUsage();
602
+                $output = ob_get_contents();
603
+                ob_end_clean();
604
+                throw new DeepExitException($output, 0);
605
+            case 'i' :
606
+                ob_start();
607
+                Util\Standards::printInstalledStandards();
608
+                $output = ob_get_contents();
609
+                ob_end_clean();
610
+                throw new DeepExitException($output, 0);
611
+            case 'v' :
612
+                if ($this->quiet === true) {
613
+                    // Ignore when quiet mode is enabled.
614
+                    break;
615
+                }
616
+
617
+                $this->verbosity++;
618
+                self::$overriddenDefaults['verbosity'] = true;
614 619
                 break;
615
-            }
620
+            case 'l' :
621
+                $this->local = true;
622
+                self::$overriddenDefaults['local'] = true;
623
+                break;
624
+            case 's' :
625
+                $this->showSources = true;
626
+                self::$overriddenDefaults['showSources'] = true;
627
+                break;
628
+            case 'a' :
629
+                $this->interactive = true;
630
+                self::$overriddenDefaults['interactive'] = true;
631
+                break;
632
+            case 'e':
633
+                $this->explain = true;
634
+                self::$overriddenDefaults['explain'] = true;
635
+                break;
636
+            case 'p' :
637
+                if ($this->quiet === true) {
638
+                    // Ignore when quiet mode is enabled.
639
+                    break;
640
+                }
616 641
 
617
-            $this->verbosity++;
618
-            self::$overriddenDefaults['verbosity'] = true;
619
-            break;
620
-        case 'l' :
621
-            $this->local = true;
622
-            self::$overriddenDefaults['local'] = true;
623
-            break;
624
-        case 's' :
625
-            $this->showSources = true;
626
-            self::$overriddenDefaults['showSources'] = true;
627
-            break;
628
-        case 'a' :
629
-            $this->interactive = true;
630
-            self::$overriddenDefaults['interactive'] = true;
631
-            break;
632
-        case 'e':
633
-            $this->explain = true;
634
-            self::$overriddenDefaults['explain'] = true;
635
-            break;
636
-        case 'p' :
637
-            if ($this->quiet === true) {
638
-                // Ignore when quiet mode is enabled.
642
+                $this->showProgress = true;
643
+                self::$overriddenDefaults['showProgress'] = true;
639 644
                 break;
640
-            }
645
+            case 'q' :
646
+                // Quiet mode disables a few other settings as well.
647
+                $this->quiet        = true;
648
+                $this->showProgress = false;
649
+                $this->verbosity    = 0;
641 650
 
642
-            $this->showProgress = true;
643
-            self::$overriddenDefaults['showProgress'] = true;
644
-            break;
645
-        case 'q' :
646
-            // Quiet mode disables a few other settings as well.
647
-            $this->quiet        = true;
648
-            $this->showProgress = false;
649
-            $this->verbosity    = 0;
650
-
651
-            self::$overriddenDefaults['quiet'] = true;
652
-            break;
653
-        case 'm' :
654
-            $this->recordErrors = false;
655
-            self::$overriddenDefaults['recordErrors'] = true;
656
-            break;
657
-        case 'd' :
658
-            $ini = explode('=', $this->cliArgs[($pos + 1)]);
659
-            $this->cliArgs[($pos + 1)] = '';
660
-            if (isset($ini[1]) === true) {
661
-                ini_set($ini[0], $ini[1]);
662
-            } else {
663
-                ini_set($ini[0], true);
664
-            }
665
-            break;
666
-        case 'n' :
667
-            if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
668
-                $this->warningSeverity = 0;
669
-                self::$overriddenDefaults['warningSeverity'] = true;
670
-            }
671
-            break;
672
-        case 'w' :
673
-            if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
674
-                $this->warningSeverity = $this->errorSeverity;
675
-                self::$overriddenDefaults['warningSeverity'] = true;
676
-            }
677
-            break;
678
-        default:
679
-            if ($this->dieOnUnknownArg === false) {
680
-                $unknown       = $this->unknown;
681
-                $unknown[]     = $arg;
682
-                $this->unknown = $unknown;
683
-            } else {
684
-                $this->processUnknownArgument('-'.$arg, $pos);
685
-            }
651
+                self::$overriddenDefaults['quiet'] = true;
652
+                break;
653
+            case 'm' :
654
+                $this->recordErrors = false;
655
+                self::$overriddenDefaults['recordErrors'] = true;
656
+                break;
657
+            case 'd' :
658
+                $ini = explode('=', $this->cliArgs[($pos + 1)]);
659
+                $this->cliArgs[($pos + 1)] = '';
660
+                if (isset($ini[1]) === true) {
661
+                    ini_set($ini[0], $ini[1]);
662
+                } else {
663
+                    ini_set($ini[0], true);
664
+                }
665
+                break;
666
+            case 'n' :
667
+                if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
668
+                    $this->warningSeverity = 0;
669
+                    self::$overriddenDefaults['warningSeverity'] = true;
670
+                }
671
+                break;
672
+            case 'w' :
673
+                if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
674
+                    $this->warningSeverity = $this->errorSeverity;
675
+                    self::$overriddenDefaults['warningSeverity'] = true;
676
+                }
677
+                break;
678
+            default:
679
+                if ($this->dieOnUnknownArg === false) {
680
+                    $unknown       = $this->unknown;
681
+                    $unknown[]     = $arg;
682
+                    $this->unknown = $unknown;
683
+                } else {
684
+                    $this->processUnknownArgument('-'.$arg, $pos);
685
+                }
686 686
         }//end switch
687 687
 
688 688
     }//end processShortArgument()
@@ -700,525 +700,525 @@  discard block
 block discarded – undo
700 700
     public function processLongArgument($arg, $pos)
701 701
     {
702 702
         switch ($arg) {
703
-        case 'help':
704
-            ob_start();
705
-            $this->printUsage();
706
-            $output = ob_get_contents();
707
-            ob_end_clean();
708
-            throw new DeepExitException($output, 0);
709
-        case 'version':
710
-            $output  = 'PHP_CodeSniffer version '.self::VERSION.' ('.self::STABILITY.') ';
711
-            $output .= 'by Squiz (http://www.squiz.net)'.PHP_EOL;
712
-            throw new DeepExitException($output, 0);
713
-        case 'colors':
714
-            if (isset(self::$overriddenDefaults['colors']) === true) {
703
+            case 'help':
704
+                ob_start();
705
+                $this->printUsage();
706
+                $output = ob_get_contents();
707
+                ob_end_clean();
708
+                throw new DeepExitException($output, 0);
709
+            case 'version':
710
+                $output  = 'PHP_CodeSniffer version '.self::VERSION.' ('.self::STABILITY.') ';
711
+                $output .= 'by Squiz (http://www.squiz.net)'.PHP_EOL;
712
+                throw new DeepExitException($output, 0);
713
+            case 'colors':
714
+                if (isset(self::$overriddenDefaults['colors']) === true) {
715
+                    break;
716
+                }
717
+
718
+                $this->colors = true;
719
+                self::$overriddenDefaults['colors'] = true;
715 720
                 break;
716
-            }
721
+            case 'no-colors':
722
+                if (isset(self::$overriddenDefaults['colors']) === true) {
723
+                    break;
724
+                }
717 725
 
718
-            $this->colors = true;
719
-            self::$overriddenDefaults['colors'] = true;
720
-            break;
721
-        case 'no-colors':
722
-            if (isset(self::$overriddenDefaults['colors']) === true) {
726
+                $this->colors = false;
727
+                self::$overriddenDefaults['colors'] = true;
723 728
                 break;
724
-            }
729
+            case 'cache':
730
+                if (isset(self::$overriddenDefaults['cache']) === true) {
731
+                    break;
732
+                }
725 733
 
726
-            $this->colors = false;
727
-            self::$overriddenDefaults['colors'] = true;
728
-            break;
729
-        case 'cache':
730
-            if (isset(self::$overriddenDefaults['cache']) === true) {
734
+                if (defined('PHP_CODESNIFFER_IN_TESTS') === false) {
735
+                    $this->cache = true;
736
+                    self::$overriddenDefaults['cache'] = true;
737
+                }
731 738
                 break;
732
-            }
739
+            case 'no-cache':
740
+                if (isset(self::$overriddenDefaults['cache']) === true) {
741
+                    break;
742
+                }
733 743
 
734
-            if (defined('PHP_CODESNIFFER_IN_TESTS') === false) {
735
-                $this->cache = true;
744
+                $this->cache = false;
736 745
                 self::$overriddenDefaults['cache'] = true;
737
-            }
738
-            break;
739
-        case 'no-cache':
740
-            if (isset(self::$overriddenDefaults['cache']) === true) {
741 746
                 break;
742
-            }
747
+            case 'ignore-annotations':
748
+                if (isset(self::$overriddenDefaults['annotations']) === true) {
749
+                    break;
750
+                }
743 751
 
744
-            $this->cache = false;
745
-            self::$overriddenDefaults['cache'] = true;
746
-            break;
747
-        case 'ignore-annotations':
748
-            if (isset(self::$overriddenDefaults['annotations']) === true) {
752
+                $this->annotations = false;
753
+                self::$overriddenDefaults['annotations'] = true;
749 754
                 break;
750
-            }
751
-
752
-            $this->annotations = false;
753
-            self::$overriddenDefaults['annotations'] = true;
754
-            break;
755
-        case 'config-set':
756
-            if (isset($this->cliArgs[($pos + 1)]) === false
757
-                || isset($this->cliArgs[($pos + 2)]) === false
758
-            ) {
759
-                $error  = 'ERROR: Setting a config option requires a name and value'.PHP_EOL.PHP_EOL;
760
-                $error .= $this->printShortUsage(true);
761
-                throw new DeepExitException($error, 3);
762
-            }
763
-
764
-            $key     = $this->cliArgs[($pos + 1)];
765
-            $value   = $this->cliArgs[($pos + 2)];
766
-            $current = self::getConfigData($key);
767
-
768
-            try {
769
-                $this->setConfigData($key, $value);
770
-            } catch (\Exception $e) {
771
-                throw new DeepExitException($e->getMessage().PHP_EOL, 3);
772
-            }
773
-
774
-            $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
775
-
776
-            if ($current === null) {
777
-                $output .= "Config value \"$key\" added successfully".PHP_EOL;
778
-            } else {
779
-                $output .= "Config value \"$key\" updated successfully; old value was \"$current\"".PHP_EOL;
780
-            }
781
-            throw new DeepExitException($output, 0);
782
-        case 'config-delete':
783
-            if (isset($this->cliArgs[($pos + 1)]) === false) {
784
-                $error  = 'ERROR: Deleting a config option requires the name of the option'.PHP_EOL.PHP_EOL;
785
-                $error .= $this->printShortUsage(true);
786
-                throw new DeepExitException($error, 3);
787
-            }
755
+            case 'config-set':
756
+                if (isset($this->cliArgs[($pos + 1)]) === false
757
+                    || isset($this->cliArgs[($pos + 2)]) === false
758
+                ) {
759
+                    $error  = 'ERROR: Setting a config option requires a name and value'.PHP_EOL.PHP_EOL;
760
+                    $error .= $this->printShortUsage(true);
761
+                    throw new DeepExitException($error, 3);
762
+                }
788 763
 
789
-            $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
764
+                $key     = $this->cliArgs[($pos + 1)];
765
+                $value   = $this->cliArgs[($pos + 2)];
766
+                $current = self::getConfigData($key);
790 767
 
791
-            $key     = $this->cliArgs[($pos + 1)];
792
-            $current = self::getConfigData($key);
793
-            if ($current === null) {
794
-                $output .= "Config value \"$key\" has not been set".PHP_EOL;
795
-            } else {
796 768
                 try {
797
-                    $this->setConfigData($key, null);
769
+                    $this->setConfigData($key, $value);
798 770
                 } catch (\Exception $e) {
799 771
                     throw new DeepExitException($e->getMessage().PHP_EOL, 3);
800 772
                 }
801 773
 
802
-                $output .= "Config value \"$key\" removed successfully; old value was \"$current\"".PHP_EOL;
803
-            }
804
-            throw new DeepExitException($output, 0);
805
-        case 'config-show':
806
-            ob_start();
807
-            $data = self::getAllConfigData();
808
-            echo 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
809
-            $this->printConfigData($data);
810
-            $output = ob_get_contents();
811
-            ob_end_clean();
812
-            throw new DeepExitException($output, 0);
813
-        case 'runtime-set':
814
-            if (isset($this->cliArgs[($pos + 1)]) === false
815
-                || isset($this->cliArgs[($pos + 2)]) === false
816
-            ) {
817
-                $error  = 'ERROR: Setting a runtime config option requires a name and value'.PHP_EOL.PHP_EOL;
818
-                $error .= $this->printShortUsage(true);
819
-                throw new DeepExitException($error, 3);
820
-            }
821
-
822
-            $key   = $this->cliArgs[($pos + 1)];
823
-            $value = $this->cliArgs[($pos + 2)];
824
-            $this->cliArgs[($pos + 1)] = '';
825
-            $this->cliArgs[($pos + 2)] = '';
826
-            self::setConfigData($key, $value, true);
827
-            if (isset(self::$overriddenDefaults['runtime-set']) === false) {
828
-                self::$overriddenDefaults['runtime-set'] = [];
829
-            }
774
+                $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
830 775
 
831
-            self::$overriddenDefaults['runtime-set'][$key] = true;
832
-            break;
833
-        default:
834
-            if (substr($arg, 0, 7) === 'sniffs=') {
835
-                if (isset(self::$overriddenDefaults['sniffs']) === true) {
836
-                    break;
776
+                if ($current === null) {
777
+                    $output .= "Config value \"$key\" added successfully".PHP_EOL;
778
+                } else {
779
+                    $output .= "Config value \"$key\" updated successfully; old value was \"$current\"".PHP_EOL;
780
+                }
781
+                throw new DeepExitException($output, 0);
782
+            case 'config-delete':
783
+                if (isset($this->cliArgs[($pos + 1)]) === false) {
784
+                    $error  = 'ERROR: Deleting a config option requires the name of the option'.PHP_EOL.PHP_EOL;
785
+                    $error .= $this->printShortUsage(true);
786
+                    throw new DeepExitException($error, 3);
837 787
                 }
838 788
 
839
-                $sniffs = explode(',', substr($arg, 7));
840
-                foreach ($sniffs as $sniff) {
841
-                    if (substr_count($sniff, '.') !== 2) {
842
-                        $error  = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL;
843
-                        $error .= $this->printShortUsage(true);
844
-                        throw new DeepExitException($error, 3);
789
+                $output = 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
790
+
791
+                $key     = $this->cliArgs[($pos + 1)];
792
+                $current = self::getConfigData($key);
793
+                if ($current === null) {
794
+                    $output .= "Config value \"$key\" has not been set".PHP_EOL;
795
+                } else {
796
+                    try {
797
+                        $this->setConfigData($key, null);
798
+                    } catch (\Exception $e) {
799
+                        throw new DeepExitException($e->getMessage().PHP_EOL, 3);
845 800
                     }
801
+
802
+                    $output .= "Config value \"$key\" removed successfully; old value was \"$current\"".PHP_EOL;
803
+                }
804
+                throw new DeepExitException($output, 0);
805
+            case 'config-show':
806
+                ob_start();
807
+                $data = self::getAllConfigData();
808
+                echo 'Using config file: '.self::$configDataFile.PHP_EOL.PHP_EOL;
809
+                $this->printConfigData($data);
810
+                $output = ob_get_contents();
811
+                ob_end_clean();
812
+                throw new DeepExitException($output, 0);
813
+            case 'runtime-set':
814
+                if (isset($this->cliArgs[($pos + 1)]) === false
815
+                    || isset($this->cliArgs[($pos + 2)]) === false
816
+                ) {
817
+                    $error  = 'ERROR: Setting a runtime config option requires a name and value'.PHP_EOL.PHP_EOL;
818
+                    $error .= $this->printShortUsage(true);
819
+                    throw new DeepExitException($error, 3);
846 820
                 }
847 821
 
848
-                $this->sniffs = $sniffs;
849
-                self::$overriddenDefaults['sniffs'] = true;
850
-            } else if (substr($arg, 0, 8) === 'exclude=') {
851
-                if (isset(self::$overriddenDefaults['exclude']) === true) {
852
-                    break;
822
+                $key   = $this->cliArgs[($pos + 1)];
823
+                $value = $this->cliArgs[($pos + 2)];
824
+                $this->cliArgs[($pos + 1)] = '';
825
+                $this->cliArgs[($pos + 2)] = '';
826
+                self::setConfigData($key, $value, true);
827
+                if (isset(self::$overriddenDefaults['runtime-set']) === false) {
828
+                    self::$overriddenDefaults['runtime-set'] = [];
853 829
                 }
854 830
 
855
-                $sniffs = explode(',', substr($arg, 8));
856
-                foreach ($sniffs as $sniff) {
857
-                    if (substr_count($sniff, '.') !== 2) {
858
-                        $error  = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL;
859
-                        $error .= $this->printShortUsage(true);
860
-                        throw new DeepExitException($error, 3);
831
+                self::$overriddenDefaults['runtime-set'][$key] = true;
832
+                break;
833
+            default:
834
+                if (substr($arg, 0, 7) === 'sniffs=') {
835
+                    if (isset(self::$overriddenDefaults['sniffs']) === true) {
836
+                        break;
861 837
                     }
862
-                }
863 838
 
864
-                $this->exclude = $sniffs;
865
-                self::$overriddenDefaults['exclude'] = true;
866
-            } else if (defined('PHP_CODESNIFFER_IN_TESTS') === false
867
-                && substr($arg, 0, 6) === 'cache='
868
-            ) {
869
-                if ((isset(self::$overriddenDefaults['cache']) === true
870
-                    && $this->cache === false)
871
-                    || isset(self::$overriddenDefaults['cacheFile']) === true
839
+                    $sniffs = explode(',', substr($arg, 7));
840
+                    foreach ($sniffs as $sniff) {
841
+                        if (substr_count($sniff, '.') !== 2) {
842
+                            $error  = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL;
843
+                            $error .= $this->printShortUsage(true);
844
+                            throw new DeepExitException($error, 3);
845
+                        }
846
+                    }
847
+
848
+                    $this->sniffs = $sniffs;
849
+                    self::$overriddenDefaults['sniffs'] = true;
850
+                } else if (substr($arg, 0, 8) === 'exclude=') {
851
+                    if (isset(self::$overriddenDefaults['exclude']) === true) {
852
+                        break;
853
+                    }
854
+
855
+                    $sniffs = explode(',', substr($arg, 8));
856
+                    foreach ($sniffs as $sniff) {
857
+                        if (substr_count($sniff, '.') !== 2) {
858
+                            $error  = 'ERROR: The specified sniff code "'.$sniff.'" is invalid'.PHP_EOL.PHP_EOL;
859
+                            $error .= $this->printShortUsage(true);
860
+                            throw new DeepExitException($error, 3);
861
+                        }
862
+                    }
863
+
864
+                    $this->exclude = $sniffs;
865
+                    self::$overriddenDefaults['exclude'] = true;
866
+                } else if (defined('PHP_CODESNIFFER_IN_TESTS') === false
867
+                    && substr($arg, 0, 6) === 'cache='
872 868
                 ) {
873
-                    break;
874
-                }
869
+                    if ((isset(self::$overriddenDefaults['cache']) === true
870
+                        && $this->cache === false)
871
+                        || isset(self::$overriddenDefaults['cacheFile']) === true
872
+                    ) {
873
+                        break;
874
+                    }
875 875
 
876
-                // Turn caching on.
877
-                $this->cache = true;
878
-                self::$overriddenDefaults['cache'] = true;
876
+                    // Turn caching on.
877
+                    $this->cache = true;
878
+                    self::$overriddenDefaults['cache'] = true;
879 879
 
880
-                $this->cacheFile = Util\Common::realpath(substr($arg, 6));
880
+                    $this->cacheFile = Util\Common::realpath(substr($arg, 6));
881 881
 
882
-                // It may not exist and return false instead.
883
-                if ($this->cacheFile === false) {
884
-                    $this->cacheFile = substr($arg, 6);
882
+                    // It may not exist and return false instead.
883
+                    if ($this->cacheFile === false) {
884
+                        $this->cacheFile = substr($arg, 6);
885 885
 
886
-                    $dir = dirname($this->cacheFile);
887
-                    if (is_dir($dir) === false) {
888
-                        $error  = 'ERROR: The specified cache file path "'.$this->cacheFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
889
-                        $error .= $this->printShortUsage(true);
890
-                        throw new DeepExitException($error, 3);
891
-                    }
886
+                        $dir = dirname($this->cacheFile);
887
+                        if (is_dir($dir) === false) {
888
+                            $error  = 'ERROR: The specified cache file path "'.$this->cacheFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
889
+                            $error .= $this->printShortUsage(true);
890
+                            throw new DeepExitException($error, 3);
891
+                        }
892 892
 
893
-                    if ($dir === '.') {
894
-                        // Passed cache file is a file in the current directory.
895
-                        $this->cacheFile = getcwd().'/'.basename($this->cacheFile);
896
-                    } else {
897
-                        if ($dir[0] === '/') {
898
-                            // An absolute path.
899
-                            $dir = Util\Common::realpath($dir);
893
+                        if ($dir === '.') {
894
+                            // Passed cache file is a file in the current directory.
895
+                            $this->cacheFile = getcwd().'/'.basename($this->cacheFile);
900 896
                         } else {
901
-                            $dir = Util\Common::realpath(getcwd().'/'.$dir);
902
-                        }
897
+                            if ($dir[0] === '/') {
898
+                                // An absolute path.
899
+                                $dir = Util\Common::realpath($dir);
900
+                            } else {
901
+                                $dir = Util\Common::realpath(getcwd().'/'.$dir);
902
+                            }
903 903
 
904
-                        if ($dir !== false) {
905
-                            // Cache file path is relative.
906
-                            $this->cacheFile = $dir.'/'.basename($this->cacheFile);
904
+                            if ($dir !== false) {
905
+                                // Cache file path is relative.
906
+                                $this->cacheFile = $dir.'/'.basename($this->cacheFile);
907
+                            }
907 908
                         }
909
+                    }//end if
910
+
911
+                    self::$overriddenDefaults['cacheFile'] = true;
912
+
913
+                    if (is_dir($this->cacheFile) === true) {
914
+                        $error  = 'ERROR: The specified cache file path "'.$this->cacheFile.'" is a directory'.PHP_EOL.PHP_EOL;
915
+                        $error .= $this->printShortUsage(true);
916
+                        throw new DeepExitException($error, 3);
908 917
                     }
909
-                }//end if
918
+                } else if (substr($arg, 0, 10) === 'bootstrap=') {
919
+                    $files     = explode(',', substr($arg, 10));
920
+                    $bootstrap = [];
921
+                    foreach ($files as $file) {
922
+                        $path = Util\Common::realpath($file);
923
+                        if ($path === false) {
924
+                            $error  = 'ERROR: The specified bootstrap file "'.$file.'" does not exist'.PHP_EOL.PHP_EOL;
925
+                            $error .= $this->printShortUsage(true);
926
+                            throw new DeepExitException($error, 3);
927
+                        }
910 928
 
911
-                self::$overriddenDefaults['cacheFile'] = true;
929
+                        $bootstrap[] = $path;
930
+                    }
912 931
 
913
-                if (is_dir($this->cacheFile) === true) {
914
-                    $error  = 'ERROR: The specified cache file path "'.$this->cacheFile.'" is a directory'.PHP_EOL.PHP_EOL;
915
-                    $error .= $this->printShortUsage(true);
916
-                    throw new DeepExitException($error, 3);
917
-                }
918
-            } else if (substr($arg, 0, 10) === 'bootstrap=') {
919
-                $files     = explode(',', substr($arg, 10));
920
-                $bootstrap = [];
921
-                foreach ($files as $file) {
922
-                    $path = Util\Common::realpath($file);
932
+                    $this->bootstrap = array_merge($this->bootstrap, $bootstrap);
933
+                    self::$overriddenDefaults['bootstrap'] = true;
934
+                } else if (substr($arg, 0, 10) === 'file-list=') {
935
+                    $fileList = substr($arg, 10);
936
+                    $path     = Util\Common::realpath($fileList);
923 937
                     if ($path === false) {
924
-                        $error  = 'ERROR: The specified bootstrap file "'.$file.'" does not exist'.PHP_EOL.PHP_EOL;
938
+                        $error  = 'ERROR: The specified file list "'.$fileList.'" does not exist'.PHP_EOL.PHP_EOL;
925 939
                         $error .= $this->printShortUsage(true);
926 940
                         throw new DeepExitException($error, 3);
927 941
                     }
928 942
 
929
-                    $bootstrap[] = $path;
930
-                }
943
+                    $files = file($path);
944
+                    foreach ($files as $inputFile) {
945
+                        $inputFile = trim($inputFile);
931 946
 
932
-                $this->bootstrap = array_merge($this->bootstrap, $bootstrap);
933
-                self::$overriddenDefaults['bootstrap'] = true;
934
-            } else if (substr($arg, 0, 10) === 'file-list=') {
935
-                $fileList = substr($arg, 10);
936
-                $path     = Util\Common::realpath($fileList);
937
-                if ($path === false) {
938
-                    $error  = 'ERROR: The specified file list "'.$fileList.'" does not exist'.PHP_EOL.PHP_EOL;
939
-                    $error .= $this->printShortUsage(true);
940
-                    throw new DeepExitException($error, 3);
941
-                }
947
+                        // Skip empty lines.
948
+                        if ($inputFile === '') {
949
+                            continue;
950
+                        }
942 951
 
943
-                $files = file($path);
944
-                foreach ($files as $inputFile) {
945
-                    $inputFile = trim($inputFile);
952
+                        $this->processFilePath($inputFile);
953
+                    }
954
+                } else if (substr($arg, 0, 11) === 'stdin-path=') {
955
+                    if (isset(self::$overriddenDefaults['stdinPath']) === true) {
956
+                        break;
957
+                    }
946 958
 
947
-                    // Skip empty lines.
948
-                    if ($inputFile === '') {
949
-                        continue;
959
+                    $this->stdinPath = Util\Common::realpath(substr($arg, 11));
960
+
961
+                    // It may not exist and return false instead, so use whatever they gave us.
962
+                    if ($this->stdinPath === false) {
963
+                        $this->stdinPath = trim(substr($arg, 11));
950 964
                     }
951 965
 
952
-                    $this->processFilePath($inputFile);
953
-                }
954
-            } else if (substr($arg, 0, 11) === 'stdin-path=') {
955
-                if (isset(self::$overriddenDefaults['stdinPath']) === true) {
956
-                    break;
957
-                }
966
+                    self::$overriddenDefaults['stdinPath'] = true;
967
+                } else if (PHP_CODESNIFFER_CBF === false && substr($arg, 0, 12) === 'report-file=') {
968
+                    if (isset(self::$overriddenDefaults['reportFile']) === true) {
969
+                        break;
970
+                    }
958 971
 
959
-                $this->stdinPath = Util\Common::realpath(substr($arg, 11));
972
+                    $this->reportFile = Util\Common::realpath(substr($arg, 12));
960 973
 
961
-                // It may not exist and return false instead, so use whatever they gave us.
962
-                if ($this->stdinPath === false) {
963
-                    $this->stdinPath = trim(substr($arg, 11));
964
-                }
974
+                    // It may not exist and return false instead.
975
+                    if ($this->reportFile === false) {
976
+                        $this->reportFile = substr($arg, 12);
965 977
 
966
-                self::$overriddenDefaults['stdinPath'] = true;
967
-            } else if (PHP_CODESNIFFER_CBF === false && substr($arg, 0, 12) === 'report-file=') {
968
-                if (isset(self::$overriddenDefaults['reportFile']) === true) {
969
-                    break;
970
-                }
978
+                        $dir = Util\Common::realpath(dirname($this->reportFile));
979
+                        if (is_dir($dir) === false) {
980
+                            $error  = 'ERROR: The specified report file path "'.$this->reportFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
981
+                            $error .= $this->printShortUsage(true);
982
+                            throw new DeepExitException($error, 3);
983
+                        }
971 984
 
972
-                $this->reportFile = Util\Common::realpath(substr($arg, 12));
985
+                        $this->reportFile = $dir.'/'.basename($this->reportFile);
986
+                    }//end if
973 987
 
974
-                // It may not exist and return false instead.
975
-                if ($this->reportFile === false) {
976
-                    $this->reportFile = substr($arg, 12);
988
+                    self::$overriddenDefaults['reportFile'] = true;
977 989
 
978
-                    $dir = Util\Common::realpath(dirname($this->reportFile));
979
-                    if (is_dir($dir) === false) {
980
-                        $error  = 'ERROR: The specified report file path "'.$this->reportFile.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
990
+                    if (is_dir($this->reportFile) === true) {
991
+                        $error  = 'ERROR: The specified report file path "'.$this->reportFile.'" is a directory'.PHP_EOL.PHP_EOL;
981 992
                         $error .= $this->printShortUsage(true);
982 993
                         throw new DeepExitException($error, 3);
983 994
                     }
995
+                } else if (substr($arg, 0, 13) === 'report-width=') {
996
+                    if (isset(self::$overriddenDefaults['reportWidth']) === true) {
997
+                        break;
998
+                    }
984 999
 
985
-                    $this->reportFile = $dir.'/'.basename($this->reportFile);
986
-                }//end if
987
-
988
-                self::$overriddenDefaults['reportFile'] = true;
989
-
990
-                if (is_dir($this->reportFile) === true) {
991
-                    $error  = 'ERROR: The specified report file path "'.$this->reportFile.'" is a directory'.PHP_EOL.PHP_EOL;
992
-                    $error .= $this->printShortUsage(true);
993
-                    throw new DeepExitException($error, 3);
994
-                }
995
-            } else if (substr($arg, 0, 13) === 'report-width=') {
996
-                if (isset(self::$overriddenDefaults['reportWidth']) === true) {
997
-                    break;
998
-                }
999
-
1000
-                $this->reportWidth = substr($arg, 13);
1001
-                self::$overriddenDefaults['reportWidth'] = true;
1002
-            } else if (substr($arg, 0, 9) === 'basepath=') {
1003
-                if (isset(self::$overriddenDefaults['basepath']) === true) {
1004
-                    break;
1005
-                }
1000
+                    $this->reportWidth = substr($arg, 13);
1001
+                    self::$overriddenDefaults['reportWidth'] = true;
1002
+                } else if (substr($arg, 0, 9) === 'basepath=') {
1003
+                    if (isset(self::$overriddenDefaults['basepath']) === true) {
1004
+                        break;
1005
+                    }
1006 1006
 
1007
-                self::$overriddenDefaults['basepath'] = true;
1007
+                    self::$overriddenDefaults['basepath'] = true;
1008 1008
 
1009
-                if (substr($arg, 9) === '') {
1010
-                    $this->basepath = null;
1011
-                    break;
1012
-                }
1009
+                    if (substr($arg, 9) === '') {
1010
+                        $this->basepath = null;
1011
+                        break;
1012
+                    }
1013 1013
 
1014
-                $this->basepath = Util\Common::realpath(substr($arg, 9));
1014
+                    $this->basepath = Util\Common::realpath(substr($arg, 9));
1015 1015
 
1016
-                // It may not exist and return false instead.
1017
-                if ($this->basepath === false) {
1018
-                    $this->basepath = substr($arg, 9);
1019
-                }
1016
+                    // It may not exist and return false instead.
1017
+                    if ($this->basepath === false) {
1018
+                        $this->basepath = substr($arg, 9);
1019
+                    }
1020 1020
 
1021
-                if (is_dir($this->basepath) === false) {
1022
-                    $error  = 'ERROR: The specified basepath "'.$this->basepath.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
1023
-                    $error .= $this->printShortUsage(true);
1024
-                    throw new DeepExitException($error, 3);
1025
-                }
1026
-            } else if ((substr($arg, 0, 7) === 'report=' || substr($arg, 0, 7) === 'report-')) {
1027
-                $reports = [];
1028
-
1029
-                if ($arg[6] === '-') {
1030
-                    // This is a report with file output.
1031
-                    $split = strpos($arg, '=');
1032
-                    if ($split === false) {
1033
-                        $report = substr($arg, 7);
1034
-                        $output = null;
1035
-                    } else {
1036
-                        $report = substr($arg, 7, ($split - 7));
1037
-                        $output = substr($arg, ($split + 1));
1038
-                        if ($output === false) {
1021
+                    if (is_dir($this->basepath) === false) {
1022
+                        $error  = 'ERROR: The specified basepath "'.$this->basepath.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
1023
+                        $error .= $this->printShortUsage(true);
1024
+                        throw new DeepExitException($error, 3);
1025
+                    }
1026
+                } else if ((substr($arg, 0, 7) === 'report=' || substr($arg, 0, 7) === 'report-')) {
1027
+                    $reports = [];
1028
+
1029
+                    if ($arg[6] === '-') {
1030
+                        // This is a report with file output.
1031
+                        $split = strpos($arg, '=');
1032
+                        if ($split === false) {
1033
+                            $report = substr($arg, 7);
1039 1034
                             $output = null;
1040 1035
                         } else {
1041
-                            $dir = Util\Common::realpath(dirname($output));
1042
-                            if (is_dir($dir) === false) {
1043
-                                $error  = 'ERROR: The specified '.$report.' report file path "'.$output.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
1044
-                                $error .= $this->printShortUsage(true);
1045
-                                throw new DeepExitException($error, 3);
1046
-                            }
1036
+                            $report = substr($arg, 7, ($split - 7));
1037
+                            $output = substr($arg, ($split + 1));
1038
+                            if ($output === false) {
1039
+                                $output = null;
1040
+                            } else {
1041
+                                $dir = Util\Common::realpath(dirname($output));
1042
+                                if (is_dir($dir) === false) {
1043
+                                    $error  = 'ERROR: The specified '.$report.' report file path "'.$output.'" points to a non-existent directory'.PHP_EOL.PHP_EOL;
1044
+                                    $error .= $this->printShortUsage(true);
1045
+                                    throw new DeepExitException($error, 3);
1046
+                                }
1047
+
1048
+                                $output = $dir.'/'.basename($output);
1049
+
1050
+                                if (is_dir($output) === true) {
1051
+                                    $error  = 'ERROR: The specified '.$report.' report file path "'.$output.'" is a directory'.PHP_EOL.PHP_EOL;
1052
+                                    $error .= $this->printShortUsage(true);
1053
+                                    throw new DeepExitException($error, 3);
1054
+                                }
1055
+                            }//end if
1056
+                        }//end if
1047 1057
 
1048
-                            $output = $dir.'/'.basename($output);
1058
+                        $reports[$report] = $output;
1059
+                    } else {
1060
+                        // This is a single report.
1061
+                        if (isset(self::$overriddenDefaults['reports']) === true) {
1062
+                            break;
1063
+                        }
1049 1064
 
1050
-                            if (is_dir($output) === true) {
1051
-                                $error  = 'ERROR: The specified '.$report.' report file path "'.$output.'" is a directory'.PHP_EOL.PHP_EOL;
1052
-                                $error .= $this->printShortUsage(true);
1053
-                                throw new DeepExitException($error, 3);
1054
-                            }
1055
-                        }//end if
1065
+                        $reportNames = explode(',', substr($arg, 7));
1066
+                        foreach ($reportNames as $report) {
1067
+                            $reports[$report] = null;
1068
+                        }
1056 1069
                     }//end if
1057 1070
 
1058
-                    $reports[$report] = $output;
1059
-                } else {
1060
-                    // This is a single report.
1061
-                    if (isset(self::$overriddenDefaults['reports']) === true) {
1062
-                        break;
1071
+                    // Remove the default value so the CLI value overrides it.
1072
+                    if (isset(self::$overriddenDefaults['reports']) === false) {
1073
+                        $this->reports = $reports;
1074
+                    } else {
1075
+                        $this->reports = array_merge($this->reports, $reports);
1063 1076
                     }
1064 1077
 
1065
-                    $reportNames = explode(',', substr($arg, 7));
1066
-                    foreach ($reportNames as $report) {
1067
-                        $reports[$report] = null;
1078
+                    self::$overriddenDefaults['reports'] = true;
1079
+                } else if (substr($arg, 0, 7) === 'filter=') {
1080
+                    if (isset(self::$overriddenDefaults['filter']) === true) {
1081
+                        break;
1068 1082
                     }
1069
-                }//end if
1070 1083
 
1071
-                // Remove the default value so the CLI value overrides it.
1072
-                if (isset(self::$overriddenDefaults['reports']) === false) {
1073
-                    $this->reports = $reports;
1074
-                } else {
1075
-                    $this->reports = array_merge($this->reports, $reports);
1076
-                }
1084
+                    $this->filter = substr($arg, 7);
1085
+                    self::$overriddenDefaults['filter'] = true;
1086
+                } else if (substr($arg, 0, 9) === 'standard=') {
1087
+                    $standards = trim(substr($arg, 9));
1088
+                    if ($standards !== '') {
1089
+                        $this->standards = explode(',', $standards);
1090
+                    }
1077 1091
 
1078
-                self::$overriddenDefaults['reports'] = true;
1079
-            } else if (substr($arg, 0, 7) === 'filter=') {
1080
-                if (isset(self::$overriddenDefaults['filter']) === true) {
1081
-                    break;
1082
-                }
1092
+                    self::$overriddenDefaults['standards'] = true;
1093
+                } else if (substr($arg, 0, 11) === 'extensions=') {
1094
+                    if (isset(self::$overriddenDefaults['extensions']) === true) {
1095
+                        break;
1096
+                    }
1083 1097
 
1084
-                $this->filter = substr($arg, 7);
1085
-                self::$overriddenDefaults['filter'] = true;
1086
-            } else if (substr($arg, 0, 9) === 'standard=') {
1087
-                $standards = trim(substr($arg, 9));
1088
-                if ($standards !== '') {
1089
-                    $this->standards = explode(',', $standards);
1090
-                }
1098
+                    $extensions    = explode(',', substr($arg, 11));
1099
+                    $newExtensions = [];
1100
+                    foreach ($extensions as $ext) {
1101
+                        $slash = strpos($ext, '/');
1102
+                        if ($slash !== false) {
1103
+                            // They specified the tokenizer too.
1104
+                            list($ext, $tokenizer) = explode('/', $ext);
1105
+                            $newExtensions[$ext]   = strtoupper($tokenizer);
1106
+                            continue;
1107
+                        }
1091 1108
 
1092
-                self::$overriddenDefaults['standards'] = true;
1093
-            } else if (substr($arg, 0, 11) === 'extensions=') {
1094
-                if (isset(self::$overriddenDefaults['extensions']) === true) {
1095
-                    break;
1096
-                }
1109
+                        if (isset($this->extensions[$ext]) === true) {
1110
+                            $newExtensions[$ext] = $this->extensions[$ext];
1111
+                        } else {
1112
+                            $newExtensions[$ext] = 'PHP';
1113
+                        }
1114
+                    }
1097 1115
 
1098
-                $extensions    = explode(',', substr($arg, 11));
1099
-                $newExtensions = [];
1100
-                foreach ($extensions as $ext) {
1101
-                    $slash = strpos($ext, '/');
1102
-                    if ($slash !== false) {
1103
-                        // They specified the tokenizer too.
1104
-                        list($ext, $tokenizer) = explode('/', $ext);
1105
-                        $newExtensions[$ext]   = strtoupper($tokenizer);
1106
-                        continue;
1116
+                    $this->extensions = $newExtensions;
1117
+                    self::$overriddenDefaults['extensions'] = true;
1118
+                } else if (substr($arg, 0, 7) === 'suffix=') {
1119
+                    if (isset(self::$overriddenDefaults['suffix']) === true) {
1120
+                        break;
1107 1121
                     }
1108 1122
 
1109
-                    if (isset($this->extensions[$ext]) === true) {
1110
-                        $newExtensions[$ext] = $this->extensions[$ext];
1111
-                    } else {
1112
-                        $newExtensions[$ext] = 'PHP';
1123
+                    $this->suffix = substr($arg, 7);
1124
+                    self::$overriddenDefaults['suffix'] = true;
1125
+                } else if (substr($arg, 0, 9) === 'parallel=') {
1126
+                    if (isset(self::$overriddenDefaults['parallel']) === true) {
1127
+                        break;
1113 1128
                     }
1114
-                }
1115 1129
 
1116
-                $this->extensions = $newExtensions;
1117
-                self::$overriddenDefaults['extensions'] = true;
1118
-            } else if (substr($arg, 0, 7) === 'suffix=') {
1119
-                if (isset(self::$overriddenDefaults['suffix']) === true) {
1120
-                    break;
1121
-                }
1130
+                    $this->parallel = max((int) substr($arg, 9), 1);
1131
+                    self::$overriddenDefaults['parallel'] = true;
1132
+                } else if (substr($arg, 0, 9) === 'severity=') {
1133
+                    $this->errorSeverity   = (int) substr($arg, 9);
1134
+                    $this->warningSeverity = $this->errorSeverity;
1135
+                    if (isset(self::$overriddenDefaults['errorSeverity']) === false) {
1136
+                        self::$overriddenDefaults['errorSeverity'] = true;
1137
+                    }
1122 1138
 
1123
-                $this->suffix = substr($arg, 7);
1124
-                self::$overriddenDefaults['suffix'] = true;
1125
-            } else if (substr($arg, 0, 9) === 'parallel=') {
1126
-                if (isset(self::$overriddenDefaults['parallel']) === true) {
1127
-                    break;
1128
-                }
1139
+                    if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
1140
+                        self::$overriddenDefaults['warningSeverity'] = true;
1141
+                    }
1142
+                } else if (substr($arg, 0, 15) === 'error-severity=') {
1143
+                    if (isset(self::$overriddenDefaults['errorSeverity']) === true) {
1144
+                        break;
1145
+                    }
1129 1146
 
1130
-                $this->parallel = max((int) substr($arg, 9), 1);
1131
-                self::$overriddenDefaults['parallel'] = true;
1132
-            } else if (substr($arg, 0, 9) === 'severity=') {
1133
-                $this->errorSeverity   = (int) substr($arg, 9);
1134
-                $this->warningSeverity = $this->errorSeverity;
1135
-                if (isset(self::$overriddenDefaults['errorSeverity']) === false) {
1147
+                    $this->errorSeverity = (int) substr($arg, 15);
1136 1148
                     self::$overriddenDefaults['errorSeverity'] = true;
1137
-                }
1149
+                } else if (substr($arg, 0, 17) === 'warning-severity=') {
1150
+                    if (isset(self::$overriddenDefaults['warningSeverity']) === true) {
1151
+                        break;
1152
+                    }
1138 1153
 
1139
-                if (isset(self::$overriddenDefaults['warningSeverity']) === false) {
1154
+                    $this->warningSeverity = (int) substr($arg, 17);
1140 1155
                     self::$overriddenDefaults['warningSeverity'] = true;
1141
-                }
1142
-            } else if (substr($arg, 0, 15) === 'error-severity=') {
1143
-                if (isset(self::$overriddenDefaults['errorSeverity']) === true) {
1144
-                    break;
1145
-                }
1146
-
1147
-                $this->errorSeverity = (int) substr($arg, 15);
1148
-                self::$overriddenDefaults['errorSeverity'] = true;
1149
-            } else if (substr($arg, 0, 17) === 'warning-severity=') {
1150
-                if (isset(self::$overriddenDefaults['warningSeverity']) === true) {
1151
-                    break;
1152
-                }
1156
+                } else if (substr($arg, 0, 7) === 'ignore=') {
1157
+                    if (isset(self::$overriddenDefaults['ignored']) === true) {
1158
+                        break;
1159
+                    }
1153 1160
 
1154
-                $this->warningSeverity = (int) substr($arg, 17);
1155
-                self::$overriddenDefaults['warningSeverity'] = true;
1156
-            } else if (substr($arg, 0, 7) === 'ignore=') {
1157
-                if (isset(self::$overriddenDefaults['ignored']) === true) {
1158
-                    break;
1159
-                }
1161
+                    // Split the ignore string on commas, unless the comma is escaped
1162
+                    // using 1 or 3 slashes (\, or \\\,).
1163
+                    $patterns = preg_split(
1164
+                        '/(?<=(?<!\\\\)\\\\\\\\),|(?<!\\\\),/',
1165
+                        substr($arg, 7)
1166
+                    );
1167
+
1168
+                    $ignored = [];
1169
+                    foreach ($patterns as $pattern) {
1170
+                        $pattern = trim($pattern);
1171
+                        if ($pattern === '') {
1172
+                            continue;
1173
+                        }
1160 1174
 
1161
-                // Split the ignore string on commas, unless the comma is escaped
1162
-                // using 1 or 3 slashes (\, or \\\,).
1163
-                $patterns = preg_split(
1164
-                    '/(?<=(?<!\\\\)\\\\\\\\),|(?<!\\\\),/',
1165
-                    substr($arg, 7)
1166
-                );
1167
-
1168
-                $ignored = [];
1169
-                foreach ($patterns as $pattern) {
1170
-                    $pattern = trim($pattern);
1171
-                    if ($pattern === '') {
1172
-                        continue;
1175
+                        $ignored[$pattern] = 'absolute';
1173 1176
                     }
1174 1177
 
1175
-                    $ignored[$pattern] = 'absolute';
1176
-                }
1177
-
1178
-                $this->ignored = $ignored;
1179
-                self::$overriddenDefaults['ignored'] = true;
1180
-            } else if (substr($arg, 0, 10) === 'generator='
1181
-                && PHP_CODESNIFFER_CBF === false
1182
-            ) {
1183
-                if (isset(self::$overriddenDefaults['generator']) === true) {
1184
-                    break;
1185
-                }
1178
+                    $this->ignored = $ignored;
1179
+                    self::$overriddenDefaults['ignored'] = true;
1180
+                } else if (substr($arg, 0, 10) === 'generator='
1181
+                    && PHP_CODESNIFFER_CBF === false
1182
+                ) {
1183
+                    if (isset(self::$overriddenDefaults['generator']) === true) {
1184
+                        break;
1185
+                    }
1186 1186
 
1187
-                $this->generator = substr($arg, 10);
1188
-                self::$overriddenDefaults['generator'] = true;
1189
-            } else if (substr($arg, 0, 9) === 'encoding=') {
1190
-                if (isset(self::$overriddenDefaults['encoding']) === true) {
1191
-                    break;
1192
-                }
1187
+                    $this->generator = substr($arg, 10);
1188
+                    self::$overriddenDefaults['generator'] = true;
1189
+                } else if (substr($arg, 0, 9) === 'encoding=') {
1190
+                    if (isset(self::$overriddenDefaults['encoding']) === true) {
1191
+                        break;
1192
+                    }
1193 1193
 
1194
-                $this->encoding = strtolower(substr($arg, 9));
1195
-                self::$overriddenDefaults['encoding'] = true;
1196
-            } else if (substr($arg, 0, 10) === 'tab-width=') {
1197
-                if (isset(self::$overriddenDefaults['tabWidth']) === true) {
1198
-                    break;
1199
-                }
1194
+                    $this->encoding = strtolower(substr($arg, 9));
1195
+                    self::$overriddenDefaults['encoding'] = true;
1196
+                } else if (substr($arg, 0, 10) === 'tab-width=') {
1197
+                    if (isset(self::$overriddenDefaults['tabWidth']) === true) {
1198
+                        break;
1199
+                    }
1200 1200
 
1201
-                $this->tabWidth = (int) substr($arg, 10);
1202
-                self::$overriddenDefaults['tabWidth'] = true;
1203
-            } else {
1204
-                if ($this->dieOnUnknownArg === false) {
1205
-                    $eqPos = strpos($arg, '=');
1206
-                    try {
1207
-                        if ($eqPos === false) {
1208
-                            $this->values[$arg] = $arg;
1209
-                        } else {
1210
-                            $value = substr($arg, ($eqPos + 1));
1211
-                            $arg   = substr($arg, 0, $eqPos);
1212
-                            $this->values[$arg] = $value;
1201
+                    $this->tabWidth = (int) substr($arg, 10);
1202
+                    self::$overriddenDefaults['tabWidth'] = true;
1203
+                } else {
1204
+                    if ($this->dieOnUnknownArg === false) {
1205
+                        $eqPos = strpos($arg, '=');
1206
+                        try {
1207
+                            if ($eqPos === false) {
1208
+                                $this->values[$arg] = $arg;
1209
+                            } else {
1210
+                                $value = substr($arg, ($eqPos + 1));
1211
+                                $arg   = substr($arg, 0, $eqPos);
1212
+                                $this->values[$arg] = $value;
1213
+                            }
1214
+                        } catch (RuntimeException $e) {
1215
+                            // Value is not valid, so just ignore it.
1213 1216
                         }
1214
-                    } catch (RuntimeException $e) {
1215
-                        // Value is not valid, so just ignore it.
1217
+                    } else {
1218
+                        $this->processUnknownArgument('--'.$arg, $pos);
1216 1219
                     }
1217
-                } else {
1218
-                    $this->processUnknownArgument('--'.$arg, $pos);
1219
-                }
1220
-            }//end if
1221
-            break;
1220
+                }//end if
1221
+                break;
1222 1222
         }//end switch
1223 1223
 
1224 1224
     }//end processLongArgument()
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Reports/VersionControl.php 1 patch
Switch Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -178,40 +178,40 @@
 block discarded – undo
178 178
         foreach ($lines as $line) {
179 179
             $parts = explode('>>', $line);
180 180
             switch ($parts[0]) {
181
-            case 'AUTHOR':
182
-                if (isset($authorCache[$parts[1]]) === false) {
183
-                    $authorCache[$parts[1]] = $parts[2];
184
-                } else {
185
-                    $authorCache[$parts[1]] += $parts[2];
186
-                }
187
-                break;
188
-            case 'PRAISE':
189
-                if (isset($praiseCache[$parts[1]]) === false) {
190
-                    $praiseCache[$parts[1]] = [
191
-                        'good' => $parts[2],
192
-                        'bad'  => $parts[3],
193
-                    ];
194
-                } else {
195
-                    $praiseCache[$parts[1]]['good'] += $parts[2];
196
-                    $praiseCache[$parts[1]]['bad']  += $parts[3];
197
-                }
198
-                break;
199
-            case 'SOURCE':
200
-                if (isset($praiseCache[$parts[1]]) === false) {
201
-                    $praiseCache[$parts[1]] = [];
202
-                }
181
+                case 'AUTHOR':
182
+                    if (isset($authorCache[$parts[1]]) === false) {
183
+                        $authorCache[$parts[1]] = $parts[2];
184
+                    } else {
185
+                        $authorCache[$parts[1]] += $parts[2];
186
+                    }
187
+                    break;
188
+                case 'PRAISE':
189
+                    if (isset($praiseCache[$parts[1]]) === false) {
190
+                        $praiseCache[$parts[1]] = [
191
+                            'good' => $parts[2],
192
+                            'bad'  => $parts[3],
193
+                        ];
194
+                    } else {
195
+                        $praiseCache[$parts[1]]['good'] += $parts[2];
196
+                        $praiseCache[$parts[1]]['bad']  += $parts[3];
197
+                    }
198
+                    break;
199
+                case 'SOURCE':
200
+                    if (isset($praiseCache[$parts[1]]) === false) {
201
+                        $praiseCache[$parts[1]] = [];
202
+                    }
203 203
 
204
-                if (isset($sourceCache[$parts[1]][$parts[2]]) === false) {
205
-                    $sourceCache[$parts[1]][$parts[2]] = [
206
-                        'count'   => $parts[3],
207
-                        'fixable' => (bool) $parts[4],
208
-                    ];
209
-                } else {
210
-                    $sourceCache[$parts[1]][$parts[2]]['count'] += $parts[3];
211
-                }
212
-                break;
213
-            default:
214
-                break;
204
+                    if (isset($sourceCache[$parts[1]][$parts[2]]) === false) {
205
+                        $sourceCache[$parts[1]][$parts[2]] = [
206
+                            'count'   => $parts[3],
207
+                            'fixable' => (bool) $parts[4],
208
+                        ];
209
+                    } else {
210
+                        $sourceCache[$parts[1]][$parts[2]]['count'] += $parts[3];
211
+                    }
212
+                    break;
213
+                default:
214
+                    break;
215 215
             }//end switch
216 216
         }//end foreach
217 217
 
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Fixer.php 1 patch
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -269,14 +269,14 @@
 block discarded – undo
269 269
         foreach ($diffLines as $line) {
270 270
             if (isset($line[0]) === true) {
271 271
                 switch ($line[0]) {
272
-                case '-':
273
-                    $diff[] = "\033[31m$line\033[0m";
274
-                    break;
275
-                case '+':
276
-                    $diff[] = "\033[32m$line\033[0m";
277
-                    break;
278
-                default:
279
-                    $diff[] = $line;
272
+                    case '-':
273
+                        $diff[] = "\033[31m$line\033[0m";
274
+                        break;
275
+                    case '+':
276
+                        $diff[] = "\033[32m$line\033[0m";
277
+                        break;
278
+                    default:
279
+                        $diff[] = $line;
280 280
                 }
281 281
             }
282 282
         }
Please login to merge, or discard this patch.
vendor/squizlabs/php_codesniffer/src/Files/File.php 1 patch
Switch Indentation   +163 added lines, -163 removed lines patch added patch discarded remove patch
@@ -1373,147 +1373,147 @@  discard block
 block discarded – undo
1373 1373
             }
1374 1374
 
1375 1375
             switch ($this->tokens[$i]['code']) {
1376
-            case T_BITWISE_AND:
1377
-                if ($defaultStart === null) {
1378
-                    $passByReference = true;
1379
-                    $referenceToken  = $i;
1380
-                }
1381
-                break;
1382
-            case T_VARIABLE:
1383
-                $currVar = $i;
1384
-                break;
1385
-            case T_ELLIPSIS:
1386
-                $variableLength = true;
1387
-                $variadicToken  = $i;
1388
-                break;
1389
-            case T_CALLABLE:
1390
-                if ($typeHintToken === false) {
1391
-                    $typeHintToken = $i;
1392
-                }
1393
-
1394
-                $typeHint        .= $this->tokens[$i]['content'];
1395
-                $typeHintEndToken = $i;
1396
-                break;
1397
-            case T_SELF:
1398
-            case T_PARENT:
1399
-            case T_STATIC:
1400
-                // Self and parent are valid, static invalid, but was probably intended as type hint.
1401
-                if (isset($defaultStart) === false) {
1376
+                case T_BITWISE_AND:
1377
+                    if ($defaultStart === null) {
1378
+                        $passByReference = true;
1379
+                        $referenceToken  = $i;
1380
+                    }
1381
+                    break;
1382
+                case T_VARIABLE:
1383
+                    $currVar = $i;
1384
+                    break;
1385
+                case T_ELLIPSIS:
1386
+                    $variableLength = true;
1387
+                    $variadicToken  = $i;
1388
+                    break;
1389
+                case T_CALLABLE:
1402 1390
                     if ($typeHintToken === false) {
1403 1391
                         $typeHintToken = $i;
1404 1392
                     }
1405 1393
 
1406 1394
                     $typeHint        .= $this->tokens[$i]['content'];
1407 1395
                     $typeHintEndToken = $i;
1408
-                }
1409
-                break;
1410
-            case T_STRING:
1411
-                // This is a string, so it may be a type hint, but it could
1412
-                // also be a constant used as a default value.
1413
-                $prevComma = false;
1414
-                for ($t = $i; $t >= $opener; $t--) {
1415
-                    if ($this->tokens[$t]['code'] === T_COMMA) {
1416
-                        $prevComma = $t;
1417
-                        break;
1418
-                    }
1419
-                }
1396
+                    break;
1397
+                case T_SELF:
1398
+                case T_PARENT:
1399
+                case T_STATIC:
1400
+                    // Self and parent are valid, static invalid, but was probably intended as type hint.
1401
+                    if (isset($defaultStart) === false) {
1402
+                        if ($typeHintToken === false) {
1403
+                            $typeHintToken = $i;
1404
+                        }
1420 1405
 
1421
-                if ($prevComma !== false) {
1422
-                    $nextEquals = false;
1423
-                    for ($t = $prevComma; $t < $i; $t++) {
1424
-                        if ($this->tokens[$t]['code'] === T_EQUAL) {
1425
-                            $nextEquals = $t;
1406
+                        $typeHint        .= $this->tokens[$i]['content'];
1407
+                        $typeHintEndToken = $i;
1408
+                    }
1409
+                    break;
1410
+                case T_STRING:
1411
+                    // This is a string, so it may be a type hint, but it could
1412
+                    // also be a constant used as a default value.
1413
+                    $prevComma = false;
1414
+                    for ($t = $i; $t >= $opener; $t--) {
1415
+                        if ($this->tokens[$t]['code'] === T_COMMA) {
1416
+                            $prevComma = $t;
1426 1417
                             break;
1427 1418
                         }
1428 1419
                     }
1429 1420
 
1430
-                    if ($nextEquals !== false) {
1431
-                        break;
1432
-                    }
1433
-                }
1421
+                    if ($prevComma !== false) {
1422
+                        $nextEquals = false;
1423
+                        for ($t = $prevComma; $t < $i; $t++) {
1424
+                            if ($this->tokens[$t]['code'] === T_EQUAL) {
1425
+                                $nextEquals = $t;
1426
+                                break;
1427
+                            }
1428
+                        }
1434 1429
 
1435
-                if ($defaultStart === null) {
1436
-                    if ($typeHintToken === false) {
1437
-                        $typeHintToken = $i;
1430
+                        if ($nextEquals !== false) {
1431
+                            break;
1432
+                        }
1438 1433
                     }
1439 1434
 
1440
-                    $typeHint        .= $this->tokens[$i]['content'];
1441
-                    $typeHintEndToken = $i;
1442
-                }
1443
-                break;
1444
-            case T_NAMESPACE:
1445
-            case T_NS_SEPARATOR:
1446
-                // Part of a type hint or default value.
1447
-                if ($defaultStart === null) {
1448
-                    if ($typeHintToken === false) {
1449
-                        $typeHintToken = $i;
1435
+                    if ($defaultStart === null) {
1436
+                        if ($typeHintToken === false) {
1437
+                            $typeHintToken = $i;
1438
+                        }
1439
+
1440
+                        $typeHint        .= $this->tokens[$i]['content'];
1441
+                        $typeHintEndToken = $i;
1450 1442
                     }
1443
+                    break;
1444
+                case T_NAMESPACE:
1445
+                case T_NS_SEPARATOR:
1446
+                    // Part of a type hint or default value.
1447
+                    if ($defaultStart === null) {
1448
+                        if ($typeHintToken === false) {
1449
+                            $typeHintToken = $i;
1450
+                        }
1451 1451
 
1452
-                    $typeHint        .= $this->tokens[$i]['content'];
1453
-                    $typeHintEndToken = $i;
1454
-                }
1455
-                break;
1456
-            case T_NULLABLE:
1457
-                if ($defaultStart === null) {
1458
-                    $nullableType     = true;
1459
-                    $typeHint        .= $this->tokens[$i]['content'];
1460
-                    $typeHintEndToken = $i;
1461
-                }
1462
-                break;
1463
-            case T_CLOSE_PARENTHESIS:
1464
-            case T_COMMA:
1465
-                // If it's null, then there must be no parameters for this
1466
-                // method.
1467
-                if ($currVar === null) {
1468
-                    continue 2;
1469
-                }
1452
+                        $typeHint        .= $this->tokens[$i]['content'];
1453
+                        $typeHintEndToken = $i;
1454
+                    }
1455
+                    break;
1456
+                case T_NULLABLE:
1457
+                    if ($defaultStart === null) {
1458
+                        $nullableType     = true;
1459
+                        $typeHint        .= $this->tokens[$i]['content'];
1460
+                        $typeHintEndToken = $i;
1461
+                    }
1462
+                    break;
1463
+                case T_CLOSE_PARENTHESIS:
1464
+                case T_COMMA:
1465
+                    // If it's null, then there must be no parameters for this
1466
+                    // method.
1467
+                    if ($currVar === null) {
1468
+                        continue 2;
1469
+                    }
1470 1470
 
1471
-                $vars[$paramCount]            = [];
1472
-                $vars[$paramCount]['token']   = $currVar;
1473
-                $vars[$paramCount]['name']    = $this->tokens[$currVar]['content'];
1474
-                $vars[$paramCount]['content'] = trim($this->getTokensAsString($paramStart, ($i - $paramStart)));
1471
+                    $vars[$paramCount]            = [];
1472
+                    $vars[$paramCount]['token']   = $currVar;
1473
+                    $vars[$paramCount]['name']    = $this->tokens[$currVar]['content'];
1474
+                    $vars[$paramCount]['content'] = trim($this->getTokensAsString($paramStart, ($i - $paramStart)));
1475 1475
 
1476
-                if ($defaultStart !== null) {
1477
-                    $vars[$paramCount]['default']       = trim($this->getTokensAsString($defaultStart, ($i - $defaultStart)));
1478
-                    $vars[$paramCount]['default_token'] = $defaultStart;
1479
-                    $vars[$paramCount]['default_equal_token'] = $equalToken;
1480
-                }
1476
+                    if ($defaultStart !== null) {
1477
+                        $vars[$paramCount]['default']       = trim($this->getTokensAsString($defaultStart, ($i - $defaultStart)));
1478
+                        $vars[$paramCount]['default_token'] = $defaultStart;
1479
+                        $vars[$paramCount]['default_equal_token'] = $equalToken;
1480
+                    }
1481 1481
 
1482
-                $vars[$paramCount]['pass_by_reference']   = $passByReference;
1483
-                $vars[$paramCount]['reference_token']     = $referenceToken;
1484
-                $vars[$paramCount]['variable_length']     = $variableLength;
1485
-                $vars[$paramCount]['variadic_token']      = $variadicToken;
1486
-                $vars[$paramCount]['type_hint']           = $typeHint;
1487
-                $vars[$paramCount]['type_hint_token']     = $typeHintToken;
1488
-                $vars[$paramCount]['type_hint_end_token'] = $typeHintEndToken;
1489
-                $vars[$paramCount]['nullable_type']       = $nullableType;
1490
-
1491
-                if ($this->tokens[$i]['code'] === T_COMMA) {
1492
-                    $vars[$paramCount]['comma_token'] = $i;
1493
-                } else {
1494
-                    $vars[$paramCount]['comma_token'] = false;
1495
-                }
1482
+                    $vars[$paramCount]['pass_by_reference']   = $passByReference;
1483
+                    $vars[$paramCount]['reference_token']     = $referenceToken;
1484
+                    $vars[$paramCount]['variable_length']     = $variableLength;
1485
+                    $vars[$paramCount]['variadic_token']      = $variadicToken;
1486
+                    $vars[$paramCount]['type_hint']           = $typeHint;
1487
+                    $vars[$paramCount]['type_hint_token']     = $typeHintToken;
1488
+                    $vars[$paramCount]['type_hint_end_token'] = $typeHintEndToken;
1489
+                    $vars[$paramCount]['nullable_type']       = $nullableType;
1490
+
1491
+                    if ($this->tokens[$i]['code'] === T_COMMA) {
1492
+                        $vars[$paramCount]['comma_token'] = $i;
1493
+                    } else {
1494
+                        $vars[$paramCount]['comma_token'] = false;
1495
+                    }
1496 1496
 
1497
-                // Reset the vars, as we are about to process the next parameter.
1498
-                $currVar          = null;
1499
-                $paramStart       = ($i + 1);
1500
-                $defaultStart     = null;
1501
-                $equalToken       = null;
1502
-                $passByReference  = false;
1503
-                $referenceToken   = false;
1504
-                $variableLength   = false;
1505
-                $variadicToken    = false;
1506
-                $typeHint         = '';
1507
-                $typeHintToken    = false;
1508
-                $typeHintEndToken = false;
1509
-                $nullableType     = false;
1510
-
1511
-                $paramCount++;
1512
-                break;
1513
-            case T_EQUAL:
1514
-                $defaultStart = $this->findNext(Util\Tokens::$emptyTokens, ($i + 1), null, true);
1515
-                $equalToken   = $i;
1516
-                break;
1497
+                    // Reset the vars, as we are about to process the next parameter.
1498
+                    $currVar          = null;
1499
+                    $paramStart       = ($i + 1);
1500
+                    $defaultStart     = null;
1501
+                    $equalToken       = null;
1502
+                    $passByReference  = false;
1503
+                    $referenceToken   = false;
1504
+                    $variableLength   = false;
1505
+                    $variadicToken    = false;
1506
+                    $typeHint         = '';
1507
+                    $typeHintToken    = false;
1508
+                    $typeHintEndToken = false;
1509
+                    $nullableType     = false;
1510
+
1511
+                    $paramCount++;
1512
+                    break;
1513
+                case T_EQUAL:
1514
+                    $defaultStart = $this->findNext(Util\Tokens::$emptyTokens, ($i + 1), null, true);
1515
+                    $equalToken   = $i;
1516
+                    break;
1517 1517
             }//end switch
1518 1518
         }//end for
1519 1519
 
@@ -1590,27 +1590,27 @@  discard block
 block discarded – undo
1590 1590
             }
1591 1591
 
1592 1592
             switch ($this->tokens[$i]['code']) {
1593
-            case T_PUBLIC:
1594
-                $scope          = 'public';
1595
-                $scopeSpecified = true;
1596
-                break;
1597
-            case T_PRIVATE:
1598
-                $scope          = 'private';
1599
-                $scopeSpecified = true;
1600
-                break;
1601
-            case T_PROTECTED:
1602
-                $scope          = 'protected';
1603
-                $scopeSpecified = true;
1604
-                break;
1605
-            case T_ABSTRACT:
1606
-                $isAbstract = true;
1607
-                break;
1608
-            case T_FINAL:
1609
-                $isFinal = true;
1610
-                break;
1611
-            case T_STATIC:
1612
-                $isStatic = true;
1613
-                break;
1593
+                case T_PUBLIC:
1594
+                    $scope          = 'public';
1595
+                    $scopeSpecified = true;
1596
+                    break;
1597
+                case T_PRIVATE:
1598
+                    $scope          = 'private';
1599
+                    $scopeSpecified = true;
1600
+                    break;
1601
+                case T_PROTECTED:
1602
+                    $scope          = 'protected';
1603
+                    $scopeSpecified = true;
1604
+                    break;
1605
+                case T_ABSTRACT:
1606
+                    $isAbstract = true;
1607
+                    break;
1608
+                case T_FINAL:
1609
+                    $isFinal = true;
1610
+                    break;
1611
+                case T_STATIC:
1612
+                    $isStatic = true;
1613
+                    break;
1614 1614
             }//end switch
1615 1615
         }//end for
1616 1616
 
@@ -1785,21 +1785,21 @@  discard block
 block discarded – undo
1785 1785
             }
1786 1786
 
1787 1787
             switch ($this->tokens[$i]['code']) {
1788
-            case T_PUBLIC:
1789
-                $scope          = 'public';
1790
-                $scopeSpecified = true;
1791
-                break;
1792
-            case T_PRIVATE:
1793
-                $scope          = 'private';
1794
-                $scopeSpecified = true;
1795
-                break;
1796
-            case T_PROTECTED:
1797
-                $scope          = 'protected';
1798
-                $scopeSpecified = true;
1799
-                break;
1800
-            case T_STATIC:
1801
-                $isStatic = true;
1802
-                break;
1788
+                case T_PUBLIC:
1789
+                    $scope          = 'public';
1790
+                    $scopeSpecified = true;
1791
+                    break;
1792
+                case T_PRIVATE:
1793
+                    $scope          = 'private';
1794
+                    $scopeSpecified = true;
1795
+                    break;
1796
+                case T_PROTECTED:
1797
+                    $scope          = 'protected';
1798
+                    $scopeSpecified = true;
1799
+                    break;
1800
+                case T_STATIC:
1801
+                    $isStatic = true;
1802
+                    break;
1803 1803
             }
1804 1804
         }//end for
1805 1805
 
@@ -1898,13 +1898,13 @@  discard block
 block discarded – undo
1898 1898
             }
1899 1899
 
1900 1900
             switch ($this->tokens[$i]['code']) {
1901
-            case T_ABSTRACT:
1902
-                $isAbstract = true;
1903
-                break;
1901
+                case T_ABSTRACT:
1902
+                    $isAbstract = true;
1903
+                    break;
1904 1904
 
1905
-            case T_FINAL:
1906
-                $isFinal = true;
1907
-                break;
1905
+                case T_FINAL:
1906
+                    $isFinal = true;
1907
+                    break;
1908 1908
             }
1909 1909
         }//end for
1910 1910
 
Please login to merge, or discard this patch.