Completed
Pull Request — master (#1)
by Tomáš
09:56 queued 03:19
created
CodeSniffer/Standards/Zend/Tests/Debug/CodeAnalyzerUnitTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     /**
36 36
      * Should this test be skipped for some reason.
37 37
      *
38
-     * @return void
38
+     * @return boolean
39 39
      */
40 40
     protected function shouldSkipTest()
41 41
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
                 48 => 1,
58 58
                 70 => 1,
59 59
                 71 => 1,
60
-               );
60
+                );
61 61
 
62 62
     }//end getErrorList()
63 63
 
Please login to merge, or discard this patch.
scripts/build-phar.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
  *
100 100
  * @return void
101 101
  */
102
-function buildFromNode(&$phar, $node, $prefix='')
102
+function buildFromNode(&$phar, $node, $prefix = '')
103 103
 {
104 104
     $nodeName = $node->nodeName;
105 105
     if ($nodeName !== 'dir' && $nodeName !== 'file') {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@
 block discarded – undo
292 292
     return array(
293 293
             'whiz',
294 294
             'bang',
295
-           );
295
+            );
296 296
 
297 297
     case 2:
298 298
     return helper_func(
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/CSS.php 3 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 
69 69
         $finalTokens    = array();
70 70
         $finalTokens[0] = array(
71
-                           'code'    => T_OPEN_TAG,
72
-                           'type'    => 'T_OPEN_TAG',
73
-                           'content' => '',
74
-                          );
71
+                            'code'    => T_OPEN_TAG,
72
+                            'type'    => 'T_OPEN_TAG',
73
+                            'content' => '',
74
+                            );
75 75
 
76 76
         $newStackPtr      = 1;
77 77
         $numTokens        = count($tokens);
@@ -124,10 +124,10 @@  discard block
 block discarded – undo
124 124
                 }
125 125
 
126 126
                 $finalTokens[$newStackPtr] = array(
127
-                                              'type'    => 'T_EMBEDDED_PHP',
128
-                                              'code'    => T_EMBEDDED_PHP,
129
-                                              'content' => $content,
130
-                                             );
127
+                                                'type'    => 'T_EMBEDDED_PHP',
128
+                                                'code'    => T_EMBEDDED_PHP,
129
+                                                'content' => $content,
130
+                                                );
131 131
 
132 132
                 $newStackPtr++;
133 133
                 continue;
@@ -137,16 +137,16 @@  discard block
 block discarded – undo
137 137
                 // Convert these back to T_STRING followed by T_COLON so we can
138 138
                 // more easily process style definitions.
139 139
                 $finalTokens[$newStackPtr] = array(
140
-                                              'type'    => 'T_STRING',
141
-                                              'code'    => T_STRING,
142
-                                              'content' => substr($token['content'], 0, -1),
143
-                                             );
140
+                                                'type'    => 'T_STRING',
141
+                                                'code'    => T_STRING,
142
+                                                'content' => substr($token['content'], 0, -1),
143
+                                                );
144 144
                 $newStackPtr++;
145 145
                 $finalTokens[$newStackPtr] = array(
146
-                                              'type'    => 'T_COLON',
147
-                                              'code'    => T_COLON,
148
-                                              'content' => ':',
149
-                                             );
146
+                                                'type'    => 'T_COLON',
147
+                                                'code'    => T_COLON,
148
+                                                'content' => ':',
149
+                                                );
150 150
                 $newStackPtr++;
151 151
                 continue;
152 152
             }
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
             if ($token['code'] === T_FUNCTION) {
155 155
                 // There are no functions in CSS, so convert this to a string.
156 156
                 $finalTokens[$newStackPtr] = array(
157
-                                              'type'    => 'T_STRING',
158
-                                              'code'    => T_STRING,
159
-                                              'content' => $token['content'],
160
-                                             );
157
+                                                'type'    => 'T_STRING',
158
+                                                'code'    => T_STRING,
159
+                                                'content' => $token['content'],
160
+                                                );
161 161
 
162 162
                 $newStackPtr++;
163 163
                 continue;
@@ -221,23 +221,23 @@  discard block
 block discarded – undo
221 221
                         // Work out what we trimmed off above and remember to re-add it.
222 222
                         $trimmed = substr($token['content'], 0, (strlen($token['content']) - strlen($content)));
223 223
                         $finalTokens[$newStackPtr] = array(
224
-                                                      'type'    => 'T_COLOUR',
225
-                                                      'code'    => T_COLOUR,
226
-                                                      'content' => $trimmed.$firstContent,
227
-                                                     );
224
+                                                        'type'    => 'T_COLOUR',
225
+                                                        'code'    => T_COLOUR,
226
+                                                        'content' => $trimmed.$firstContent,
227
+                                                        );
228 228
                     } else {
229 229
                         $finalTokens[$newStackPtr] = array(
230
-                                                      'type'    => 'T_HASH',
231
-                                                      'code'    => T_HASH,
232
-                                                      'content' => '#',
233
-                                                     );
230
+                                                        'type'    => 'T_HASH',
231
+                                                        'code'    => T_HASH,
232
+                                                        'content' => '#',
233
+                                                        );
234 234
                     }
235 235
                 } else {
236 236
                     $finalTokens[$newStackPtr] = array(
237
-                                                  'type'    => 'T_STRING',
238
-                                                  'code'    => T_STRING,
239
-                                                  'content' => '//',
240
-                                                 );
237
+                                                    'type'    => 'T_STRING',
238
+                                                    'code'    => T_STRING,
239
+                                                    'content' => '//',
240
+                                                    );
241 241
                 }//end if
242 242
 
243 243
                 $newStackPtr++;
Please login to merge, or discard this patch.
Switch Indentation   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -283,12 +283,32 @@  discard block
 block discarded – undo
283 283
             }
284 284
 
285 285
             switch ($token['code']) {
286
-            case T_OPEN_CURLY_BRACKET:
287
-                // Opening curly brackets for an At-rule do not start a style
288
-                // definition. We also reset the asperand flag here because the next
289
-                // opening curly bracket could be indeed the start of a style
290
-                // definition.
291
-                if ($asperandStart === true) {
286
+                case T_OPEN_CURLY_BRACKET:
287
+                    // Opening curly brackets for an At-rule do not start a style
288
+                    // definition. We also reset the asperand flag here because the next
289
+                    // opening curly bracket could be indeed the start of a style
290
+                    // definition.
291
+                    if ($asperandStart === true) {
292
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
293
+                            if ($inStyleDef === true) {
294
+                                echo "\t\t* style definition closed *".PHP_EOL;
295
+                            }
296
+
297
+                            if ($asperandStart === true) {
298
+                                echo "\t\t* at-rule definition closed *".PHP_EOL;
299
+                            }
300
+                        }
301
+
302
+                        $inStyleDef    = false;
303
+                        $asperandStart = false;
304
+                    } else {
305
+                        $inStyleDef = true;
306
+                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
307
+                            echo "\t\t* style definition opened *".PHP_EOL;
308
+                        }
309
+                    }
310
+                    break;
311
+                case T_CLOSE_CURLY_BRACKET:
292 312
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
293 313
                         if ($inStyleDef === true) {
294 314
                             echo "\t\t* style definition closed *".PHP_EOL;
@@ -301,162 +321,142 @@  discard block
 block discarded – undo
301 321
 
302 322
                     $inStyleDef    = false;
303 323
                     $asperandStart = false;
304
-                } else {
305
-                    $inStyleDef = true;
306
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
307
-                        echo "\t\t* style definition opened *".PHP_EOL;
308
-                    }
309
-                }
310
-                break;
311
-            case T_CLOSE_CURLY_BRACKET:
312
-                if (PHP_CODESNIFFER_VERBOSITY > 1) {
313
-                    if ($inStyleDef === true) {
314
-                        echo "\t\t* style definition closed *".PHP_EOL;
315
-                    }
316
-
317
-                    if ($asperandStart === true) {
318
-                        echo "\t\t* at-rule definition closed *".PHP_EOL;
319
-                    }
320
-                }
321
-
322
-                $inStyleDef    = false;
323
-                $asperandStart = false;
324
-                break;
325
-            case T_MINUS:
326
-                // Minus signs are often used instead of spaces inside
327
-                // class names, IDs and styles.
328
-                if ($finalTokens[($stackPtr + 1)]['code'] === T_STRING) {
329
-                    if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) {
330
-                        $newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content'];
331
-
324
+                    break;
325
+                case T_MINUS:
326
+                    // Minus signs are often used instead of spaces inside
327
+                    // class names, IDs and styles.
328
+                    if ($finalTokens[($stackPtr + 1)]['code'] === T_STRING) {
329
+                        if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) {
330
+                            $newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content'];
331
+
332
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
333
+                                echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL;
334
+                                $old = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
335
+                                $new = PHP_CodeSniffer::prepareForOutput($newContent);
336
+                                echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
337
+                            }
338
+
339
+                            $finalTokens[($stackPtr + 1)]['content'] = $newContent;
340
+                            unset($finalTokens[$stackPtr]);
341
+                            unset($finalTokens[($stackPtr - 1)]);
342
+                        } else {
343
+                            $newContent = '-'.$finalTokens[($stackPtr + 1)]['content'];
344
+
345
+                            $finalTokens[($stackPtr + 1)]['content'] = $newContent;
346
+                            unset($finalTokens[$stackPtr]);
347
+                        }
348
+                    } else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) {
349
+                        // They can also be used to provide negative numbers.
332 350
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
333
-                            echo "\t\t* token is a string joiner; ignoring this and previous token".PHP_EOL;
334
-                            $old = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
335
-                            $new = PHP_CodeSniffer::prepareForOutput($newContent);
336
-                            echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
351
+                            echo "\t\t* token is part of a negative number; adding content to next token and ignoring *".PHP_EOL;
352
+                            $content = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
353
+                            echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL;
337 354
                         }
338 355
 
339
-                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
356
+                        $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content'];
340 357
                         unset($finalTokens[$stackPtr]);
341
-                        unset($finalTokens[($stackPtr - 1)]);
342
-                    } else {
343
-                        $newContent = '-'.$finalTokens[($stackPtr + 1)]['content'];
358
+                    }//end if
344 359
 
345
-                        $finalTokens[($stackPtr + 1)]['content'] = $newContent;
346
-                        unset($finalTokens[$stackPtr]);
347
-                    }
348
-                } else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) {
349
-                    // They can also be used to provide negative numbers.
350
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
351
-                        echo "\t\t* token is part of a negative number; adding content to next token and ignoring *".PHP_EOL;
352
-                        $content = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
353
-                        echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL;
354
-                    }
355
-
356
-                    $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content'];
357
-                    unset($finalTokens[$stackPtr]);
358
-                }//end if
359
-
360
-                break;
361
-            case T_COLON:
362
-                // Only interested in colons that are defining styles.
363
-                if ($inStyleDef === false) {
364 360
                     break;
365
-                }
366
-
367
-                for ($x = ($stackPtr - 1); $x >= 0; $x--) {
368
-                    if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
361
+                case T_COLON:
362
+                    // Only interested in colons that are defining styles.
363
+                    if ($inStyleDef === false) {
369 364
                         break;
370 365
                     }
371
-                }
372 366
 
373
-                if (PHP_CODESNIFFER_VERBOSITY > 1) {
374
-                    $type = $finalTokens[$x]['type'];
375
-                    echo "\t\t=> token $x changed from $type to T_STYLE".PHP_EOL;
376
-                }
377
-
378
-                $finalTokens[$x]['type'] = 'T_STYLE';
379
-                $finalTokens[$x]['code'] = T_STYLE;
380
-                break;
381
-            case T_STRING:
382
-                if (strtolower($token['content']) === 'url') {
383
-                    // Find the next content.
384
-                    for ($x = ($stackPtr + 1); $x < $numTokens; $x++) {
367
+                    for ($x = ($stackPtr - 1); $x >= 0; $x--) {
385 368
                         if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
386 369
                             break;
387 370
                         }
388 371
                     }
389 372
 
390
-                    // Needs to be in the format "url(" for it to be a URL.
391
-                    if ($finalTokens[$x]['code'] !== T_OPEN_PARENTHESIS) {
392
-                        continue;
373
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
374
+                        $type = $finalTokens[$x]['type'];
375
+                        echo "\t\t=> token $x changed from $type to T_STYLE".PHP_EOL;
393 376
                     }
394 377
 
395
-                    // Make sure the content isn't empty.
396
-                    for ($y = ($x + 1); $y < $numTokens; $y++) {
397
-                        if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$y]['code']]) === false) {
398
-                            break;
378
+                    $finalTokens[$x]['type'] = 'T_STYLE';
379
+                    $finalTokens[$x]['code'] = T_STYLE;
380
+                    break;
381
+                case T_STRING:
382
+                    if (strtolower($token['content']) === 'url') {
383
+                        // Find the next content.
384
+                        for ($x = ($stackPtr + 1); $x < $numTokens; $x++) {
385
+                            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$x]['code']]) === false) {
386
+                                break;
387
+                            }
399 388
                         }
400
-                    }
401 389
 
402
-                    if ($finalTokens[$y]['code'] === T_CLOSE_PARENTHESIS) {
403
-                        continue;
404
-                    }
405
-
406
-                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
407
-                        for ($i = ($stackPtr + 1); $i <= $y; $i++) {
408
-                            $type    = $finalTokens[$i]['type'];
409
-                            $content = PHP_CodeSniffer::prepareForOutput($finalTokens[$i]['content']);
410
-                            echo "\tProcess token $i: $type => $content".PHP_EOL;
390
+                        // Needs to be in the format "url(" for it to be a URL.
391
+                        if ($finalTokens[$x]['code'] !== T_OPEN_PARENTHESIS) {
392
+                            continue;
411 393
                         }
412 394
 
413
-                        echo "\t\t* token starts a URL *".PHP_EOL;
414
-                    }
395
+                        // Make sure the content isn't empty.
396
+                        for ($y = ($x + 1); $y < $numTokens; $y++) {
397
+                            if (isset(PHP_CodeSniffer_Tokens::$emptyTokens[$finalTokens[$y]['code']]) === false) {
398
+                                break;
399
+                            }
400
+                        }
415 401
 
416
-                    // Join all the content together inside the url() statement.
417
-                    $newContent = '';
418
-                    for ($i = ($x + 2); $i < $numTokens; $i++) {
419
-                        if ($finalTokens[$i]['code'] === T_CLOSE_PARENTHESIS) {
420
-                            break;
402
+                        if ($finalTokens[$y]['code'] === T_CLOSE_PARENTHESIS) {
403
+                            continue;
421 404
                         }
422 405
 
423
-                        $newContent .= $finalTokens[$i]['content'];
424 406
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
425
-                            $content = PHP_CodeSniffer::prepareForOutput($finalTokens[$i]['content']);
426
-                            echo "\t\t=> token $i added to URL string and ignored: $content".PHP_EOL;
407
+                            for ($i = ($stackPtr + 1); $i <= $y; $i++) {
408
+                                $type    = $finalTokens[$i]['type'];
409
+                                $content = PHP_CodeSniffer::prepareForOutput($finalTokens[$i]['content']);
410
+                                echo "\tProcess token $i: $type => $content".PHP_EOL;
411
+                            }
412
+
413
+                            echo "\t\t* token starts a URL *".PHP_EOL;
427 414
                         }
428 415
 
429
-                        unset($finalTokens[$i]);
430
-                    }
416
+                        // Join all the content together inside the url() statement.
417
+                        $newContent = '';
418
+                        for ($i = ($x + 2); $i < $numTokens; $i++) {
419
+                            if ($finalTokens[$i]['code'] === T_CLOSE_PARENTHESIS) {
420
+                                break;
421
+                            }
431 422
 
432
-                    $stackPtr = $i;
423
+                            $newContent .= $finalTokens[$i]['content'];
424
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
425
+                                $content = PHP_CodeSniffer::prepareForOutput($finalTokens[$i]['content']);
426
+                                echo "\t\t=> token $i added to URL string and ignored: $content".PHP_EOL;
427
+                            }
433 428
 
434
-                    // If the content inside the "url()" is in double quotes
435
-                    // there will only be one token and so we don't have to do
436
-                    // anything except change its type. If it is not empty,
437
-                    // we need to do some token merging.
438
-                    $finalTokens[($x + 1)]['type'] = 'T_URL';
439
-                    $finalTokens[($x + 1)]['code'] = T_URL;
429
+                            unset($finalTokens[$i]);
430
+                        }
440 431
 
441
-                    if ($newContent !== '') {
442
-                        $finalTokens[($x + 1)]['content'] .= $newContent;
443
-                        if (PHP_CODESNIFFER_VERBOSITY > 1) {
444
-                            $content = PHP_CodeSniffer::prepareForOutput($finalTokens[($x + 1)]['content']);
445
-                            echo "\t\t=> token content changed to: $content".PHP_EOL;
432
+                        $stackPtr = $i;
433
+
434
+                        // If the content inside the "url()" is in double quotes
435
+                        // there will only be one token and so we don't have to do
436
+                        // anything except change its type. If it is not empty,
437
+                        // we need to do some token merging.
438
+                        $finalTokens[($x + 1)]['type'] = 'T_URL';
439
+                        $finalTokens[($x + 1)]['code'] = T_URL;
440
+
441
+                        if ($newContent !== '') {
442
+                            $finalTokens[($x + 1)]['content'] .= $newContent;
443
+                            if (PHP_CODESNIFFER_VERBOSITY > 1) {
444
+                                $content = PHP_CodeSniffer::prepareForOutput($finalTokens[($x + 1)]['content']);
445
+                                echo "\t\t=> token content changed to: $content".PHP_EOL;
446
+                            }
446 447
                         }
447
-                    }
448
-                }//end if
448
+                    }//end if
449 449
 
450
-                break;
451
-            case T_ASPERAND:
452
-                $asperandStart = true;
453
-                if (PHP_CODESNIFFER_VERBOSITY > 1) {
454
-                    echo "\t\t* at-rule definition opened *".PHP_EOL;
455
-                }
456
-                break;
457
-            default:
458
-                // Nothing special to be done with this token.
459
-                break;
450
+                    break;
451
+                case T_ASPERAND:
452
+                    $asperandStart = true;
453
+                    if (PHP_CODESNIFFER_VERBOSITY > 1) {
454
+                        echo "\t\t* at-rule definition opened *".PHP_EOL;
455
+                    }
456
+                    break;
457
+                default:
458
+                    // Nothing special to be done with this token.
459
+                    break;
460 460
             }//end switch
461 461
         }//end for
462 462
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@
 block discarded – undo
260 260
      *
261 261
      * @return array
262 262
      */
263
-    public function tokenizeString($string, $eolChar='\n')
263
+    public function tokenizeString($string, $eolChar = '\n')
264 264
     {
265 265
         if (PHP_CODESNIFFER_VERBOSITY > 1) {
266 266
             echo "\t*** START JS TOKENIZING ***".PHP_EOL;
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/PHP.php 3 patches
Indentation   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -46,232 +46,232 @@  discard block
 block discarded – undo
46 46
     public $scopeOpeners = array(
47 47
                             T_IF            => array(
48 48
                                                 'start'  => array(
49
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
50
-                                                             T_COLON              => T_COLON,
49
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
50
+                                                                T_COLON              => T_COLON,
51 51
                                                             ),
52 52
                                                 'end'    => array(
53
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
54
-                                                             T_ENDIF               => T_ENDIF,
55
-                                                             T_ELSE                => T_ELSE,
56
-                                                             T_ELSEIF              => T_ELSEIF,
53
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
54
+                                                                T_ENDIF               => T_ENDIF,
55
+                                                                T_ELSE                => T_ELSE,
56
+                                                                T_ELSEIF              => T_ELSEIF,
57 57
                                                             ),
58 58
                                                 'strict' => false,
59 59
                                                 'shared' => false,
60 60
                                                 'with'   => array(
61
-                                                             T_ELSE   => T_ELSE,
62
-                                                             T_ELSEIF => T_ELSEIF,
61
+                                                                T_ELSE   => T_ELSE,
62
+                                                                T_ELSEIF => T_ELSEIF,
63 63
                                                             ),
64
-                                               ),
64
+                                                ),
65 65
                             T_TRY           => array(
66 66
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
67 67
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
68 68
                                                 'strict' => true,
69 69
                                                 'shared' => false,
70 70
                                                 'with'   => array(),
71
-                                               ),
71
+                                                ),
72 72
                             T_CATCH         => array(
73 73
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
74 74
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
75 75
                                                 'strict' => true,
76 76
                                                 'shared' => false,
77 77
                                                 'with'   => array(),
78
-                                               ),
78
+                                                ),
79 79
                             T_FINALLY       => array(
80 80
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
81 81
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
82 82
                                                 'strict' => true,
83 83
                                                 'shared' => false,
84 84
                                                 'with'   => array(),
85
-                                               ),
85
+                                                ),
86 86
                             T_ELSE          => array(
87 87
                                                 'start'  => array(
88
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
89
-                                                             T_COLON              => T_COLON,
88
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
89
+                                                                T_COLON              => T_COLON,
90 90
                                                             ),
91 91
                                                 'end'    => array(
92
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
93
-                                                             T_ENDIF               => T_ENDIF,
92
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
93
+                                                                T_ENDIF               => T_ENDIF,
94 94
                                                             ),
95 95
                                                 'strict' => false,
96 96
                                                 'shared' => false,
97 97
                                                 'with'   => array(
98
-                                                             T_IF     => T_IF,
99
-                                                             T_ELSEIF => T_ELSEIF,
98
+                                                                T_IF     => T_IF,
99
+                                                                T_ELSEIF => T_ELSEIF,
100 100
                                                             ),
101
-                                               ),
101
+                                                ),
102 102
                             T_ELSEIF        => array(
103 103
                                                 'start'  => array(
104
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
105
-                                                             T_COLON              => T_COLON,
104
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
105
+                                                                T_COLON              => T_COLON,
106 106
                                                             ),
107 107
                                                 'end'    => array(
108
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
109
-                                                             T_ENDIF               => T_ENDIF,
110
-                                                             T_ELSE                => T_ELSE,
111
-                                                             T_ELSEIF              => T_ELSEIF,
108
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
109
+                                                                T_ENDIF               => T_ENDIF,
110
+                                                                T_ELSE                => T_ELSE,
111
+                                                                T_ELSEIF              => T_ELSEIF,
112 112
                                                             ),
113 113
                                                 'strict' => false,
114 114
                                                 'shared' => false,
115 115
                                                 'with'   => array(
116
-                                                             T_IF   => T_IF,
117
-                                                             T_ELSE => T_ELSE,
116
+                                                                T_IF   => T_IF,
117
+                                                                T_ELSE => T_ELSE,
118 118
                                                             ),
119
-                                               ),
119
+                                                ),
120 120
                             T_FOR           => array(
121 121
                                                 'start'  => array(
122
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
123
-                                                             T_COLON              => T_COLON,
122
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
123
+                                                                T_COLON              => T_COLON,
124 124
                                                             ),
125 125
                                                 'end'    => array(
126
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
127
-                                                             T_ENDFOR              => T_ENDFOR,
126
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
127
+                                                                T_ENDFOR              => T_ENDFOR,
128 128
                                                             ),
129 129
                                                 'strict' => false,
130 130
                                                 'shared' => false,
131 131
                                                 'with'   => array(),
132
-                                               ),
132
+                                                ),
133 133
                             T_FOREACH       => array(
134 134
                                                 'start'  => array(
135
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
136
-                                                             T_COLON              => T_COLON,
135
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
136
+                                                                T_COLON              => T_COLON,
137 137
                                                             ),
138 138
                                                 'end'    => array(
139
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
140
-                                                             T_ENDFOREACH          => T_ENDFOREACH,
139
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
140
+                                                                T_ENDFOREACH          => T_ENDFOREACH,
141 141
                                                             ),
142 142
                                                 'strict' => false,
143 143
                                                 'shared' => false,
144 144
                                                 'with'   => array(),
145
-                                               ),
145
+                                                ),
146 146
                             T_INTERFACE     => array(
147 147
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
148 148
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
149 149
                                                 'strict' => true,
150 150
                                                 'shared' => false,
151 151
                                                 'with'   => array(),
152
-                                               ),
152
+                                                ),
153 153
                             T_FUNCTION      => array(
154 154
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
155 155
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
156 156
                                                 'strict' => true,
157 157
                                                 'shared' => false,
158 158
                                                 'with'   => array(),
159
-                                               ),
159
+                                                ),
160 160
                             T_CLASS         => array(
161 161
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
162 162
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
163 163
                                                 'strict' => true,
164 164
                                                 'shared' => false,
165 165
                                                 'with'   => array(),
166
-                                               ),
166
+                                                ),
167 167
                             T_TRAIT         => array(
168 168
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
169 169
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
170 170
                                                 'strict' => true,
171 171
                                                 'shared' => false,
172 172
                                                 'with'   => array(),
173
-                                               ),
173
+                                                ),
174 174
                             T_USE           => array(
175 175
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
176 176
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
177 177
                                                 'strict' => false,
178 178
                                                 'shared' => false,
179 179
                                                 'with'   => array(),
180
-                                               ),
180
+                                                ),
181 181
                             T_DECLARE       => array(
182 182
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
183 183
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
184 184
                                                 'strict' => false,
185 185
                                                 'shared' => false,
186 186
                                                 'with'   => array(),
187
-                                               ),
187
+                                                ),
188 188
                             T_NAMESPACE     => array(
189 189
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
190 190
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
191 191
                                                 'strict' => false,
192 192
                                                 'shared' => false,
193 193
                                                 'with'   => array(),
194
-                                               ),
194
+                                                ),
195 195
                             T_WHILE         => array(
196 196
                                                 'start'  => array(
197
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
198
-                                                             T_COLON              => T_COLON,
197
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
198
+                                                                T_COLON              => T_COLON,
199 199
                                                             ),
200 200
                                                 'end'    => array(
201
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
202
-                                                             T_ENDWHILE            => T_ENDWHILE,
201
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
202
+                                                                T_ENDWHILE            => T_ENDWHILE,
203 203
                                                             ),
204 204
                                                 'strict' => false,
205 205
                                                 'shared' => false,
206 206
                                                 'with'   => array(),
207
-                                               ),
207
+                                                ),
208 208
                             T_DO            => array(
209 209
                                                 'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
210 210
                                                 'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
211 211
                                                 'strict' => true,
212 212
                                                 'shared' => false,
213 213
                                                 'with'   => array(),
214
-                                               ),
214
+                                                ),
215 215
                             T_SWITCH        => array(
216 216
                                                 'start'  => array(
217
-                                                             T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
218
-                                                             T_COLON              => T_COLON,
217
+                                                                T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET,
218
+                                                                T_COLON              => T_COLON,
219 219
                                                             ),
220 220
                                                 'end'    => array(
221
-                                                             T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
222
-                                                             T_ENDSWITCH           => T_ENDSWITCH,
221
+                                                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
222
+                                                                T_ENDSWITCH           => T_ENDSWITCH,
223 223
                                                             ),
224 224
                                                 'strict' => true,
225 225
                                                 'shared' => false,
226 226
                                                 'with'   => array(),
227
-                                               ),
227
+                                                ),
228 228
                             T_CASE          => array(
229 229
                                                 'start'  => array(
230
-                                                             T_COLON     => T_COLON,
231
-                                                             T_SEMICOLON => T_SEMICOLON,
230
+                                                                T_COLON     => T_COLON,
231
+                                                                T_SEMICOLON => T_SEMICOLON,
232 232
                                                             ),
233 233
                                                 'end'    => array(
234
-                                                             T_BREAK    => T_BREAK,
235
-                                                             T_RETURN   => T_RETURN,
236
-                                                             T_CONTINUE => T_CONTINUE,
237
-                                                             T_THROW    => T_THROW,
238
-                                                             T_EXIT     => T_EXIT,
234
+                                                                T_BREAK    => T_BREAK,
235
+                                                                T_RETURN   => T_RETURN,
236
+                                                                T_CONTINUE => T_CONTINUE,
237
+                                                                T_THROW    => T_THROW,
238
+                                                                T_EXIT     => T_EXIT,
239 239
                                                             ),
240 240
                                                 'strict' => true,
241 241
                                                 'shared' => true,
242 242
                                                 'with'   => array(
243
-                                                             T_DEFAULT => T_DEFAULT,
244
-                                                             T_CASE    => T_CASE,
245
-                                                             T_SWITCH  => T_SWITCH,
243
+                                                                T_DEFAULT => T_DEFAULT,
244
+                                                                T_CASE    => T_CASE,
245
+                                                                T_SWITCH  => T_SWITCH,
246 246
                                                             ),
247
-                                               ),
247
+                                                ),
248 248
                             T_DEFAULT       => array(
249 249
                                                 'start'  => array(
250
-                                                             T_COLON     => T_COLON,
251
-                                                             T_SEMICOLON => T_SEMICOLON,
250
+                                                                T_COLON     => T_COLON,
251
+                                                                T_SEMICOLON => T_SEMICOLON,
252 252
                                                             ),
253 253
                                                 'end'    => array(
254
-                                                             T_BREAK    => T_BREAK,
255
-                                                             T_RETURN   => T_RETURN,
256
-                                                             T_CONTINUE => T_CONTINUE,
257
-                                                             T_THROW    => T_THROW,
258
-                                                             T_EXIT     => T_EXIT,
254
+                                                                T_BREAK    => T_BREAK,
255
+                                                                T_RETURN   => T_RETURN,
256
+                                                                T_CONTINUE => T_CONTINUE,
257
+                                                                T_THROW    => T_THROW,
258
+                                                                T_EXIT     => T_EXIT,
259 259
                                                             ),
260 260
                                                 'strict' => true,
261 261
                                                 'shared' => true,
262 262
                                                 'with'   => array(
263
-                                                             T_CASE   => T_CASE,
264
-                                                             T_SWITCH => T_SWITCH,
263
+                                                                T_CASE   => T_CASE,
264
+                                                                T_SWITCH => T_SWITCH,
265 265
                                                             ),
266
-                                               ),
266
+                                                ),
267 267
                             T_START_HEREDOC => array(
268 268
                                                 'start'  => array(T_START_HEREDOC => T_START_HEREDOC),
269 269
                                                 'end'    => array(T_END_HEREDOC => T_END_HEREDOC),
270 270
                                                 'strict' => true,
271 271
                                                 'shared' => false,
272 272
                                                 'with'   => array(),
273
-                                               ),
274
-                           );
273
+                                                ),
274
+                            );
275 275
 
276 276
     /**
277 277
      * A list of tokens that end the scope.
@@ -283,15 +283,15 @@  discard block
 block discarded – undo
283 283
      * @var array
284 284
      */
285 285
     public $endScopeTokens = array(
286
-                              T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
287
-                              T_ENDIF               => T_ENDIF,
288
-                              T_ENDFOR              => T_ENDFOR,
289
-                              T_ENDFOREACH          => T_ENDFOREACH,
290
-                              T_ENDWHILE            => T_ENDWHILE,
291
-                              T_ENDSWITCH           => T_ENDSWITCH,
292
-                              T_BREAK               => T_BREAK,
293
-                              T_END_HEREDOC         => T_END_HEREDOC,
294
-                             );
286
+                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
287
+                                T_ENDIF               => T_ENDIF,
288
+                                T_ENDFOR              => T_ENDFOR,
289
+                                T_ENDFOREACH          => T_ENDFOREACH,
290
+                                T_ENDWHILE            => T_ENDWHILE,
291
+                                T_ENDSWITCH           => T_ENDSWITCH,
292
+                                T_BREAK               => T_BREAK,
293
+                                T_END_HEREDOC         => T_END_HEREDOC,
294
+                                );
295 295
 
296 296
     /**
297 297
      * A cache of different token types, resolved into arrays.
@@ -423,10 +423,10 @@  discard block
 block discarded – undo
423 423
                 // Binary casts need a special token.
424 424
                 if ($token[0] === 'b"') {
425 425
                     $finalTokens[$newStackPtr] = array(
426
-                                                  'code'    => T_BINARY_CAST,
427
-                                                  'type'    => 'T_BINARY_CAST',
428
-                                                  'content' => 'b',
429
-                                                 );
426
+                                                    'code'    => T_BINARY_CAST,
427
+                                                    'type'    => 'T_BINARY_CAST',
428
+                                                    'content' => 'b',
429
+                                                    );
430 430
                     $newStackPtr++;
431 431
                 }
432 432
 
@@ -710,10 +710,10 @@  discard block
 block discarded – undo
710 710
                 && $tokens[($stackPtr - 1)][0] !== T_OBJECT_OPERATOR
711 711
             ) {
712 712
                 $finalTokens[$newStackPtr] = array(
713
-                                              'content' => $token[1],
714
-                                              'code'    => T_TRAIT,
715
-                                              'type'    => 'T_TRAIT',
716
-                                             );
713
+                                                'content' => $token[1],
714
+                                                'code'    => T_TRAIT,
715
+                                                'type'    => 'T_TRAIT',
716
+                                                );
717 717
 
718 718
                 if (PHP_CODESNIFFER_VERBOSITY > 1) {
719 719
                     echo "\t\t* token $stackPtr changed from T_STRING to T_TRAIT".PHP_EOL;
@@ -738,11 +738,11 @@  discard block
 block discarded – undo
738 738
                 && $tokens[($stackPtr - 1)][0] !== T_PAAMAYIM_NEKUDOTAYIM
739 739
             ) {
740 740
                 $stopTokens = array(
741
-                               T_CASE               => true,
742
-                               T_SEMICOLON          => true,
743
-                               T_OPEN_CURLY_BRACKET => true,
744
-                               T_INLINE_THEN        => true,
745
-                              );
741
+                                T_CASE               => true,
742
+                                T_SEMICOLON          => true,
743
+                                T_OPEN_CURLY_BRACKET => true,
744
+                                T_INLINE_THEN        => true,
745
+                                );
746 746
 
747 747
                 for ($x = ($newStackPtr - 1); $x > 0; $x--) {
748 748
                     if (isset($stopTokens[$finalTokens[$x]['code']]) === true) {
@@ -754,10 +754,10 @@  discard block
 block discarded – undo
754 754
                     && $finalTokens[$x]['code'] !== T_INLINE_THEN
755 755
                 ) {
756 756
                     $finalTokens[$newStackPtr] = array(
757
-                                                  'content' => $token[1].':',
758
-                                                  'code'    => T_GOTO_LABEL,
759
-                                                  'type'    => 'T_GOTO_LABEL',
760
-                                                 );
757
+                                                    'content' => $token[1].':',
758
+                                                    'code'    => T_GOTO_LABEL,
759
+                                                    'type'    => 'T_GOTO_LABEL',
760
+                                                    );
761 761
 
762 762
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
763 763
                         echo "\t\t* token $stackPtr changed from T_STRING to T_GOTO_LABEL".PHP_EOL;
@@ -781,24 +781,24 @@  discard block
 block discarded – undo
781 781
                 && strtolower($token[1]) !== 'elseif'
782 782
             ) {
783 783
                 $finalTokens[$newStackPtr] = array(
784
-                                              'content' => substr($token[1], 0, 4),
785
-                                              'code'    => T_ELSE,
786
-                                              'type'    => 'T_ELSE',
787
-                                             );
784
+                                                'content' => substr($token[1], 0, 4),
785
+                                                'code'    => T_ELSE,
786
+                                                'type'    => 'T_ELSE',
787
+                                                );
788 788
 
789 789
                 $newStackPtr++;
790 790
                 $finalTokens[$newStackPtr] = array(
791
-                                              'content' => substr($token[1], 4, -2),
792
-                                              'code'    => T_WHITESPACE,
793
-                                              'type'    => 'T_WHITESPACE',
794
-                                             );
791
+                                                'content' => substr($token[1], 4, -2),
792
+                                                'code'    => T_WHITESPACE,
793
+                                                'type'    => 'T_WHITESPACE',
794
+                                                );
795 795
 
796 796
                 $newStackPtr++;
797 797
                 $finalTokens[$newStackPtr] = array(
798
-                                              'content' => substr($token[1], -2),
799
-                                              'code'    => T_IF,
800
-                                              'type'    => 'T_IF',
801
-                                             );
798
+                                                'content' => substr($token[1], -2),
799
+                                                'code'    => T_IF,
800
+                                                'type'    => 'T_IF',
801
+                                                );
802 802
 
803 803
                 if (PHP_CODESNIFFER_VERBOSITY > 1) {
804 804
                     echo "\t\t* token $stackPtr changed from T_ELSEIF to T_ELSE/T_WHITESPACE/T_IF".PHP_EOL;
@@ -815,10 +815,10 @@  discard block
 block discarded – undo
815 815
 
816 816
             if ($tokenIsArray === true && token_name($token[0]) === 'T_HASHBANG') {
817 817
                 $finalTokens[$newStackPtr] = array(
818
-                                              'content' => $token[1],
819
-                                              'code'    => T_INLINE_HTML,
820
-                                              'type'    => 'T_INLINE_HTML',
821
-                                             );
818
+                                                'content' => $token[1],
819
+                                                'code'    => T_INLINE_HTML,
820
+                                                'type'    => 'T_INLINE_HTML',
821
+                                                );
822 822
 
823 823
                 if (PHP_CODESNIFFER_VERBOSITY > 1) {
824 824
                     echo "\t\t* token $stackPtr changed from T_HASHBANG to T_INLINE_HTML".PHP_EOL;
@@ -839,10 +839,10 @@  discard block
 block discarded – undo
839 839
                 $tokenLines = explode($eolChar, $token[1]);
840 840
                 $numLines   = count($tokenLines);
841 841
                 $newToken   = array(
842
-                               'type'    => token_name($token[0]),
843
-                               'code'    => $token[0],
844
-                               'content' => '',
845
-                              );
842
+                                'type'    => token_name($token[0]),
843
+                                'code'    => $token[0],
844
+                                'content' => '',
845
+                                );
846 846
 
847 847
                 for ($i = 0; $i < $numLines; $i++) {
848 848
                     $newToken['content'] = $tokenLines[$i];
@@ -873,13 +873,13 @@  discard block
 block discarded – undo
873 873
                                 T_USE                  => true,
874 874
                                 T_NAMESPACE            => true,
875 875
                                 T_PAAMAYIM_NEKUDOTAYIM => true,
876
-                               );
876
+                                );
877 877
                     if (isset($context[$finalTokens[$lastNotEmptyToken]['code']]) === true) {
878 878
                         $finalTokens[$newStackPtr] = array(
879
-                                                      'content' => $token[1],
880
-                                                      'code'    => T_STRING,
881
-                                                      'type'    => 'T_STRING',
882
-                                                     );
879
+                                                        'content' => $token[1],
880
+                                                        'code'    => T_STRING,
881
+                                                        'type'    => 'T_STRING',
882
+                                                        );
883 883
                         $newStackPtr++;
884 884
                         continue;
885 885
                     }
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
                             T_CLOSE_PARENTHESIS    => T_CLOSE_PARENTHESIS,
1181 1181
                             T_VARIABLE             => T_VARIABLE,
1182 1182
                             T_STRING               => T_STRING,
1183
-                           );
1183
+                            );
1184 1184
 
1185 1185
                 if (isset($allowed[$tokens[$x]['code']]) === false
1186 1186
                     && isset($tokens[$i]['bracket_closer']) === true
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
                             T_OBJECT_OPERATOR      => true,
1243 1243
                             T_NS_SEPARATOR         => true,
1244 1244
                             T_PAAMAYIM_NEKUDOTAYIM => true,
1245
-                           );
1245
+                            );
1246 1246
                 if (isset($context[$tokens[$x]['code']]) === true) {
1247 1247
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
1248 1248
                         $line = $tokens[$i]['line'];
@@ -1475,13 +1475,13 @@  discard block
 block discarded – undo
1475 1475
             self::$_resolveTokenCache[$cacheKey] = $newToken;
1476 1476
         } else if ($token[0] === T_CURLY_OPEN) {
1477 1477
             $newToken = array(
1478
-                         'code' => T_OPEN_CURLY_BRACKET,
1479
-                         'type' => 'T_OPEN_CURLY_BRACKET',
1478
+                            'code' => T_OPEN_CURLY_BRACKET,
1479
+                            'type' => 'T_OPEN_CURLY_BRACKET',
1480 1480
                         );
1481 1481
         } else {
1482 1482
             $newToken = array(
1483
-                         'code' => $token[0],
1484
-                         'type' => token_name($token[0]),
1483
+                            'code' => $token[0],
1484
+                            'type' => token_name($token[0]),
1485 1485
                         );
1486 1486
 
1487 1487
             self::$_resolveTokenCache[$token[0]] = $newToken;
Please login to merge, or discard this patch.
Switch Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -1450,24 +1450,24 @@  discard block
 block discarded – undo
1450 1450
 
1451 1451
         if ($token[0] === T_STRING) {
1452 1452
             switch ($cacheKey) {
1453
-            case 'false':
1454
-                $newToken['type'] = 'T_FALSE';
1455
-                break;
1456
-            case 'true':
1457
-                $newToken['type'] = 'T_TRUE';
1458
-                break;
1459
-            case 'null':
1460
-                $newToken['type'] = 'T_NULL';
1461
-                break;
1462
-            case 'self':
1463
-                $newToken['type'] = 'T_SELF';
1464
-                break;
1465
-            case 'parent':
1466
-                $newToken['type'] = 'T_PARENT';
1467
-                break;
1468
-            default:
1469
-                $newToken['type'] = 'T_STRING';
1470
-                break;
1453
+                case 'false':
1454
+                    $newToken['type'] = 'T_FALSE';
1455
+                    break;
1456
+                case 'true':
1457
+                    $newToken['type'] = 'T_TRUE';
1458
+                    break;
1459
+                case 'null':
1460
+                    $newToken['type'] = 'T_NULL';
1461
+                    break;
1462
+                case 'self':
1463
+                    $newToken['type'] = 'T_SELF';
1464
+                    break;
1465
+                case 'parent':
1466
+                    $newToken['type'] = 'T_PARENT';
1467
+                    break;
1468
+                default:
1469
+                    $newToken['type'] = 'T_STRING';
1470
+                    break;
1471 1471
             }
1472 1472
 
1473 1473
             $newToken['code'] = constant($newToken['type']);
@@ -1509,87 +1509,87 @@  discard block
 block discarded – undo
1509 1509
         $newToken = array();
1510 1510
 
1511 1511
         switch ($token) {
1512
-        case '{':
1513
-            $newToken['type'] = 'T_OPEN_CURLY_BRACKET';
1514
-            break;
1515
-        case '}':
1516
-            $newToken['type'] = 'T_CLOSE_CURLY_BRACKET';
1517
-            break;
1518
-        case '[':
1519
-            $newToken['type'] = 'T_OPEN_SQUARE_BRACKET';
1520
-            break;
1521
-        case ']':
1522
-            $newToken['type'] = 'T_CLOSE_SQUARE_BRACKET';
1523
-            break;
1524
-        case '(':
1525
-            $newToken['type'] = 'T_OPEN_PARENTHESIS';
1526
-            break;
1527
-        case ')':
1528
-            $newToken['type'] = 'T_CLOSE_PARENTHESIS';
1529
-            break;
1530
-        case ':':
1531
-            $newToken['type'] = 'T_COLON';
1532
-            break;
1533
-        case '.':
1534
-            $newToken['type'] = 'T_STRING_CONCAT';
1535
-            break;
1536
-        case '?':
1537
-            $newToken['type'] = 'T_INLINE_THEN';
1538
-            break;
1539
-        case ';':
1540
-            $newToken['type'] = 'T_SEMICOLON';
1541
-            break;
1542
-        case '=':
1543
-            $newToken['type'] = 'T_EQUAL';
1544
-            break;
1545
-        case '*':
1546
-            $newToken['type'] = 'T_MULTIPLY';
1547
-            break;
1548
-        case '/':
1549
-            $newToken['type'] = 'T_DIVIDE';
1550
-            break;
1551
-        case '+':
1552
-            $newToken['type'] = 'T_PLUS';
1553
-            break;
1554
-        case '-':
1555
-            $newToken['type'] = 'T_MINUS';
1556
-            break;
1557
-        case '%':
1558
-            $newToken['type'] = 'T_MODULUS';
1559
-            break;
1560
-        case '^':
1561
-            $newToken['type'] = 'T_BITWISE_XOR';
1562
-            break;
1563
-        case '&':
1564
-            $newToken['type'] = 'T_BITWISE_AND';
1565
-            break;
1566
-        case '|':
1567
-            $newToken['type'] = 'T_BITWISE_OR';
1568
-            break;
1569
-        case '<':
1570
-            $newToken['type'] = 'T_LESS_THAN';
1571
-            break;
1572
-        case '>':
1573
-            $newToken['type'] = 'T_GREATER_THAN';
1574
-            break;
1575
-        case '!':
1576
-            $newToken['type'] = 'T_BOOLEAN_NOT';
1577
-            break;
1578
-        case ',':
1579
-            $newToken['type'] = 'T_COMMA';
1580
-            break;
1581
-        case '@':
1582
-            $newToken['type'] = 'T_ASPERAND';
1583
-            break;
1584
-        case '$':
1585
-            $newToken['type'] = 'T_DOLLAR';
1586
-            break;
1587
-        case '`':
1588
-            $newToken['type'] = 'T_BACKTICK';
1589
-            break;
1590
-        default:
1591
-            $newToken['type'] = 'T_NONE';
1592
-            break;
1512
+            case '{':
1513
+                $newToken['type'] = 'T_OPEN_CURLY_BRACKET';
1514
+                break;
1515
+            case '}':
1516
+                $newToken['type'] = 'T_CLOSE_CURLY_BRACKET';
1517
+                break;
1518
+            case '[':
1519
+                $newToken['type'] = 'T_OPEN_SQUARE_BRACKET';
1520
+                break;
1521
+            case ']':
1522
+                $newToken['type'] = 'T_CLOSE_SQUARE_BRACKET';
1523
+                break;
1524
+            case '(':
1525
+                $newToken['type'] = 'T_OPEN_PARENTHESIS';
1526
+                break;
1527
+            case ')':
1528
+                $newToken['type'] = 'T_CLOSE_PARENTHESIS';
1529
+                break;
1530
+            case ':':
1531
+                $newToken['type'] = 'T_COLON';
1532
+                break;
1533
+            case '.':
1534
+                $newToken['type'] = 'T_STRING_CONCAT';
1535
+                break;
1536
+            case '?':
1537
+                $newToken['type'] = 'T_INLINE_THEN';
1538
+                break;
1539
+            case ';':
1540
+                $newToken['type'] = 'T_SEMICOLON';
1541
+                break;
1542
+            case '=':
1543
+                $newToken['type'] = 'T_EQUAL';
1544
+                break;
1545
+            case '*':
1546
+                $newToken['type'] = 'T_MULTIPLY';
1547
+                break;
1548
+            case '/':
1549
+                $newToken['type'] = 'T_DIVIDE';
1550
+                break;
1551
+            case '+':
1552
+                $newToken['type'] = 'T_PLUS';
1553
+                break;
1554
+            case '-':
1555
+                $newToken['type'] = 'T_MINUS';
1556
+                break;
1557
+            case '%':
1558
+                $newToken['type'] = 'T_MODULUS';
1559
+                break;
1560
+            case '^':
1561
+                $newToken['type'] = 'T_BITWISE_XOR';
1562
+                break;
1563
+            case '&':
1564
+                $newToken['type'] = 'T_BITWISE_AND';
1565
+                break;
1566
+            case '|':
1567
+                $newToken['type'] = 'T_BITWISE_OR';
1568
+                break;
1569
+            case '<':
1570
+                $newToken['type'] = 'T_LESS_THAN';
1571
+                break;
1572
+            case '>':
1573
+                $newToken['type'] = 'T_GREATER_THAN';
1574
+                break;
1575
+            case '!':
1576
+                $newToken['type'] = 'T_BOOLEAN_NOT';
1577
+                break;
1578
+            case ',':
1579
+                $newToken['type'] = 'T_COMMA';
1580
+                break;
1581
+            case '@':
1582
+                $newToken['type'] = 'T_ASPERAND';
1583
+                break;
1584
+            case '$':
1585
+                $newToken['type'] = 'T_DOLLAR';
1586
+                break;
1587
+            case '`':
1588
+                $newToken['type'] = 'T_BACKTICK';
1589
+                break;
1590
+            default:
1591
+                $newToken['type'] = 'T_NONE';
1592
+                break;
1593 1593
         }//end switch
1594 1594
 
1595 1595
         $newToken['code']    = constant($newToken['type']);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@
 block discarded – undo
260 260
      *
261 261
      * @return array
262 262
      */
263
-    public function tokenizeString($string, $eolChar='\n')
263
+    public function tokenizeString($string, $eolChar = '\n')
264 264
     {
265 265
         if (PHP_CODESNIFFER_VERBOSITY > 1) {
266 266
             echo "\t*** START JS TOKENIZING ***".PHP_EOL;
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/Comment.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
         $string  = ltrim($string, '/*');
59 59
 
60 60
         $tokens[$stackPtr] = array(
61
-                              'content'      => $openTag,
62
-                              'code'         => T_DOC_COMMENT_OPEN_TAG,
63
-                              'type'         => 'T_DOC_COMMENT_OPEN_TAG',
64
-                              'comment_tags' => array(),
65
-                             );
61
+                                'content'      => $openTag,
62
+                                'code'         => T_DOC_COMMENT_OPEN_TAG,
63
+                                'type'         => 'T_DOC_COMMENT_OPEN_TAG',
64
+                                'comment_tags' => array(),
65
+                                );
66 66
 
67 67
         $openPtr = $stackPtr;
68 68
         $stackPtr++;
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
         */
80 80
 
81 81
         $closeTag = array(
82
-                     'content'        => substr($string, strlen(rtrim($string, '/*'))),
83
-                     'code'           => T_DOC_COMMENT_CLOSE_TAG,
84
-                     'type'           => 'T_DOC_COMMENT_CLOSE_TAG',
85
-                     'comment_opener' => $openPtr,
82
+                        'content'        => substr($string, strlen(rtrim($string, '/*'))),
83
+                        'code'           => T_DOC_COMMENT_CLOSE_TAG,
84
+                        'type'           => 'T_DOC_COMMENT_CLOSE_TAG',
85
+                        'comment_opener' => $openPtr,
86 86
                     );
87 87
 
88 88
         $string = rtrim($string, '/*');
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                 // This is a function or class doc block line.
126 126
                 $char++;
127 127
                 $tokens[$stackPtr] = array(
128
-                                      'content' => '*',
129
-                                      'code'    => T_DOC_COMMENT_STAR,
130
-                                      'type'    => 'T_DOC_COMMENT_STAR',
131
-                                     );
128
+                                        'content' => '*',
129
+                                        'code'    => T_DOC_COMMENT_STAR,
130
+                                        'type'    => 'T_DOC_COMMENT_STAR',
131
+                                        );
132 132
 
133 133
                 $stackPtr++;
134 134
 
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
                 $tagName  = $matches[0];
205 205
                 $start   += strlen($tagName);
206 206
                 $tokens[] = array(
207
-                             'content' => $tagName,
208
-                             'code'    => T_DOC_COMMENT_TAG,
209
-                             'type'    => 'T_DOC_COMMENT_TAG',
207
+                                'content' => $tagName,
208
+                                'code'    => T_DOC_COMMENT_TAG,
209
+                                'type'    => 'T_DOC_COMMENT_TAG',
210 210
                             );
211 211
 
212 212
                 // Then there will be some whitespace.
@@ -226,17 +226,17 @@  discard block
 block discarded – undo
226 226
 
227 227
         if ($eol > $start) {
228 228
             $tokens[] = array(
229
-                         'content' => substr($string, $start, ($eol - $start)),
230
-                         'code'    => T_DOC_COMMENT_STRING,
231
-                         'type'    => 'T_DOC_COMMENT_STRING',
229
+                            'content' => substr($string, $start, ($eol - $start)),
230
+                            'code'    => T_DOC_COMMENT_STRING,
231
+                            'type'    => 'T_DOC_COMMENT_STRING',
232 232
                         );
233 233
         }
234 234
 
235 235
         if ($eol !== $end) {
236 236
             $tokens[] = array(
237
-                         'content' => substr($string, $eol, strlen($eolChar)),
238
-                         'code'    => T_DOC_COMMENT_WHITESPACE,
239
-                         'type'    => 'T_DOC_COMMENT_WHITESPACE',
237
+                            'content' => substr($string, $eol, strlen($eolChar)),
238
+                            'code'    => T_DOC_COMMENT_WHITESPACE,
239
+                            'type'    => 'T_DOC_COMMENT_WHITESPACE',
240 240
                         );
241 241
         }
242 242
 
@@ -270,10 +270,10 @@  discard block
 block discarded – undo
270 270
         }
271 271
 
272 272
         $token = array(
273
-                  'content' => $space,
274
-                  'code'    => T_DOC_COMMENT_WHITESPACE,
275
-                  'type'    => 'T_DOC_COMMENT_WHITESPACE',
276
-                 );
273
+                    'content' => $space,
274
+                    'code'    => T_DOC_COMMENT_WHITESPACE,
275
+                    'type'    => 'T_DOC_COMMENT_WHITESPACE',
276
+                    );
277 277
 
278 278
         return $token;
279 279
 
Please login to merge, or discard this patch.
CodeSniffer/Tokenizers/JS.php 2 patches
Indentation   +197 added lines, -197 removed lines patch added patch discarded remove patch
@@ -46,100 +46,100 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public $scopeOpeners = array(
48 48
                             T_IF       => array(
49
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
50
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
51
-                                           'strict' => false,
52
-                                           'shared' => false,
53
-                                           'with'   => array(),
54
-                                          ),
49
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
50
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
51
+                                            'strict' => false,
52
+                                            'shared' => false,
53
+                                            'with'   => array(),
54
+                                            ),
55 55
                             T_TRY      => array(
56
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
57
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
58
-                                           'strict' => true,
59
-                                           'shared' => false,
60
-                                           'with'   => array(),
61
-                                          ),
56
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
57
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
58
+                                            'strict' => true,
59
+                                            'shared' => false,
60
+                                            'with'   => array(),
61
+                                            ),
62 62
                             T_CATCH    => array(
63
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
64
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
65
-                                           'strict' => true,
66
-                                           'shared' => false,
67
-                                           'with'   => array(),
68
-                                          ),
63
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
64
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
65
+                                            'strict' => true,
66
+                                            'shared' => false,
67
+                                            'with'   => array(),
68
+                                            ),
69 69
                             T_ELSE     => array(
70
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
71
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
72
-                                           'strict' => false,
73
-                                           'shared' => false,
74
-                                           'with'   => array(),
75
-                                          ),
70
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
71
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
72
+                                            'strict' => false,
73
+                                            'shared' => false,
74
+                                            'with'   => array(),
75
+                                            ),
76 76
                             T_FOR      => array(
77
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
78
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
79
-                                           'strict' => false,
80
-                                           'shared' => false,
81
-                                           'with'   => array(),
82
-                                          ),
77
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
78
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
79
+                                            'strict' => false,
80
+                                            'shared' => false,
81
+                                            'with'   => array(),
82
+                                            ),
83 83
                             T_FUNCTION => array(
84
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
85
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
86
-                                           'strict' => false,
87
-                                           'shared' => false,
88
-                                           'with'   => array(),
89
-                                          ),
84
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
85
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
86
+                                            'strict' => false,
87
+                                            'shared' => false,
88
+                                            'with'   => array(),
89
+                                            ),
90 90
                             T_WHILE    => array(
91
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
92
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
93
-                                           'strict' => false,
94
-                                           'shared' => false,
95
-                                           'with'   => array(),
96
-                                          ),
91
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
92
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
93
+                                            'strict' => false,
94
+                                            'shared' => false,
95
+                                            'with'   => array(),
96
+                                            ),
97 97
                             T_DO       => array(
98
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
99
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
100
-                                           'strict' => true,
101
-                                           'shared' => false,
102
-                                           'with'   => array(),
103
-                                          ),
98
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
99
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
100
+                                            'strict' => true,
101
+                                            'shared' => false,
102
+                                            'with'   => array(),
103
+                                            ),
104 104
                             T_SWITCH   => array(
105
-                                           'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
106
-                                           'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
107
-                                           'strict' => true,
108
-                                           'shared' => false,
109
-                                           'with'   => array(),
110
-                                          ),
105
+                                            'start'  => array(T_OPEN_CURLY_BRACKET => T_OPEN_CURLY_BRACKET),
106
+                                            'end'    => array(T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET),
107
+                                            'strict' => true,
108
+                                            'shared' => false,
109
+                                            'with'   => array(),
110
+                                            ),
111 111
                             T_CASE     => array(
112
-                                           'start'  => array(T_COLON => T_COLON),
113
-                                           'end'    => array(
112
+                                            'start'  => array(T_COLON => T_COLON),
113
+                                            'end'    => array(
114 114
                                                         T_BREAK    => T_BREAK,
115 115
                                                         T_RETURN   => T_RETURN,
116 116
                                                         T_CONTINUE => T_CONTINUE,
117 117
                                                         T_THROW    => T_THROW,
118
-                                                       ),
119
-                                           'strict' => true,
120
-                                           'shared' => true,
121
-                                           'with'   => array(
118
+                                                        ),
119
+                                            'strict' => true,
120
+                                            'shared' => true,
121
+                                            'with'   => array(
122 122
                                                         T_DEFAULT => T_DEFAULT,
123 123
                                                         T_CASE    => T_CASE,
124 124
                                                         T_SWITCH  => T_SWITCH,
125
-                                                       ),
126
-                                          ),
125
+                                                        ),
126
+                                            ),
127 127
                             T_DEFAULT  => array(
128
-                                           'start'  => array(T_COLON => T_COLON),
129
-                                           'end'    => array(
128
+                                            'start'  => array(T_COLON => T_COLON),
129
+                                            'end'    => array(
130 130
                                                         T_BREAK    => T_BREAK,
131 131
                                                         T_RETURN   => T_RETURN,
132 132
                                                         T_CONTINUE => T_CONTINUE,
133 133
                                                         T_THROW    => T_THROW,
134
-                                                       ),
135
-                                           'strict' => true,
136
-                                           'shared' => true,
137
-                                           'with'   => array(
134
+                                                        ),
135
+                                            'strict' => true,
136
+                                            'shared' => true,
137
+                                            'with'   => array(
138 138
                                                         T_CASE   => T_CASE,
139 139
                                                         T_SWITCH => T_SWITCH,
140
-                                                       ),
141
-                                          ),
142
-                           );
140
+                                                        ),
141
+                                            ),
142
+                            );
143 143
 
144 144
     /**
145 145
      * A list of tokens that end the scope.
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
      * @var array
152 152
      */
153 153
     public $endScopeTokens = array(
154
-                              T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
155
-                              T_BREAK               => T_BREAK,
156
-                             );
154
+                                T_CLOSE_CURLY_BRACKET => T_CLOSE_CURLY_BRACKET,
155
+                                T_BREAK               => T_BREAK,
156
+                                );
157 157
 
158 158
     /**
159 159
      * A list of special JS tokens and their types.
@@ -161,71 +161,71 @@  discard block
 block discarded – undo
161 161
      * @var array
162 162
      */
163 163
     protected $tokenValues = array(
164
-                              'function'  => 'T_FUNCTION',
165
-                              'prototype' => 'T_PROTOTYPE',
166
-                              'try'       => 'T_TRY',
167
-                              'catch'     => 'T_CATCH',
168
-                              'return'    => 'T_RETURN',
169
-                              'throw'     => 'T_THROW',
170
-                              'break'     => 'T_BREAK',
171
-                              'switch'    => 'T_SWITCH',
172
-                              'continue'  => 'T_CONTINUE',
173
-                              'if'        => 'T_IF',
174
-                              'else'      => 'T_ELSE',
175
-                              'do'        => 'T_DO',
176
-                              'while'     => 'T_WHILE',
177
-                              'for'       => 'T_FOR',
178
-                              'var'       => 'T_VAR',
179
-                              'case'      => 'T_CASE',
180
-                              'default'   => 'T_DEFAULT',
181
-                              'true'      => 'T_TRUE',
182
-                              'false'     => 'T_FALSE',
183
-                              'null'      => 'T_NULL',
184
-                              'this'      => 'T_THIS',
185
-                              'typeof'    => 'T_TYPEOF',
186
-                              '('         => 'T_OPEN_PARENTHESIS',
187
-                              ')'         => 'T_CLOSE_PARENTHESIS',
188
-                              '{'         => 'T_OPEN_CURLY_BRACKET',
189
-                              '}'         => 'T_CLOSE_CURLY_BRACKET',
190
-                              '['         => 'T_OPEN_SQUARE_BRACKET',
191
-                              ']'         => 'T_CLOSE_SQUARE_BRACKET',
192
-                              '?'         => 'T_INLINE_THEN',
193
-                              '.'         => 'T_OBJECT_OPERATOR',
194
-                              '+'         => 'T_PLUS',
195
-                              '-'         => 'T_MINUS',
196
-                              '*'         => 'T_MULTIPLY',
197
-                              '%'         => 'T_MODULUS',
198
-                              '/'         => 'T_DIVIDE',
199
-                              '^'         => 'T_LOGICAL_XOR',
200
-                              ','         => 'T_COMMA',
201
-                              ';'         => 'T_SEMICOLON',
202
-                              ':'         => 'T_COLON',
203
-                              '<'         => 'T_LESS_THAN',
204
-                              '>'         => 'T_GREATER_THAN',
205
-                              '<='        => 'T_IS_SMALLER_OR_EQUAL',
206
-                              '>='        => 'T_IS_GREATER_OR_EQUAL',
207
-                              '!'         => 'T_BOOLEAN_NOT',
208
-                              '||'        => 'T_BOOLEAN_OR',
209
-                              '&&'        => 'T_BOOLEAN_AND',
210
-                              '|'         => 'T_BITWISE_OR',
211
-                              '&'         => 'T_BITWISE_AND',
212
-                              '!='        => 'T_IS_NOT_EQUAL',
213
-                              '!=='       => 'T_IS_NOT_IDENTICAL',
214
-                              '='         => 'T_EQUAL',
215
-                              '=='        => 'T_IS_EQUAL',
216
-                              '==='       => 'T_IS_IDENTICAL',
217
-                              '-='        => 'T_MINUS_EQUAL',
218
-                              '+='        => 'T_PLUS_EQUAL',
219
-                              '*='        => 'T_MUL_EQUAL',
220
-                              '/='        => 'T_DIV_EQUAL',
221
-                              '%='        => 'T_MOD_EQUAL',
222
-                              '++'        => 'T_INC',
223
-                              '--'        => 'T_DEC',
224
-                              '//'        => 'T_COMMENT',
225
-                              '/*'        => 'T_COMMENT',
226
-                              '/**'       => 'T_DOC_COMMENT',
227
-                              '*/'        => 'T_COMMENT',
228
-                             );
164
+                                'function'  => 'T_FUNCTION',
165
+                                'prototype' => 'T_PROTOTYPE',
166
+                                'try'       => 'T_TRY',
167
+                                'catch'     => 'T_CATCH',
168
+                                'return'    => 'T_RETURN',
169
+                                'throw'     => 'T_THROW',
170
+                                'break'     => 'T_BREAK',
171
+                                'switch'    => 'T_SWITCH',
172
+                                'continue'  => 'T_CONTINUE',
173
+                                'if'        => 'T_IF',
174
+                                'else'      => 'T_ELSE',
175
+                                'do'        => 'T_DO',
176
+                                'while'     => 'T_WHILE',
177
+                                'for'       => 'T_FOR',
178
+                                'var'       => 'T_VAR',
179
+                                'case'      => 'T_CASE',
180
+                                'default'   => 'T_DEFAULT',
181
+                                'true'      => 'T_TRUE',
182
+                                'false'     => 'T_FALSE',
183
+                                'null'      => 'T_NULL',
184
+                                'this'      => 'T_THIS',
185
+                                'typeof'    => 'T_TYPEOF',
186
+                                '('         => 'T_OPEN_PARENTHESIS',
187
+                                ')'         => 'T_CLOSE_PARENTHESIS',
188
+                                '{'         => 'T_OPEN_CURLY_BRACKET',
189
+                                '}'         => 'T_CLOSE_CURLY_BRACKET',
190
+                                '['         => 'T_OPEN_SQUARE_BRACKET',
191
+                                ']'         => 'T_CLOSE_SQUARE_BRACKET',
192
+                                '?'         => 'T_INLINE_THEN',
193
+                                '.'         => 'T_OBJECT_OPERATOR',
194
+                                '+'         => 'T_PLUS',
195
+                                '-'         => 'T_MINUS',
196
+                                '*'         => 'T_MULTIPLY',
197
+                                '%'         => 'T_MODULUS',
198
+                                '/'         => 'T_DIVIDE',
199
+                                '^'         => 'T_LOGICAL_XOR',
200
+                                ','         => 'T_COMMA',
201
+                                ';'         => 'T_SEMICOLON',
202
+                                ':'         => 'T_COLON',
203
+                                '<'         => 'T_LESS_THAN',
204
+                                '>'         => 'T_GREATER_THAN',
205
+                                '<='        => 'T_IS_SMALLER_OR_EQUAL',
206
+                                '>='        => 'T_IS_GREATER_OR_EQUAL',
207
+                                '!'         => 'T_BOOLEAN_NOT',
208
+                                '||'        => 'T_BOOLEAN_OR',
209
+                                '&&'        => 'T_BOOLEAN_AND',
210
+                                '|'         => 'T_BITWISE_OR',
211
+                                '&'         => 'T_BITWISE_AND',
212
+                                '!='        => 'T_IS_NOT_EQUAL',
213
+                                '!=='       => 'T_IS_NOT_IDENTICAL',
214
+                                '='         => 'T_EQUAL',
215
+                                '=='        => 'T_IS_EQUAL',
216
+                                '==='       => 'T_IS_IDENTICAL',
217
+                                '-='        => 'T_MINUS_EQUAL',
218
+                                '+='        => 'T_PLUS_EQUAL',
219
+                                '*='        => 'T_MUL_EQUAL',
220
+                                '/='        => 'T_DIV_EQUAL',
221
+                                '%='        => 'T_MOD_EQUAL',
222
+                                '++'        => 'T_INC',
223
+                                '--'        => 'T_DEC',
224
+                                '//'        => 'T_COMMENT',
225
+                                '/*'        => 'T_COMMENT',
226
+                                '/**'       => 'T_DOC_COMMENT',
227
+                                '*/'        => 'T_COMMENT',
228
+                                );
229 229
 
230 230
     /**
231 231
      * A list string delimiters.
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
      * @var array
234 234
      */
235 235
     protected $stringTokens = array(
236
-                               '\'' => '\'',
237
-                               '"'  => '"',
238
-                              );
236
+                                '\'' => '\'',
237
+                                '"'  => '"',
238
+                                );
239 239
 
240 240
     /**
241 241
      * A list tokens that start and end comments.
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                                 '//'  => null,
247 247
                                 '/*'  => '*/',
248 248
                                 '/**' => '*/',
249
-                               );
249
+                                );
250 250
 
251 251
 
252 252
     /**
@@ -284,9 +284,9 @@  discard block
 block discarded – undo
284 284
         $commentTokenizer = new PHP_CodeSniffer_Tokenizers_Comment();
285 285
 
286 286
         $tokens[] = array(
287
-                     'code'    => T_OPEN_TAG,
288
-                     'type'    => 'T_OPEN_TAG',
289
-                     'content' => '',
287
+                        'code'    => T_OPEN_TAG,
288
+                        'type'    => 'T_OPEN_TAG',
289
+                        'content' => '',
290 290
                     );
291 291
 
292 292
         // Convert newlines to single characters for ease of
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
                 // add a character, store the whitespace first.
319 319
                 if (trim($char) !== '' && trim($buffer) === '') {
320 320
                     $tokens[] = array(
321
-                                 'code'    => T_WHITESPACE,
322
-                                 'type'    => 'T_WHITESPACE',
323
-                                 'content' => str_replace("\n", $eolChar, $buffer),
321
+                                    'code'    => T_WHITESPACE,
322
+                                    'type'    => 'T_WHITESPACE',
323
+                                    'content' => str_replace("\n", $eolChar, $buffer),
324 324
                                 );
325 325
 
326 326
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -339,9 +339,9 @@  discard block
 block discarded – undo
339 339
                     && trim($buffer) !== ''
340 340
                 ) {
341 341
                     $tokens[] = array(
342
-                                 'code'    => T_STRING,
343
-                                 'type'    => 'T_STRING',
344
-                                 'content' => str_replace("\n", $eolChar, $buffer),
342
+                                    'code'    => T_STRING,
343
+                                    'type'    => 'T_STRING',
344
+                                    'content' => str_replace("\n", $eolChar, $buffer),
345 345
                                 );
346 346
 
347 347
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -371,9 +371,9 @@  discard block
 block discarded – undo
371 371
                         // There is an even number escape chars,
372 372
                         // so this is not escaped, it is the end of the string.
373 373
                         $tokens[] = array(
374
-                                     'code'    => T_CONSTANT_ENCAPSED_STRING,
375
-                                     'type'    => 'T_CONSTANT_ENCAPSED_STRING',
376
-                                     'content' => str_replace("\n", $eolChar, $buffer).$char,
374
+                                        'code'    => T_CONSTANT_ENCAPSED_STRING,
375
+                                        'type'    => 'T_CONSTANT_ENCAPSED_STRING',
376
+                                        'content' => str_replace("\n", $eolChar, $buffer).$char,
377 377
                                     );
378 378
 
379 379
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -439,9 +439,9 @@  discard block
 block discarded – undo
439 439
 
440 440
                 if ($regex !== null) {
441 441
                     $tokens[] = array(
442
-                                 'code'    => T_REGULAR_EXPRESSION,
443
-                                 'type'    => 'T_REGULAR_EXPRESSION',
444
-                                 'content' => $regex['content'],
442
+                                    'code'    => T_REGULAR_EXPRESSION,
443
+                                    'type'    => 'T_REGULAR_EXPRESSION',
444
+                                    'content' => $regex['content'],
445 445
                                 );
446 446
 
447 447
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -521,9 +521,9 @@  discard block
 block discarded – undo
521 521
 
522 522
                     $value    = $this->tokenValues[strtolower($buffer)];
523 523
                     $tokens[] = array(
524
-                                 'code'    => constant($value),
525
-                                 'type'    => $value,
526
-                                 'content' => $buffer,
524
+                                    'code'    => constant($value),
525
+                                    'type'    => $value,
526
+                                    'content' => $buffer,
527 527
                                 );
528 528
 
529 529
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -540,9 +540,9 @@  discard block
 block discarded – undo
540 540
                 $newContent = substr(str_replace("\n", $eolChar, $buffer), 0, -1);
541 541
                 if ($newContent !== '') {
542 542
                     $tokens[] = array(
543
-                                 'code'    => T_STRING,
544
-                                 'type'    => 'T_STRING',
545
-                                 'content' => $newContent,
543
+                                    'code'    => T_STRING,
544
+                                    'type'    => 'T_STRING',
545
+                                    'content' => $newContent,
546 546
                                 );
547 547
 
548 548
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -588,9 +588,9 @@  discard block
 block discarded – undo
588 588
                 if ($matchedToken === false) {
589 589
                     $value    = $this->tokenValues[strtolower($char)];
590 590
                     $tokens[] = array(
591
-                                 'code'    => constant($value),
592
-                                 'type'    => $value,
593
-                                 'content' => $char,
591
+                                    'code'    => constant($value),
592
+                                    'type'    => $value,
593
+                                    'content' => $char,
594 594
                                 );
595 595
 
596 596
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -626,9 +626,9 @@  discard block
 block discarded – undo
626 626
                         $lastChar = $lastChars[$x];
627 627
                         $value    = $this->tokenValues[strtolower($lastChar)];
628 628
                         $tokens[] = array(
629
-                                     'code'    => constant($value),
630
-                                     'type'    => $value,
631
-                                     'content' => $lastChar,
629
+                                        'code'    => constant($value),
630
+                                        'type'    => $value,
631
+                                        'content' => $lastChar,
632 632
                                     );
633 633
 
634 634
                         if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -664,9 +664,9 @@  discard block
 block discarded – undo
664 664
 
665 665
                 if ($inComment === '' && $cleanBuffer === false) {
666 666
                     $tokens[] = array(
667
-                                 'code'    => T_STRING,
668
-                                 'type'    => 'T_STRING',
669
-                                 'content' => str_replace("\n", $eolChar, $buffer),
667
+                                    'code'    => T_STRING,
668
+                                    'type'    => 'T_STRING',
669
+                                    'content' => str_replace("\n", $eolChar, $buffer),
670 670
                                 );
671 671
 
672 672
                     if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -687,9 +687,9 @@  discard block
 block discarded – undo
687 687
         if (empty($buffer) === false) {
688 688
             // Buffer contains whitespace from the end of the file.
689 689
             $tokens[] = array(
690
-                         'code'    => T_WHITESPACE,
691
-                         'type'    => 'T_WHITESPACE',
692
-                         'content' => str_replace("\n", $eolChar, $buffer),
690
+                            'code'    => T_WHITESPACE,
691
+                            'type'    => 'T_WHITESPACE',
692
+                            'content' => str_replace("\n", $eolChar, $buffer),
693 693
                         );
694 694
 
695 695
             if (PHP_CODESNIFFER_VERBOSITY > 1) {
@@ -699,9 +699,9 @@  discard block
 block discarded – undo
699 699
         }
700 700
 
701 701
         $tokens[] = array(
702
-                     'code'    => T_CLOSE_TAG,
703
-                     'type'    => 'T_CLOSE_TAG',
704
-                     'content' => '',
702
+                        'code'    => T_CLOSE_TAG,
703
+                        'type'    => 'T_CLOSE_TAG',
704
+                        'content' => '',
705 705
                     );
706 706
 
707 707
         /*
@@ -880,19 +880,19 @@  discard block
 block discarded – undo
880 880
     public function getRegexToken($char, $string, $chars, $tokens, $eolChar)
881 881
     {
882 882
         $beforeTokens = array(
883
-                         T_EQUAL               => true,
884
-                         T_OPEN_PARENTHESIS    => true,
885
-                         T_OPEN_SQUARE_BRACKET => true,
886
-                         T_RETURN              => true,
887
-                         T_BOOLEAN_OR          => true,
888
-                         T_BOOLEAN_AND         => true,
889
-                         T_BITWISE_OR          => true,
890
-                         T_BITWISE_AND         => true,
891
-                         T_COMMA               => true,
892
-                         T_COLON               => true,
893
-                         T_TYPEOF              => true,
894
-                         T_INLINE_THEN         => true,
895
-                         T_INLINE_ELSE         => true,
883
+                            T_EQUAL               => true,
884
+                            T_OPEN_PARENTHESIS    => true,
885
+                            T_OPEN_SQUARE_BRACKET => true,
886
+                            T_RETURN              => true,
887
+                            T_BOOLEAN_OR          => true,
888
+                            T_BOOLEAN_AND         => true,
889
+                            T_BITWISE_OR          => true,
890
+                            T_BITWISE_AND         => true,
891
+                            T_COMMA               => true,
892
+                            T_COLON               => true,
893
+                            T_TYPEOF              => true,
894
+                            T_INLINE_THEN         => true,
895
+                            T_INLINE_ELSE         => true,
896 896
                         );
897 897
 
898 898
         $afterTokens = array(
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
                         '.'      => true,
905 905
                         ':'      => true,
906 906
                         $eolChar => true,
907
-                       );
907
+                        );
908 908
 
909 909
         // Find the last non-whitespace token that was added
910 910
         // to the tokens array.
@@ -993,10 +993,10 @@  discard block
 block discarded – undo
993 993
         }
994 994
 
995 995
         $token = array(
996
-                  'start'   => $char,
997
-                  'end'     => $regexEnd,
998
-                  'content' => $content,
999
-                 );
996
+                    'start'   => $char,
997
+                    'end'     => $regexEnd,
998
+                    'content' => $content,
999
+                    );
1000 1000
 
1001 1001
         return $token;
1002 1002
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@
 block discarded – undo
260 260
      *
261 261
      * @return array
262 262
      */
263
-    public function tokenizeString($string, $eolChar='\n')
263
+    public function tokenizeString($string, $eolChar = '\n')
264 264
     {
265 265
         if (PHP_CODESNIFFER_VERBOSITY > 1) {
266 266
             echo "\t*** START JS TOKENIZING ***".PHP_EOL;
Please login to merge, or discard this patch.
CodeSniffer/DocGenerators/Generator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      *
60 60
      * @see generate()
61 61
      */
62
-    public function __construct($standard, array $sniffs=array())
62
+    public function __construct($standard, array $sniffs = array())
63 63
     {
64 64
         $this->_standard = $standard;
65 65
         $this->_sniffs   = $sniffs;
Please login to merge, or discard this patch.
CodeSniffer/Reporting.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         return array(
286 286
                 'errors'   => $this->totalErrors,
287 287
                 'warnings' => $this->totalWarnings,
288
-               );
288
+                );
289 289
 
290 290
     }//end printReport()
291 291
 
@@ -302,12 +302,12 @@  discard block
 block discarded – undo
302 302
     public function prepareFileReport(PHP_CodeSniffer_File $phpcsFile)
303 303
     {
304 304
         $report = array(
305
-                   'filename' => $phpcsFile->getFilename(),
306
-                   'errors'   => $phpcsFile->getErrorCount(),
307
-                   'warnings' => $phpcsFile->getWarningCount(),
308
-                   'fixable'  => $phpcsFile->getFixableCount(),
309
-                   'messages' => array(),
310
-                  );
305
+                    'filename' => $phpcsFile->getFilename(),
306
+                    'errors'   => $phpcsFile->getErrorCount(),
307
+                    'warnings' => $phpcsFile->getWarningCount(),
308
+                    'fixable'  => $phpcsFile->getFixableCount(),
309
+                    'messages' => array(),
310
+                    );
311 311
 
312 312
         if ($report['errors'] === 0 && $report['warnings'] === 0) {
313 313
             // Prefect score!
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
                                     'severity' => $data['severity'],
332 332
                                     'fixable'  => $data['fixable'],
333 333
                                     'type'     => 'ERROR',
334
-                                   );
334
+                                    );
335 335
                 }//end foreach
336 336
 
337 337
                 $errors[$line][$column] = $newErrors;
@@ -349,12 +349,12 @@  discard block
 block discarded – undo
349 349
                 $newWarnings = array();
350 350
                 foreach ($colWarnings as $data) {
351 351
                     $newWarnings[] = array(
352
-                                      'message'  => $data['message'],
353
-                                      'source'   => $data['source'],
354
-                                      'severity' => $data['severity'],
355
-                                      'fixable'  => $data['fixable'],
356
-                                      'type'     => 'WARNING',
357
-                                     );
352
+                                        'message'  => $data['message'],
353
+                                        'source'   => $data['source'],
354
+                                        'severity' => $data['severity'],
355
+                                        'fixable'  => $data['fixable'],
356
+                                        'type'     => 'WARNING',
357
+                                        );
358 358
                 }//end foreach
359 359
 
360 360
                 if (isset($errors[$line]) === false) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -220,8 +220,8 @@
 block discarded – undo
220 220
         $report,
221 221
         $showSources,
222 222
         array $cliValues,
223
-        $reportFile='',
224
-        $reportWidth=80
223
+        $reportFile = '',
224
+        $reportWidth = 80
225 225
     ) {
226 226
         $reportClass = $this->factory($report);
227 227
         $report      = get_class($reportClass);
Please login to merge, or discard this patch.
CodeSniffer/Standards/PSR2/Sniffs/Classes/ClassDeclarationSniff.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                                     $prevContent,
91 91
                                     $stackPtrType,
92 92
                                     $spaces,
93
-                                   );
93
+                                    );
94 94
 
95 95
                     $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data);
96 96
                     if ($fix === true) {
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 $data        = array(
106 106
                                 $prevContent,
107 107
                                 $stackPtrType,
108
-                               );
108
+                                );
109 109
 
110 110
                 $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NewlineBeforeKeyword', $data);
111 111
                 if ($fix === true) {
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
             $found = strlen($gap);
138 138
             $error = 'Expected 1 space between %s keyword and %s name; %s found';
139 139
             $data  = array(
140
-                      $stackPtrType,
141
-                      $stackPtrType,
142
-                      $found,
143
-                     );
140
+                        $stackPtrType,
141
+                        $stackPtrType,
142
+                        $found,
143
+                        );
144 144
 
145 145
             $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data);
146 146
             if ($fix === true) {
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
                 $found = strlen($gap);
156 156
                 $error = 'Expected 1 space after %s name; %s found';
157 157
                 $data  = array(
158
-                          $stackPtrType,
159
-                          $found,
160
-                         );
158
+                            $stackPtrType,
159
+                            $found,
160
+                            );
161 161
 
162 162
                 $fix = $phpcsFile->addFixableError($error, $className, 'SpaceAfterName', $data);
163 163
                 if ($fix === true) {
@@ -227,8 +227,8 @@  discard block
 block discarded – undo
227 227
         }
228 228
 
229 229
         $find = array(
230
-                 T_STRING,
231
-                 $keywordTokenType,
230
+                    T_STRING,
231
+                    $keywordTokenType,
232 232
                 );
233 233
 
234 234
         $classNames = array();
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
             ) {
256 256
                 $prev = $phpcsFile->findPrevious(
257 257
                     array(
258
-                     T_NS_SEPARATOR,
259
-                     T_WHITESPACE,
258
+                        T_NS_SEPARATOR,
259
+                        T_WHITESPACE,
260 260
                     ),
261 261
                     ($className - 1),
262 262
                     $implements,
@@ -319,9 +319,9 @@  discard block
 block discarded – undo
319 319
                     if ($found !== $expected) {
320 320
                         $error = 'Expected %s spaces before interface name; %s found';
321 321
                         $data  = array(
322
-                                  $expected,
323
-                                  $found,
324
-                                 );
322
+                                    $expected,
323
+                                    $found,
324
+                                    );
325 325
                         $fix   = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data);
326 326
                         if ($fix === true) {
327 327
                             $padding = str_repeat(' ', $expected);
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
                     if ($spaceBefore !== 1) {
359 359
                         $error = 'Expected 1 space before "%s"; %s found';
360 360
                         $data  = array(
361
-                                  $tokens[$className]['content'],
362
-                                  $spaceBefore,
363
-                                 );
361
+                                    $tokens[$className]['content'],
362
+                                    $spaceBefore,
363
+                                    );
364 364
 
365 365
                         $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeName', $data);
366 366
                         if ($fix === true) {
@@ -380,9 +380,9 @@  discard block
 block discarded – undo
380 380
                     if ($tokens[($className + 2)]['code'] !== $keywordTokenType) {
381 381
                         $error = 'Expected 0 spaces between "%s" and comma; %s found';
382 382
                         $data  = array(
383
-                                  $tokens[$className]['content'],
384
-                                  strlen($tokens[($className + 1)]['content']),
385
-                                 );
383
+                                    $tokens[$className]['content'],
384
+                                    strlen($tokens[($className + 1)]['content']),
385
+                                    );
386 386
 
387 387
                         $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeComma', $data);
388 388
                         if ($fix === true) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -322,7 +322,7 @@
 block discarded – undo
322 322
                                   $expected,
323 323
                                   $found,
324 324
                                  );
325
-                        $fix   = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data);
325
+                        $fix = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data);
326 326
                         if ($fix === true) {
327 327
                             $padding = str_repeat(' ', $expected);
328 328
                             if ($found === 0) {
Please login to merge, or discard this patch.