Completed
Push — master ( 8cd077 )
by Tomáš
09:25
created
src/Standards/Squiz/Sniffs/Commenting/ClosingDeclarationCommentSniff.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     /**
20 20
      * Returns an array of tokens this test wants to listen for.
21 21
      *
22
-     * @return array
22
+     * @return integer[]
23 23
      */
24 24
     public function register()
25 25
     {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * Processes this test, when one of its tokens is encountered.
37 37
      *
38
-     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
38
+     * @param File $phpcsFile The file being scanned.
39 39
      * @param int                  $stackPtr  The position of the current token in the
40 40
      *                                        stack passed in $tokens..
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.
src/Standards/Squiz/Sniffs/Commenting/DocCommentAlignmentSniff.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * Returns an array of tokens this test wants to listen for.
32 32
      *
33
-     * @return array
33
+     * @return string[]
34 34
      */
35 35
     public function register()
36 36
     {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     /**
43 43
      * Processes this test, when one of its tokens is encountered.
44 44
      *
45
-     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
45
+     * @param File $phpcsFile The file being scanned.
46 46
      * @param int                  $stackPtr  The position of the current token
47 47
      *                                         in the stack passed in $tokens.
48 48
      *
Please login to merge, or discard this patch.
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.
src/Standards/Squiz/Sniffs/Commenting/FileCommentSniff.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * Returns an array of tokens this test wants to listen for.
31 31
      *
32
-     * @return array
32
+     * @return integer[]
33 33
      */
34 34
     public function register()
35 35
     {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * Processes this test, when one of its tokens is encountered.
43 43
      *
44
-     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
44
+     * @param File $phpcsFile The file being scanned.
45 45
      * @param int                  $stackPtr  The position of the current token
46 46
      *                                        in the stack passed in $tokens.
47 47
      *
Please login to merge, or discard this patch.
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.
src/Standards/Squiz/Sniffs/Commenting/FunctionCommentSniff.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * Process the return comment of this function comment.
22 22
      *
23
-     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
23
+     * @param File $phpcsFile    The file being scanned.
24 24
      * @param int                  $stackPtr     The position of the current token
25 25
      *                                           in the stack passed in $tokens.
26 26
      * @param int                  $commentStart The position in the stack where the comment started.
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     /**
145 145
      * Process any throw tags that this function comment has.
146 146
      *
147
-     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
147
+     * @param File $phpcsFile    The file being scanned.
148 148
      * @param int                  $stackPtr     The position of the current token
149 149
      *                                           in the stack passed in $tokens.
150 150
      * @param int                  $commentStart The position in the stack where the comment started.
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     /**
214 214
      * Process the function parameter comments.
215 215
      *
216
-     * @param PHP_CodeSniffer_File $phpcsFile    The file being scanned.
216
+     * @param File $phpcsFile    The file being scanned.
217 217
      * @param int                  $stackPtr     The position of the current token
218 218
      *                                           in the stack passed in $tokens.
219 219
      * @param int                  $commentStart The position in the stack where the comment started.
Please login to merge, or discard this patch.
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.
src/Standards/Squiz/Sniffs/Commenting/FunctionCommentThrowTagSniff.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * Processes the function tokens within the class.
32 32
      *
33
-     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
33
+     * @param File $phpcsFile The file where this token was found.
34 34
      * @param int                  $stackPtr  The position where the token was found.
35 35
      * @param int                  $currScope The current scope opener token.
36 36
      *
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * Processes a token that is found within the scope that this test is
181 181
      * listening to.
182 182
      *
183
-     * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
183
+     * @param File $phpcsFile The file where this token was found.
184 184
      * @param int                  $stackPtr  The position in the stack where this
185 185
      *                                        token was found.
186 186
      *
Please login to merge, or discard this 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.
src/Standards/Squiz/Sniffs/Commenting/InlineCommentSniff.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     /**
46 46
      * Processes this test, when one of its tokens is encountered.
47 47
      *
48
-     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
48
+     * @param File $phpcsFile The file being scanned.
49 49
      * @param int                  $stackPtr  The position of the current token in the
50 50
      *                                        stack passed in $tokens.
51 51
      *
Please login to merge, or discard this patch.
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.
src/Standards/Squiz/Sniffs/ControlStructures/InlineIfDeclarationSniff.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     /**
20 20
      * Returns an array of tokens this test wants to listen for.
21 21
      *
22
-     * @return array
22
+     * @return string[]
23 23
      */
24 24
     public function register()
25 25
     {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     /**
32 32
      * Processes this sniff, when one of its tokens is encountered.
33 33
      *
34
-     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
34
+     * @param File $phpcsFile The file being scanned.
35 35
      * @param int                  $stackPtr  The position of the current token in the
36 36
      *                                        stack passed in $tokens.
37 37
      *
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/CSS/DuplicateClassDefinitionSniff.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * Returns the token types that this sniff is interested in.
28 28
      *
29
-     * @return int[]
29
+     * @return integer[]
30 30
      */
31 31
     public function register()
32 32
     {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * Processes the tokens that this sniff is interested in.
40 40
      *
41
-     * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found.
41
+     * @param File $phpcsFile The file where the token was found.
42 42
      * @param int                  $stackPtr  The position in the stack where
43 43
      *                                        the token was found.
44 44
      *
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@
 block discarded – undo
70 70
         }
71 71
 
72 72
         $find = array(
73
-                 T_CLOSE_CURLY_BRACKET,
74
-                 T_COMMENT,
75
-                 T_OPEN_TAG,
73
+                    T_CLOSE_CURLY_BRACKET,
74
+                    T_COMMENT,
75
+                    T_OPEN_TAG,
76 76
                 );
77 77
 
78 78
         while ($next !== false) {
Please login to merge, or discard this patch.
src/Standards/Squiz/Sniffs/CSS/ForbiddenStylesSniff.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     /**
67 67
      * Returns an array of tokens this test wants to listen for.
68 68
      *
69
-     * @return array
69
+     * @return string[]
70 70
      */
71 71
     public function register()
72 72
     {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     /**
87 87
      * Processes this test, when one of its tokens is encountered.
88 88
      *
89
-     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
89
+     * @param File $phpcsFile The file being scanned.
90 90
      * @param int                  $stackPtr  The position of the current token in
91 91
      *                                        the stack passed in $tokens.
92 92
      *
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * Generates the error or warning for this sniff.
130 130
      *
131
-     * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
131
+     * @param File $phpcsFile The file being scanned.
132 132
      * @param int                  $stackPtr  The position of the forbidden style
133 133
      *                                        in the token array.
134 134
      * @param string               $style     The name of the forbidden style.
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,15 +44,15 @@
 block discarded – undo
44 44
      * @var array(string => string|null)
45 45
      */
46 46
     protected $forbiddenStyles = array(
47
-                                  '-moz-border-radius'             => 'border-radius',
48
-                                  '-webkit-border-radius'          => 'border-radius',
49
-                                  '-moz-border-radius-topleft'     => 'border-top-left-radius',
50
-                                  '-moz-border-radius-topright'    => 'border-top-right-radius',
51
-                                  '-moz-border-radius-bottomright' => 'border-bottom-right-radius',
52
-                                  '-moz-border-radius-bottomleft'  => 'border-bottom-left-radius',
53
-                                  '-moz-box-shadow'                => 'box-shadow',
54
-                                  '-webkit-box-shadow'             => 'box-shadow',
55
-                                 );
47
+                                    '-moz-border-radius'             => 'border-radius',
48
+                                    '-webkit-border-radius'          => 'border-radius',
49
+                                    '-moz-border-radius-topleft'     => 'border-top-left-radius',
50
+                                    '-moz-border-radius-topright'    => 'border-top-right-radius',
51
+                                    '-moz-border-radius-bottomright' => 'border-bottom-right-radius',
52
+                                    '-moz-border-radius-bottomleft'  => 'border-bottom-left-radius',
53
+                                    '-moz-box-shadow'                => 'box-shadow',
54
+                                    '-webkit-box-shadow'             => 'box-shadow',
55
+                                    );
56 56
 
57 57
     /**
58 58
      * A cache of forbidden style names, for faster lookups.
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
      *
150 150
      * @return void
151 151
      */
152
-    protected function addError($phpcsFile, $stackPtr, $style, $pattern=null)
152
+    protected function addError($phpcsFile, $stackPtr, $style, $pattern = null)
153 153
     {
154 154
         $data  = array($style);
155 155
         $error = 'The use of style %s is ';
Please login to merge, or discard this patch.