Completed
Branch master (d87ed9)
by Tomáš
06:31
created
CodeSniffer/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
      * @var array
37 37
      */
38 38
     public $supportedTokenizers = array(
39
-                                   'PHP',
40
-                                   'JS',
41
-                                  );
39
+                                    'PHP',
40
+                                    'JS',
41
+                                    );
42 42
 
43 43
 
44 44
     /**
@@ -76,18 +76,18 @@  discard block
 block discarded – undo
76 76
 
77 77
         $nextToken = $phpcsFile->findNext($ignore, ($stackPtr + 1), null, true);
78 78
         $ignore    = array(
79
-                      T_CLASS     => true,
80
-                      T_INTERFACE => true,
81
-                      T_FUNCTION  => true,
82
-                      T_PUBLIC    => true,
83
-                      T_PRIVATE   => true,
84
-                      T_PROTECTED => true,
85
-                      T_STATIC    => true,
86
-                      T_ABSTRACT  => true,
87
-                      T_PROPERTY  => true,
88
-                      T_OBJECT    => true,
89
-                      T_PROTOTYPE => true,
90
-                     );
79
+                        T_CLASS     => true,
80
+                        T_INTERFACE => true,
81
+                        T_FUNCTION  => true,
82
+                        T_PUBLIC    => true,
83
+                        T_PRIVATE   => true,
84
+                        T_PROTECTED => true,
85
+                        T_STATIC    => true,
86
+                        T_ABSTRACT  => true,
87
+                        T_PROPERTY  => true,
88
+                        T_OBJECT    => true,
89
+                        T_PROTOTYPE => true,
90
+                        );
91 91
 
92 92
         if (isset($ignore[$tokens[$nextToken]['code']]) === false) {
93 93
             // Could be a file comment.
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
             if ($tokens[$i]['column'] !== $requiredColumn) {
120 120
                 $error = 'Expected %s space(s) before asterisk; %s found';
121 121
                 $data  = array(
122
-                          ($requiredColumn - 1),
123
-                          ($tokens[$i]['column'] - 1),
124
-                         );
122
+                            ($requiredColumn - 1),
123
+                            ($tokens[$i]['column'] - 1),
124
+                            );
125 125
                 $fix   = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeStar', $data);
126 126
                 if ($fix === true) {
127 127
                     $padding = str_repeat(' ', ($requiredColumn - 1));
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
                           ($requiredColumn - 1),
123 123
                           ($tokens[$i]['column'] - 1),
124 124
                          );
125
-                $fix   = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeStar', $data);
125
+                $fix = $phpcsFile->addFixableError($error, $i, 'SpaceBeforeStar', $data);
126 126
                 if ($fix === true) {
127 127
                     $padding = str_repeat(' ', ($requiredColumn - 1));
128 128
                     if ($tokens[$i]['column'] === 1) {
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/Commenting/LongConditionClosingCommentSniff.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@  discard block
 block discarded – undo
34 34
      * @var array
35 35
      */
36 36
     public $supportedTokenizers = array(
37
-                                   'PHP',
38
-                                   'JS',
39
-                                  );
37
+                                    'PHP',
38
+                                    'JS',
39
+                                    );
40 40
 
41 41
     /**
42 42
      * The openers that we are interested in.
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
                                 T_WHILE,
52 52
                                 T_TRY,
53 53
                                 T_CASE,
54
-                               );
54
+                                );
55 55
 
56 56
     /**
57 57
      * The length that a code block must be before
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
             $found = trim($tokens[$comment]['content']);
191 191
             $error = 'Incorrect closing comment; expected "%s" but found "%s"';
192 192
             $data  = array(
193
-                      $expected,
194
-                      $found,
195
-                     );
193
+                        $expected,
194
+                        $found,
195
+                        );
196 196
 
197 197
             $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Invalid', $data);
198 198
             if ($fix === true) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
      * @var array
36 36
      */
37 37
     public $supportedTokenizers = array(
38
-                                   'PHP',
39
-                                   'JS',
40
-                                  );
38
+                                    'PHP',
39
+                                    'JS',
40
+                                    );
41 41
 
42 42
 
43 43
     /**
@@ -88,24 +88,24 @@  discard block
 block discarded – undo
88 88
         );
89 89
 
90 90
         $ignore = array(
91
-                   T_CLASS,
92
-                   T_INTERFACE,
93
-                   T_TRAIT,
94
-                   T_FUNCTION,
95
-                   T_CLOSURE,
96
-                   T_PUBLIC,
97
-                   T_PRIVATE,
98
-                   T_PROTECTED,
99
-                   T_FINAL,
100
-                   T_STATIC,
101
-                   T_ABSTRACT,
102
-                   T_CONST,
103
-                   T_PROPERTY,
104
-                   T_INCLUDE,
105
-                   T_INCLUDE_ONCE,
106
-                   T_REQUIRE,
107
-                   T_REQUIRE_ONCE,
108
-                  );
91
+                    T_CLASS,
92
+                    T_INTERFACE,
93
+                    T_TRAIT,
94
+                    T_FUNCTION,
95
+                    T_CLOSURE,
96
+                    T_PUBLIC,
97
+                    T_PRIVATE,
98
+                    T_PROTECTED,
99
+                    T_FINAL,
100
+                    T_STATIC,
101
+                    T_ABSTRACT,
102
+                    T_CONST,
103
+                    T_PROPERTY,
104
+                    T_INCLUDE,
105
+                    T_INCLUDE_ONCE,
106
+                    T_REQUIRE,
107
+                    T_REQUIRE_ONCE,
108
+                    );
109 109
 
110 110
         if (in_array($tokens[$nextToken]['code'], $ignore) === true) {
111 111
             $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing');
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
 
131 131
         // Required tags in correct order.
132 132
         $required = array(
133
-                     '@package'    => true,
134
-                     '@subpackage' => true,
135
-                     '@author'     => true,
136
-                     '@copyright'  => true,
133
+                        '@package'    => true,
134
+                        '@subpackage' => true,
135
+                        '@author'     => true,
136
+                        '@copyright'  => true,
137 137
                     );
138 138
 
139 139
         $foundTags = array();
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
             if ($foundTags[$pos] !== $tag) {
205 205
                 $error = 'The tag in position %s should be the %s tag';
206 206
                 $data  = array(
207
-                          ($pos + 1),
208
-                          $tag,
209
-                         );
207
+                            ($pos + 1),
208
+                            $tag,
209
+                            );
210 210
                 $phpcsFile->addError($error, $tokens[$commentStart]['comment_tags'][$pos], ucfirst(substr($tag, 1)).'TagOrder', $data);
211 211
             }
212 212
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     /**
42 42
      * Returns an array of tokens this test wants to listen for.
43 43
      *
44
-     * @return array
44
+     * @return integer[]
45 45
      */
46 46
     public function register()
47 47
     {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
      * @var array
37 37
      */
38 38
     public $supportedTokenizers = array(
39
-                                   'PHP',
40
-                                   'JS',
41
-                                  );
39
+                                    'PHP',
40
+                                    'JS',
41
+                                    );
42 42
 
43 43
 
44 44
     /**
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         return array(
52 52
                 T_COMMENT,
53 53
                 T_DOC_COMMENT_OPEN_TAG,
54
-               );
54
+                );
55 55
 
56 56
     }//end register()
57 57
 
@@ -81,24 +81,24 @@  discard block
 block discarded – undo
81 81
             );
82 82
 
83 83
             $ignore = array(
84
-                       T_CLASS,
85
-                       T_INTERFACE,
86
-                       T_TRAIT,
87
-                       T_FUNCTION,
88
-                       T_CLOSURE,
89
-                       T_PUBLIC,
90
-                       T_PRIVATE,
91
-                       T_PROTECTED,
92
-                       T_FINAL,
93
-                       T_STATIC,
94
-                       T_ABSTRACT,
95
-                       T_CONST,
96
-                       T_PROPERTY,
97
-                       T_INCLUDE,
98
-                       T_INCLUDE_ONCE,
99
-                       T_REQUIRE,
100
-                       T_REQUIRE_ONCE,
101
-                      );
84
+                        T_CLASS,
85
+                        T_INTERFACE,
86
+                        T_TRAIT,
87
+                        T_FUNCTION,
88
+                        T_CLOSURE,
89
+                        T_PUBLIC,
90
+                        T_PRIVATE,
91
+                        T_PROTECTED,
92
+                        T_FINAL,
93
+                        T_STATIC,
94
+                        T_ABSTRACT,
95
+                        T_CONST,
96
+                        T_PROPERTY,
97
+                        T_INCLUDE,
98
+                        T_INCLUDE_ONCE,
99
+                        T_REQUIRE,
100
+                        T_REQUIRE_ONCE,
101
+                        );
102 102
 
103 103
             if (in_array($tokens[$nextToken]['code'], $ignore) === true) {
104 104
                 return;
@@ -195,24 +195,24 @@  discard block
 block discarded – undo
195 195
             if ($tabFound === true) {
196 196
                 $error = 'Tab found before comment text; expected "// %s" but found "%s"';
197 197
                 $data  = array(
198
-                          ltrim(substr($comment, 2)),
199
-                          $comment,
200
-                         );
198
+                            ltrim(substr($comment, 2)),
199
+                            $comment,
200
+                            );
201 201
                 $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'TabBefore', $data);
202 202
             } else if ($spaceCount === 0) {
203 203
                 $error = 'No space found before comment text; expected "// %s" but found "%s"';
204 204
                 $data  = array(
205
-                          substr($comment, 2),
206
-                          $comment,
207
-                         );
205
+                            substr($comment, 2),
206
+                            $comment,
207
+                            );
208 208
                 $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'NoSpaceBefore', $data);
209 209
             } else if ($spaceCount > 1) {
210 210
                 $error = 'Expected 1 space before comment text but found %s; use block comment if you need indentation';
211 211
                 $data  = array(
212
-                          $spaceCount,
213
-                          substr($comment, (2 + $spaceCount)),
214
-                          $comment,
215
-                         );
212
+                            $spaceCount,
213
+                            substr($comment, (2 + $spaceCount)),
214
+                            $comment,
215
+                            );
216 216
                 $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data);
217 217
             }//end if
218 218
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
                                 'full-stops'        => '.',
275 275
                                 'exclamation marks' => '!',
276 276
                                 'or question marks' => '?',
277
-                               );
277
+                                );
278 278
 
279 279
             if (in_array($commentCloser, $acceptedClosers) === false) {
280 280
                 $error = 'Inline comments must end in %s';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@
 block discarded – undo
213 213
                           substr($comment, (2 + $spaceCount)),
214 214
                           $comment,
215 215
                          );
216
-                $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data);
216
+                $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data);
217 217
             }//end if
218 218
 
219 219
             if ($fix === true) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $tokens       = $phpcsFile->getTokens();
49 49
         $commentToken = array(
50
-                         T_COMMENT,
51
-                         T_DOC_COMMENT_CLOSE_TAG,
50
+                            T_COMMENT,
51
+                            T_DOC_COMMENT_CLOSE_TAG,
52 52
                         );
53 53
 
54 54
         $commentEnd = $phpcsFile->findPrevious($commentToken, $stackPtr);
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
         if ($varType !== $suggestedType) {
124 124
             $error = 'Expected "%s" but found "%s" for @var tag in member variable comment';
125 125
             $data  = array(
126
-                      $suggestedType,
127
-                      $varType,
128
-                     );
126
+                        $suggestedType,
127
+                        $varType,
128
+                        );
129 129
             $phpcsFile->addError($error, ($foundVar + 2), 'IncorrectVarType', $data);
130 130
         }
131 131
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
                 if ($content !== $suggestedType) {
89 89
                     $error = 'Expected "%s" but found "%s" for function return type';
90 90
                     $data  = array(
91
-                              $suggestedType,
92
-                              $content,
93
-                             );
91
+                                $suggestedType,
92
+                                $content,
93
+                                );
94 94
                     $fix   = $phpcsFile->addFixableError($error, $return, 'InvalidReturn', $data);
95 95
                     if ($fix === true) {
96 96
                         $phpcsFile->fixer->replaceToken(($return + 2), $suggestedType);
@@ -277,10 +277,10 @@  discard block
 block discarded – undo
277 277
                         $varSpace       = strlen($matches[3]);
278 278
                         $comment        = $matches[4];
279 279
                         $commentLines[] = array(
280
-                                           'comment' => $comment,
281
-                                           'token'   => ($tag + 2),
282
-                                           'indent'  => $varSpace,
283
-                                          );
280
+                                            'comment' => $comment,
281
+                                            'token'   => ($tag + 2),
282
+                                            'indent'  => $varSpace,
283
+                                            );
284 284
 
285 285
                         // Any strings until the next tag belong to this comment.
286 286
                         if (isset($tokens[$commentStart]['comment_tags'][($pos + 1)]) === true) {
@@ -298,10 +298,10 @@  discard block
 block discarded – undo
298 298
 
299 299
                                 $comment       .= ' '.$tokens[$i]['content'];
300 300
                                 $commentLines[] = array(
301
-                                                   'comment' => $tokens[$i]['content'],
302
-                                                   'token'   => $i,
303
-                                                   'indent'  => $indent,
304
-                                                  );
301
+                                                    'comment' => $tokens[$i]['content'],
302
+                                                    'token'   => $i,
303
+                                                    'indent'  => $indent,
304
+                                                    );
305 305
                             }
306 306
                         }
307 307
                     } else {
@@ -319,13 +319,13 @@  discard block
 block discarded – undo
319 319
             }//end if
320 320
 
321 321
             $params[] = array(
322
-                         'tag'          => $tag,
323
-                         'type'         => $type,
324
-                         'var'          => $var,
325
-                         'comment'      => $comment,
326
-                         'commentLines' => $commentLines,
327
-                         'type_space'   => $typeSpace,
328
-                         'var_space'    => $varSpace,
322
+                            'tag'          => $tag,
323
+                            'type'         => $type,
324
+                            'var'          => $var,
325
+                            'comment'      => $comment,
326
+                            'commentLines' => $commentLines,
327
+                            'type_space'   => $typeSpace,
328
+                            'var_space'    => $varSpace,
329 329
                         );
330 330
         }//end foreach
331 331
 
@@ -353,9 +353,9 @@  discard block
 block discarded – undo
353 353
                 if ($typeName !== $suggestedName) {
354 354
                     $error = 'Expected "%s" but found "%s" for parameter type';
355 355
                     $data  = array(
356
-                              $suggestedName,
357
-                              $typeName,
358
-                             );
356
+                                $suggestedName,
357
+                                $typeName,
358
+                                );
359 359
 
360 360
                     $fix = $phpcsFile->addFixableError($error, $param['tag'], 'IncorrectParamVarName', $data);
361 361
                     if ($fix === true) {
@@ -397,9 +397,9 @@  discard block
 block discarded – undo
397 397
                         if ($typeHint === '') {
398 398
                             $error = 'Type hint "%s" missing for %s';
399 399
                             $data  = array(
400
-                                      $suggestedTypeHint,
401
-                                      $param['var'],
402
-                                     );
400
+                                        $suggestedTypeHint,
401
+                                        $param['var'],
402
+                                        );
403 403
 
404 404
                             $errorCode = 'TypeHintMissing';
405 405
                             if ($suggestedTypeHint === 'string'
@@ -414,10 +414,10 @@  discard block
 block discarded – undo
414 414
                         } else if ($typeHint !== substr($suggestedTypeHint, (strlen($typeHint) * -1))) {
415 415
                             $error = 'Expected type hint "%s"; found "%s" for %s';
416 416
                             $data  = array(
417
-                                      $suggestedTypeHint,
418
-                                      $typeHint,
419
-                                      $param['var'],
420
-                                     );
417
+                                        $suggestedTypeHint,
418
+                                        $typeHint,
419
+                                        $param['var'],
420
+                                        );
421 421
                             $phpcsFile->addError($error, $stackPtr, 'IncorrectTypeHint', $data);
422 422
                         }//end if
423 423
                     } else if ($suggestedTypeHint === '' && isset($realParams[$pos]) === true) {
@@ -425,9 +425,9 @@  discard block
 block discarded – undo
425 425
                         if ($typeHint !== '') {
426 426
                             $error = 'Unknown type hint "%s" found for %s';
427 427
                             $data  = array(
428
-                                      $typeHint,
429
-                                      $param['var'],
430
-                                     );
428
+                                        $typeHint,
429
+                                        $param['var'],
430
+                                        );
431 431
                             $phpcsFile->addError($error, $stackPtr, 'InvalidTypeHint', $data);
432 432
                         }
433 433
                     }//end if
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
             if ($param['type_space'] !== $spaces) {
446 446
                 $error = 'Expected %s spaces after parameter type; %s found';
447 447
                 $data  = array(
448
-                          $spaces,
449
-                          $param['type_space'],
450
-                         );
448
+                            $spaces,
449
+                            $param['type_space'],
450
+                            );
451 451
 
452 452
                 $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamType', $data);
453 453
                 if ($fix === true) {
@@ -485,8 +485,8 @@  discard block
 block discarded – undo
485 485
                 if ($realName !== $param['var']) {
486 486
                     $code = 'ParamNameNoMatch';
487 487
                     $data = array(
488
-                             $param['var'],
489
-                             $realName,
488
+                                $param['var'],
489
+                                $realName,
490 490
                             );
491 491
 
492 492
                     $error = 'Doc comment for parameter %s does not match ';
@@ -514,9 +514,9 @@  discard block
 block discarded – undo
514 514
             if ($param['var_space'] !== $spaces) {
515 515
                 $error = 'Expected %s spaces after parameter name; %s found';
516 516
                 $data  = array(
517
-                          $spaces,
518
-                          $param['var_space'],
519
-                         );
517
+                            $spaces,
518
+                            $param['var_space'],
519
+                            );
520 520
 
521 521
                 $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamName', $data);
522 522
                 if ($fix === true) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
                               $suggestedType,
92 92
                               $content,
93 93
                              );
94
-                    $fix   = $phpcsFile->addFixableError($error, $return, 'InvalidReturn', $data);
94
+                    $fix = $phpcsFile->addFixableError($error, $return, 'InvalidReturn', $data);
95 95
                     if ($fix === true) {
96 96
                         $phpcsFile->fixer->replaceToken(($return + 2), $suggestedType);
97 97
                     }
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Commenting/BlockCommentSniff.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         return array(
42 42
                 T_COMMENT,
43 43
                 T_DOC_COMMENT_OPEN_TAG,
44
-               );
44
+                );
45 45
 
46 46
     }//end register()
47 47
 
@@ -69,19 +69,19 @@  discard block
 block discarded – undo
69 69
         if ($tokens[$stackPtr]['code'] === T_DOC_COMMENT_OPEN_TAG) {
70 70
             $nextToken = $phpcsFile->findNext(PHP_CodeSniffer_Tokens::$emptyTokens, ($stackPtr + 1), null, true);
71 71
             $ignore    = array(
72
-                          T_CLASS     => true,
73
-                          T_INTERFACE => true,
74
-                          T_TRAIT     => true,
75
-                          T_FUNCTION  => true,
76
-                          T_PUBLIC    => true,
77
-                          T_PRIVATE   => true,
78
-                          T_FINAL     => true,
79
-                          T_PROTECTED => true,
80
-                          T_STATIC    => true,
81
-                          T_ABSTRACT  => true,
82
-                          T_CONST     => true,
83
-                          T_VAR       => true,
84
-                         );
72
+                            T_CLASS     => true,
73
+                            T_INTERFACE => true,
74
+                            T_TRAIT     => true,
75
+                            T_FUNCTION  => true,
76
+                            T_PUBLIC    => true,
77
+                            T_PRIVATE   => true,
78
+                            T_FINAL     => true,
79
+                            T_PROTECTED => true,
80
+                            T_STATIC    => true,
81
+                            T_ABSTRACT  => true,
82
+                            T_CONST     => true,
83
+                            T_VAR       => true,
84
+                            );
85 85
             if (isset($ignore[$tokens[$nextToken]['code']]) === true) {
86 86
                 return;
87 87
             }
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
                 }
203 203
 
204 204
                 $data = array(
205
-                         $expected,
206
-                         $leadingSpace,
205
+                            $expected,
206
+                            $leadingSpace,
207 207
                         );
208 208
 
209 209
                 $error = 'First line of comment not aligned correctly; expected %s but found %s';
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
                 }
246 246
 
247 247
                 $data = array(
248
-                         $expected,
249
-                         $leadingSpace,
248
+                            $expected,
249
+                            $leadingSpace,
250 250
                         );
251 251
 
252 252
                 $error = 'Comment line indented incorrectly; expected at least %s but found %s';
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
                 }
278 278
 
279 279
                 $data = array(
280
-                         $expected,
281
-                         $leadingSpace,
280
+                            $expected,
281
+                            $leadingSpace,
282 282
                         );
283 283
 
284 284
                 $error = 'Last line of comment aligned incorrectly; expected %s but found %s';
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/Operators/ComparisonOperatorUsageSniff.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
      * @var array
56 56
      */
57 57
     public $supportedTokenizers = array(
58
-                                   'PHP',
59
-                                   'JS',
60
-                                  );
58
+                                    'PHP',
59
+                                    'JS',
60
+                                    );
61 61
 
62 62
     /**
63 63
      * A list of valid comparison operators.
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
      * @var array
66 66
      */
67 67
     private static $_validOps = array(
68
-                                 T_IS_IDENTICAL,
69
-                                 T_IS_NOT_IDENTICAL,
70
-                                 T_LESS_THAN,
71
-                                 T_GREATER_THAN,
72
-                                 T_IS_GREATER_OR_EQUAL,
73
-                                 T_IS_SMALLER_OR_EQUAL,
74
-                                 T_INSTANCEOF,
68
+                                    T_IS_IDENTICAL,
69
+                                    T_IS_NOT_IDENTICAL,
70
+                                    T_LESS_THAN,
71
+                                    T_GREATER_THAN,
72
+                                    T_IS_GREATER_OR_EQUAL,
73
+                                    T_IS_SMALLER_OR_EQUAL,
74
+                                    T_INSTANCEOF,
75 75
                                 );
76 76
 
77 77
     /**
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
      * @var array(int => string)
81 81
      */
82 82
     private static $_invalidOps = array(
83
-                                   'PHP' => array(
84
-                                             T_IS_EQUAL     => '===',
85
-                                             T_IS_NOT_EQUAL => '!==',
86
-                                             T_BOOLEAN_NOT  => '=== FALSE',
83
+                                    'PHP' => array(
84
+                                                T_IS_EQUAL     => '===',
85
+                                                T_IS_NOT_EQUAL => '!==',
86
+                                                T_BOOLEAN_NOT  => '=== FALSE',
87 87
                                             ),
88
-                                   'JS'  => array(
89
-                                             T_IS_EQUAL     => '===',
90
-                                             T_IS_NOT_EQUAL => '!==',
88
+                                    'JS'  => array(
89
+                                                T_IS_EQUAL     => '===',
90
+                                                T_IS_NOT_EQUAL => '!==',
91 91
                                             ),
92
-                                  );
92
+                                    );
93 93
 
94 94
 
95 95
     /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 T_INLINE_THEN,
106 106
                 T_WHILE,
107 107
                 T_FOR,
108
-               );
108
+                );
109 109
 
110 110
     }//end register()
111 111
 
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
             if (in_array($type, array_keys(self::$_invalidOps[$tokenizer])) === true) {
192 192
                 $error = 'Operator %s prohibited; use %s instead';
193 193
                 $data  = array(
194
-                          $tokens[$i]['content'],
195
-                          self::$_invalidOps[$tokenizer][$type],
196
-                         );
194
+                            $tokens[$i]['content'],
195
+                            self::$_invalidOps[$tokenizer][$type],
196
+                            );
197 197
                 $phpcsFile->addError($error, $i, 'NotAllowed', $data);
198 198
                 $foundOps++;
199 199
             } else if (in_array($type, self::$_validOps) === true) {
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Operators/ValidLogicalOperatorsSniff.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         return array(
43 43
                 T_LOGICAL_AND,
44 44
                 T_LOGICAL_OR,
45
-               );
45
+                );
46 46
 
47 47
     }//end register()
48 48
 
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
         $tokens = $phpcsFile->getTokens();
62 62
 
63 63
         $replacements = array(
64
-                         'and' => '&&',
65
-                         'or'  => '||',
64
+                            'and' => '&&',
65
+                            'or'  => '||',
66 66
                         );
67 67
 
68 68
         $operator = strtolower($tokens[$stackPtr]['content']);
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 
73 73
         $error = 'Logical operator "%s" is prohibited; use "%s" instead';
74 74
         $data  = array(
75
-                  $operator,
76
-                  $replacements[$operator],
77
-                 );
75
+                    $operator,
76
+                    $replacements[$operator],
77
+                    );
78 78
         $phpcsFile->addError($error, $stackPtr, 'NotAllowed', $data);
79 79
 
80 80
     }//end process()
Please login to merge, or discard this patch.