Completed
Branch master (d87ed9)
by Tomáš
07:16
created
Squiz/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         return array(
63 63
                 T_FUNCTION,
64 64
                 T_CLOSURE,
65
-               );
65
+                );
66 66
 
67 67
     }//end register()
68 68
 
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
                 if ($spacesBefore !== $this->equalsSpacing) {
142 142
                     $error = 'Incorrect spacing between argument "%s" and equals sign; expected '.$this->equalsSpacing.' but found %s';
143 143
                     $data  = array(
144
-                              $tokens[$nextParam]['content'],
145
-                              $spacesBefore,
146
-                             );
144
+                                $tokens[$nextParam]['content'],
145
+                                $spacesBefore,
146
+                                );
147 147
 
148 148
                     $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceBeforeEquals', $data);
149 149
                     if ($fix === true) {
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
                 if ($spacesAfter !== $this->equalsSpacing) {
165 165
                     $error = 'Incorrect spacing between default value and equals sign for argument "%s"; expected '.$this->equalsSpacing.' but found %s';
166 166
                     $data  = array(
167
-                              $tokens[$nextParam]['content'],
168
-                              $spacesAfter,
169
-                             );
167
+                                $tokens[$nextParam]['content'],
168
+                                $spacesAfter,
169
+                                );
170 170
 
171 171
                     $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceAfterDefault', $data);
172 172
                     if ($fix === true) {
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
                 if ($tokens[($nextComma - 1)]['code'] === T_WHITESPACE) {
188 188
                     $error = 'Expected 0 spaces between argument "%s" and comma; %s found';
189 189
                     $data  = array(
190
-                              $tokens[$nextParam]['content'],
191
-                              strlen($tokens[($nextComma - 1)]['content']),
192
-                             );
190
+                                $tokens[$nextParam]['content'],
191
+                                strlen($tokens[($nextComma - 1)]['content']),
192
+                                );
193 193
 
194 194
                     $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpaceBeforeComma', $data);
195 195
                     if ($fix === true) {
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
                     if ($gap !== 1) {
236 236
                         $error = 'Expected 1 space between type hint and argument "%s"; %s found';
237 237
                         $data  = array(
238
-                                  $arg,
239
-                                  $gap,
240
-                                 );
238
+                                    $arg,
239
+                                    $gap,
240
+                                    );
241 241
                         $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
242 242
                         if ($fix === true) {
243 243
                             if ($gap === 0) {
@@ -261,9 +261,9 @@  discard block
 block discarded – undo
261 261
                             if ($gap !== 1) {
262 262
                                 $error = 'Expected 1 space between comma and type hint "%s"; %s found';
263 263
                                 $data  = array(
264
-                                          $hint,
265
-                                          $gap,
266
-                                         );
264
+                                            $hint,
265
+                                            $gap,
266
+                                            );
267 267
                                 $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingBeforeHint', $data);
268 268
                                 if ($fix === true) {
269 269
                                     $phpcsFile->fixer->replaceToken(($comma + 1), ' ');
@@ -285,9 +285,9 @@  discard block
 block discarded – undo
285 285
                         if ($tokens[$whitespace]['line'] === $tokens[($whitespace - 1)]['line']) {
286 286
                             $error = 'Expected 1 space between comma and argument "%s"; %s found';
287 287
                             $data  = array(
288
-                                      $arg,
289
-                                      $gap,
290
-                                     );
288
+                                        $arg,
289
+                                        $gap,
290
+                                        );
291 291
 
292 292
                             $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpacingBeforeArg', $data);
293 293
                             if ($fix === true) {
@@ -319,9 +319,9 @@  discard block
 block discarded – undo
319 319
                     if ($gap !== 1) {
320 320
                         $error = 'Expected 1 space between type hint and argument "%s"; %s found';
321 321
                         $data  = array(
322
-                                  $arg,
323
-                                  $gap,
324
-                                 );
322
+                                    $arg,
323
+                                    $gap,
324
+                                    );
325 325
                         $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
326 326
                         if ($fix === true) {
327 327
                             if ($gap === 0) {
@@ -340,10 +340,10 @@  discard block
 block discarded – undo
340 340
                     if ($multiLine === false && $spaceAfterOpen !== $this->requiredSpacesAfterOpen) {
341 341
                         $error = 'Expected %s spaces between opening bracket and type hint "%s"; %s found';
342 342
                         $data  = array(
343
-                                  $this->requiredSpacesAfterOpen,
344
-                                  $hint,
345
-                                  $spaceAfterOpen,
346
-                                 );
343
+                                    $this->requiredSpacesAfterOpen,
344
+                                    $hint,
345
+                                    $spaceAfterOpen,
346
+                                    );
347 347
                         $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpenHint', $data);
348 348
                         if ($fix === true) {
349 349
                             $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
@@ -357,10 +357,10 @@  discard block
 block discarded – undo
357 357
                 } else if ($multiLine === false && $gap !== $this->requiredSpacesAfterOpen) {
358 358
                     $error = 'Expected %s spaces between opening bracket and argument "%s"; %s found';
359 359
                     $data  = array(
360
-                              $this->requiredSpacesAfterOpen,
361
-                              $arg,
362
-                              $gap,
363
-                             );
360
+                                $this->requiredSpacesAfterOpen,
361
+                                $arg,
362
+                                $gap,
363
+                                );
364 364
                     $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpen', $data);
365 365
                     if ($fix === true) {
366 366
                         $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
@@ -395,10 +395,10 @@  discard block
 block discarded – undo
395 395
             $lastParam = array_pop($params);
396 396
             $error     = 'Expected %s spaces between argument "%s" and closing bracket; %s found';
397 397
             $data      = array(
398
-                          $this->requiredSpacesBeforeClose,
399
-                          $tokens[$lastParam]['content'],
400
-                          $gap,
401
-                         );
398
+                            $this->requiredSpacesBeforeClose,
399
+                            $tokens[$lastParam]['content'],
400
+                            $gap,
401
+                            );
402 402
             $fix       = $phpcsFile->addFixableError($error, $closeBracket, 'SpacingBeforeClose', $data);
403 403
             if ($fix === true) {
404 404
                 $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                                   $arg,
239 239
                                   $gap,
240 240
                                  );
241
-                        $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
241
+                        $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
242 242
                         if ($fix === true) {
243 243
                             if ($gap === 0) {
244 244
                                 $phpcsFile->fixer->addContent($whitespace, ' ');
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                                           $hint,
265 265
                                           $gap,
266 266
                                          );
267
-                                $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingBeforeHint', $data);
267
+                                $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpacingBeforeHint', $data);
268 268
                                 if ($fix === true) {
269 269
                                     $phpcsFile->fixer->replaceToken(($comma + 1), ' ');
270 270
                                 }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
                                   $arg,
323 323
                                   $gap,
324 324
                                  );
325
-                        $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
325
+                        $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterHint', $data);
326 326
                         if ($fix === true) {
327 327
                             if ($gap === 0) {
328 328
                                 $phpcsFile->fixer->addContent($nextToken, ' ');
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                                   $hint,
345 345
                                   $spaceAfterOpen,
346 346
                                  );
347
-                        $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpenHint', $data);
347
+                        $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpenHint', $data);
348 348
                         if ($fix === true) {
349 349
                             $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
350 350
                             if ($spaceAfterOpen === 0) {
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
                               $arg,
362 362
                               $gap,
363 363
                              );
364
-                    $fix   = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpen', $data);
364
+                    $fix = $phpcsFile->addFixableError($error, $nextToken, 'SpacingAfterOpen', $data);
365 365
                     if ($fix === true) {
366 366
                         $padding = str_repeat(' ', $this->requiredSpacesAfterOpen);
367 367
                         if ($gap === 0) {
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
                           $tokens[$lastParam]['content'],
400 400
                           $gap,
401 401
                          );
402
-            $fix       = $phpcsFile->addFixableError($error, $closeBracket, 'SpacingBeforeClose', $data);
402
+            $fix = $phpcsFile->addFixableError($error, $closeBracket, 'SpacingBeforeClose', $data);
403 403
             if ($fix === true) {
404 404
                 $padding = str_repeat(' ', $this->requiredSpacesBeforeClose);
405 405
                 if ($gap === 0) {
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/Functions/LowercaseFunctionKeywordsSniff.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                 T_PRIVATE,
45 45
                 T_PROTECTED,
46 46
                 T_STATIC,
47
-               );
47
+                );
48 48
 
49 49
     }//end register()
50 50
 
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
         if ($content !== strtolower($content)) {
67 67
             $error = '%s keyword must be lowercase; expected "%s" but found "%s"';
68 68
             $data  = array(
69
-                      strtoupper($content),
70
-                      strtolower($content),
71
-                      $content,
72
-                     );
69
+                        strtoupper($content),
70
+                        strtolower($content),
71
+                        $content,
72
+                        );
73 73
             $phpcsFile->addError($error, $stackPtr, 'FoundUppercase', $data);
74 74
         }
75 75
 
Please login to merge, or discard this patch.
CodeSniffer/Standards/Squiz/Sniffs/Functions/FunctionDeclarationSniff.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
                 'function abc(...);',
47 47
                 'function abc(...)',
48 48
                 'abstract function abc(...);',
49
-               );
49
+                );
50 50
 
51 51
     }//end getPatterns()
52 52
 
Please login to merge, or discard this patch.
Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
                 if ($tokens[$nextToken]['code'] === T_NEW) {
107 107
                     $currException = $phpcsFile->findNext(
108 108
                         array(
109
-                         T_NS_SEPARATOR,
110
-                         T_STRING,
109
+                            T_NS_SEPARATOR,
110
+                            T_STRING,
111 111
                         ),
112 112
                         $currPos,
113 113
                         $currScopeEnd,
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
                     if ($currException !== false) {
120 120
                         $endException = $phpcsFile->findNext(
121 121
                             array(
122
-                             T_NS_SEPARATOR,
123
-                             T_STRING,
122
+                                T_NS_SEPARATOR,
123
+                                T_STRING,
124 124
                             ),
125 125
                             ($currException + 1),
126 126
                             $currScopeEnd,
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
         if ($tokenCount !== $tagCount) {
180 180
             $error = 'Expected %s @throws tag(s) in function comment; %s found';
181 181
             $data  = array(
182
-                      $tokenCount,
183
-                      $tagCount,
184
-                     );
182
+                        $tokenCount,
183
+                        $tagCount,
184
+                        );
185 185
             $phpcsFile->addError($error, $commentEnd, 'WrongNumber', $data);
186 186
             return;
187 187
         }
Please login to merge, or discard this patch.
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/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.