@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | /** |
103 | 103 | * Returns an array of tokens this test wants to listen for. |
104 | 104 | * |
105 | - * @return array |
|
105 | + * @return integer[] |
|
106 | 106 | */ |
107 | 107 | public function register() |
108 | 108 | { |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | /** |
119 | 119 | * Processes this test, when one of its tokens is encountered. |
120 | 120 | * |
121 | - * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document. |
|
121 | + * @param File $phpcsFile All the tokens found in the document. |
|
122 | 122 | * @param int $stackPtr The position of the current token |
123 | 123 | * in the stack passed in $tokens. |
124 | 124 | * |
125 | - * @return void |
|
125 | + * @return integer |
|
126 | 126 | */ |
127 | 127 | public function process(File $phpcsFile, $stackPtr) |
128 | 128 | { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | * @var array |
39 | 39 | */ |
40 | 40 | public $supportedTokenizers = array( |
41 | - 'PHP', |
|
42 | - 'JS', |
|
43 | - ); |
|
41 | + 'PHP', |
|
42 | + 'JS', |
|
43 | + ); |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * The number of spaces code should be indented. |
@@ -810,15 +810,15 @@ discard block |
||
810 | 810 | if ($this->tabIndent === true) { |
811 | 811 | $error .= '%s tabs, found %s'; |
812 | 812 | $data = array( |
813 | - floor($checkIndent / $this->_tabWidth), |
|
814 | - floor($tokenIndent / $this->_tabWidth), |
|
815 | - ); |
|
813 | + floor($checkIndent / $this->_tabWidth), |
|
814 | + floor($tokenIndent / $this->_tabWidth), |
|
815 | + ); |
|
816 | 816 | } else { |
817 | 817 | $error .= '%s spaces, found %s'; |
818 | 818 | $data = array( |
819 | - $checkIndent, |
|
820 | - $tokenIndent, |
|
821 | - ); |
|
819 | + $checkIndent, |
|
820 | + $tokenIndent, |
|
821 | + ); |
|
822 | 822 | } |
823 | 823 | |
824 | 824 | if ($this->_debug === true) { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | /** |
36 | 36 | * Should this test be skipped for some reason. |
37 | 37 | * |
38 | - * @return void |
|
38 | + * @return boolean |
|
39 | 39 | */ |
40 | 40 | protected function shouldSkipTest() |
41 | 41 | { |
@@ -19,7 +19,7 @@ discard block |
||
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 | { |
@@ -31,7 +31,7 @@ discard block |
||
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 |
36 | 36 | * the stack passed in $tokens. |
37 | 37 | * |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @param int $stackPtr The position in the tokens array of the |
83 | 83 | * potentially included class. |
84 | 84 | * |
85 | - * @return string |
|
85 | + * @return boolean |
|
86 | 86 | */ |
87 | 87 | protected function getIncludedClassFromToken( |
88 | 88 | $phpcsFile, |
@@ -63,17 +63,17 @@ |
||
63 | 63 | $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 2), null, false, true); |
64 | 64 | $typeName = trim($tokens[$typeName]['content'], " '"); |
65 | 65 | switch (strtolower($tokens[($stackPtr + 1)]['content'])) { |
66 | - case 'includesystem' : |
|
67 | - $included = strtolower($typeName); |
|
68 | - break; |
|
69 | - case 'includeasset' : |
|
70 | - $included = strtolower($typeName).'assettype'; |
|
71 | - break; |
|
72 | - case 'includewidget' : |
|
73 | - $included = strtolower($typeName).'widgettype'; |
|
74 | - break; |
|
75 | - default: |
|
76 | - return; |
|
66 | + case 'includesystem' : |
|
67 | + $included = strtolower($typeName); |
|
68 | + break; |
|
69 | + case 'includeasset' : |
|
70 | + $included = strtolower($typeName).'assettype'; |
|
71 | + break; |
|
72 | + case 'includewidget' : |
|
73 | + $included = strtolower($typeName).'widgettype'; |
|
74 | + break; |
|
75 | + default: |
|
76 | + return; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | if ($included === strtolower($ownClass)) { |
@@ -35,6 +35,9 @@ |
||
35 | 35 | |
36 | 36 | abstract class AbstractEditingScreenModeWidgetActions extends AbstractEditingModeWidgetActions { |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $systemName |
|
40 | + */ |
|
38 | 41 | public static function getScreens($systemName) |
39 | 42 | { |
40 | 43 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | /** |
73 | 73 | * Returns an array of tokens this test wants to listen for. |
74 | 74 | * |
75 | - * @return array |
|
75 | + * @return integer[] |
|
76 | 76 | */ |
77 | 77 | public function register() |
78 | 78 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | /** |
85 | 85 | * Processes this test, when one of its tokens is encountered. |
86 | 86 | * |
87 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
87 | + * @param File $phpcsFile The file being scanned. |
|
88 | 88 | * @param int $stackPtr The position of the current token |
89 | 89 | * in the stack passed in $tokens. |
90 | 90 | * |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | /** |
204 | 204 | * Processes each required or optional tag. |
205 | 205 | * |
206 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
206 | + * @param File $phpcsFile The file being scanned. |
|
207 | 207 | * @param int $stackPtr The position of the current token |
208 | 208 | * in the stack passed in $tokens. |
209 | 209 | * @param int $commentStart Position in the stack where the comment started. |
@@ -35,51 +35,51 @@ discard block |
||
35 | 35 | * @var array |
36 | 36 | */ |
37 | 37 | protected $tags = array( |
38 | - '@category' => array( |
|
39 | - 'required' => true, |
|
40 | - 'allow_multiple' => false, |
|
38 | + '@category' => array( |
|
39 | + 'required' => true, |
|
40 | + 'allow_multiple' => false, |
|
41 | 41 | ), |
42 | - '@package' => array( |
|
43 | - 'required' => true, |
|
44 | - 'allow_multiple' => false, |
|
42 | + '@package' => array( |
|
43 | + 'required' => true, |
|
44 | + 'allow_multiple' => false, |
|
45 | 45 | ), |
46 | - '@subpackage' => array( |
|
47 | - 'required' => false, |
|
48 | - 'allow_multiple' => false, |
|
46 | + '@subpackage' => array( |
|
47 | + 'required' => false, |
|
48 | + 'allow_multiple' => false, |
|
49 | 49 | ), |
50 | - '@author' => array( |
|
51 | - 'required' => true, |
|
52 | - 'allow_multiple' => true, |
|
50 | + '@author' => array( |
|
51 | + 'required' => true, |
|
52 | + 'allow_multiple' => true, |
|
53 | 53 | ), |
54 | - '@copyright' => array( |
|
55 | - 'required' => false, |
|
56 | - 'allow_multiple' => true, |
|
54 | + '@copyright' => array( |
|
55 | + 'required' => false, |
|
56 | + 'allow_multiple' => true, |
|
57 | 57 | ), |
58 | - '@license' => array( |
|
59 | - 'required' => true, |
|
60 | - 'allow_multiple' => false, |
|
58 | + '@license' => array( |
|
59 | + 'required' => true, |
|
60 | + 'allow_multiple' => false, |
|
61 | 61 | ), |
62 | - '@version' => array( |
|
63 | - 'required' => false, |
|
64 | - 'allow_multiple' => false, |
|
62 | + '@version' => array( |
|
63 | + 'required' => false, |
|
64 | + 'allow_multiple' => false, |
|
65 | 65 | ), |
66 | - '@link' => array( |
|
67 | - 'required' => true, |
|
68 | - 'allow_multiple' => true, |
|
66 | + '@link' => array( |
|
67 | + 'required' => true, |
|
68 | + 'allow_multiple' => true, |
|
69 | 69 | ), |
70 | - '@see' => array( |
|
71 | - 'required' => false, |
|
72 | - 'allow_multiple' => true, |
|
70 | + '@see' => array( |
|
71 | + 'required' => false, |
|
72 | + 'allow_multiple' => true, |
|
73 | 73 | ), |
74 | - '@since' => array( |
|
75 | - 'required' => false, |
|
76 | - 'allow_multiple' => false, |
|
74 | + '@since' => array( |
|
75 | + 'required' => false, |
|
76 | + 'allow_multiple' => false, |
|
77 | 77 | ), |
78 | - '@deprecated' => array( |
|
79 | - 'required' => false, |
|
80 | - 'allow_multiple' => false, |
|
78 | + '@deprecated' => array( |
|
79 | + 'required' => false, |
|
80 | + 'allow_multiple' => false, |
|
81 | 81 | ), |
82 | - ); |
|
82 | + ); |
|
83 | 83 | |
84 | 84 | |
85 | 85 | /** |
@@ -159,24 +159,24 @@ discard block |
||
159 | 159 | ); |
160 | 160 | |
161 | 161 | $ignore = array( |
162 | - T_CLASS, |
|
163 | - T_INTERFACE, |
|
164 | - T_TRAIT, |
|
165 | - T_FUNCTION, |
|
166 | - T_CLOSURE, |
|
167 | - T_PUBLIC, |
|
168 | - T_PRIVATE, |
|
169 | - T_PROTECTED, |
|
170 | - T_FINAL, |
|
171 | - T_STATIC, |
|
172 | - T_ABSTRACT, |
|
173 | - T_CONST, |
|
174 | - T_PROPERTY, |
|
175 | - T_INCLUDE, |
|
176 | - T_INCLUDE_ONCE, |
|
177 | - T_REQUIRE, |
|
178 | - T_REQUIRE_ONCE, |
|
179 | - ); |
|
162 | + T_CLASS, |
|
163 | + T_INTERFACE, |
|
164 | + T_TRAIT, |
|
165 | + T_FUNCTION, |
|
166 | + T_CLOSURE, |
|
167 | + T_PUBLIC, |
|
168 | + T_PRIVATE, |
|
169 | + T_PROTECTED, |
|
170 | + T_FINAL, |
|
171 | + T_STATIC, |
|
172 | + T_ABSTRACT, |
|
173 | + T_CONST, |
|
174 | + T_PROPERTY, |
|
175 | + T_INCLUDE, |
|
176 | + T_INCLUDE_ONCE, |
|
177 | + T_REQUIRE, |
|
178 | + T_REQUIRE_ONCE, |
|
179 | + ); |
|
180 | 180 | |
181 | 181 | if (in_array($tokens[$nextToken]['code'], $ignore) === true) { |
182 | 182 | $phpcsFile->addError('Missing file doc comment', $stackPtr, 'Missing'); |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | if ($this->tags[$name]['allow_multiple'] === false && isset($tagTokens[$name]) === true) { |
247 | 247 | $error = 'Only one %s tag is allowed in a %s comment'; |
248 | 248 | $data = array( |
249 | - $name, |
|
250 | - $docBlock, |
|
251 | - ); |
|
249 | + $name, |
|
250 | + $docBlock, |
|
251 | + ); |
|
252 | 252 | $phpcsFile->addError($error, $tag, 'Duplicate'.ucfirst(substr($name, 1)).'Tag', $data); |
253 | 253 | } |
254 | 254 | |
@@ -259,9 +259,9 @@ discard block |
||
259 | 259 | if ($string === false || $tokens[$string]['line'] !== $tokens[$tag]['line']) { |
260 | 260 | $error = 'Content missing for %s tag in %s comment'; |
261 | 261 | $data = array( |
262 | - $name, |
|
263 | - $docBlock, |
|
264 | - ); |
|
262 | + $name, |
|
263 | + $docBlock, |
|
264 | + ); |
|
265 | 265 | $phpcsFile->addError($error, $tag, 'Empty'.ucfirst(substr($name, 1)).'Tag', $data); |
266 | 266 | continue; |
267 | 267 | } |
@@ -274,9 +274,9 @@ discard block |
||
274 | 274 | if ($tagData['required'] === true) { |
275 | 275 | $error = 'Missing %s tag in %s comment'; |
276 | 276 | $data = array( |
277 | - $tag, |
|
278 | - $docBlock, |
|
279 | - ); |
|
277 | + $tag, |
|
278 | + $docBlock, |
|
279 | + ); |
|
280 | 280 | $phpcsFile->addError($error, $commentEnd, 'Missing'.ucfirst(substr($tag, 1)).'Tag', $data); |
281 | 281 | } |
282 | 282 | |
@@ -296,9 +296,9 @@ discard block |
||
296 | 296 | if ($foundTags[$pos] !== $tag) { |
297 | 297 | $error = 'The tag in position %s should be the %s tag'; |
298 | 298 | $data = array( |
299 | - ($pos + 1), |
|
300 | - $tag, |
|
301 | - ); |
|
299 | + ($pos + 1), |
|
300 | + $tag, |
|
301 | + ); |
|
302 | 302 | $phpcsFile->addError($error, $tokens[$commentStart]['comment_tags'][$pos], ucfirst(substr($tag, 1)).'TagOrder', $data); |
303 | 303 | } |
304 | 304 | |
@@ -344,9 +344,9 @@ discard block |
||
344 | 344 | $error = 'Category name "%s" is not valid; consider "%s" instead'; |
345 | 345 | $validName = trim($newName, '_'); |
346 | 346 | $data = array( |
347 | - $content, |
|
348 | - $validName, |
|
349 | - ); |
|
347 | + $content, |
|
348 | + $validName, |
|
349 | + ); |
|
350 | 350 | $phpcsFile->addError($error, $tag, 'InvalidCategory', $data); |
351 | 351 | } |
352 | 352 | }//end foreach |
@@ -397,9 +397,9 @@ discard block |
||
397 | 397 | $error = 'Package name "%s" is not valid; consider "%s" instead'; |
398 | 398 | $validName = trim($newName, '_'); |
399 | 399 | $data = array( |
400 | - $content, |
|
401 | - $validName, |
|
402 | - ); |
|
400 | + $content, |
|
401 | + $validName, |
|
402 | + ); |
|
403 | 403 | $phpcsFile->addError($error, $tag, 'InvalidPackage', $data); |
404 | 404 | }//end if |
405 | 405 | }//end foreach |
@@ -442,9 +442,9 @@ discard block |
||
442 | 442 | $error = 'Subpackage name "%s" is not valid; consider "%s" instead'; |
443 | 443 | $validName = trim($newName, '_'); |
444 | 444 | $data = array( |
445 | - $content, |
|
446 | - $validName, |
|
447 | - ); |
|
445 | + $content, |
|
446 | + $validName, |
|
447 | + ); |
|
448 | 448 | $phpcsFile->addError($error, $tag, 'InvalidSubpackage', $data); |
449 | 449 | }//end foreach |
450 | 450 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * Returns an array of tokens this test wants to listen for. |
22 | 22 | * |
23 | - * @return array |
|
23 | + * @return integer[] |
|
24 | 24 | */ |
25 | 25 | public function register() |
26 | 26 | { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * Processes this test, when one of its tokens is encountered. |
34 | 34 | * |
35 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
35 | + * @param File $phpcsFile The file being scanned. |
|
36 | 36 | * @param int $stackPtr The position of the current token |
37 | 37 | * in the stack passed in $tokens. |
38 | 38 | * |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | /** |
99 | 99 | * Process the return comment of this function comment. |
100 | 100 | * |
101 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
101 | + * @param File $phpcsFile The file being scanned. |
|
102 | 102 | * @param int $stackPtr The position of the current token |
103 | 103 | * in the stack passed in $tokens. |
104 | 104 | * @param int $commentStart The position in the stack where the comment started. |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | /** |
148 | 148 | * Process any throw tags that this function comment has. |
149 | 149 | * |
150 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
150 | + * @param File $phpcsFile The file being scanned. |
|
151 | 151 | * @param int $stackPtr The position of the current token |
152 | 152 | * in the stack passed in $tokens. |
153 | 153 | * @param int $commentStart The position in the stack where the comment started. |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | /** |
188 | 188 | * Process the function parameter comments. |
189 | 189 | * |
190 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
190 | + * @param File $phpcsFile The file being scanned. |
|
191 | 191 | * @param int $stackPtr The position of the current token |
192 | 192 | * in the stack passed in $tokens. |
193 | 193 | * @param int $commentStart The position in the stack where the comment started. |
@@ -272,12 +272,12 @@ discard block |
||
272 | 272 | }//end if |
273 | 273 | |
274 | 274 | $params[] = array( |
275 | - 'tag' => $tag, |
|
276 | - 'type' => $type, |
|
277 | - 'var' => $var, |
|
278 | - 'comment' => $comment, |
|
279 | - 'type_space' => $typeSpace, |
|
280 | - 'var_space' => $varSpace, |
|
275 | + 'tag' => $tag, |
|
276 | + 'type' => $type, |
|
277 | + 'var' => $var, |
|
278 | + 'comment' => $comment, |
|
279 | + 'type_space' => $typeSpace, |
|
280 | + 'var_space' => $varSpace, |
|
281 | 281 | ); |
282 | 282 | }//end foreach |
283 | 283 | |
@@ -304,9 +304,9 @@ discard block |
||
304 | 304 | if ($param['type_space'] !== $spaces) { |
305 | 305 | $error = 'Expected %s spaces after parameter type; %s found'; |
306 | 306 | $data = array( |
307 | - $spaces, |
|
308 | - $param['type_space'], |
|
309 | - ); |
|
307 | + $spaces, |
|
308 | + $param['type_space'], |
|
309 | + ); |
|
310 | 310 | |
311 | 311 | $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamType', $data); |
312 | 312 | if ($fix === true) { |
@@ -325,8 +325,8 @@ discard block |
||
325 | 325 | if ($realName !== $param['var']) { |
326 | 326 | $code = 'ParamNameNoMatch'; |
327 | 327 | $data = array( |
328 | - $param['var'], |
|
329 | - $realName, |
|
328 | + $param['var'], |
|
329 | + $realName, |
|
330 | 330 | ); |
331 | 331 | |
332 | 332 | $error = 'Doc comment for parameter %s does not match '; |
@@ -354,9 +354,9 @@ discard block |
||
354 | 354 | if ($param['var_space'] !== $spaces) { |
355 | 355 | $error = 'Expected %s spaces after parameter name; %s found'; |
356 | 356 | $data = array( |
357 | - $spaces, |
|
358 | - $param['var_space'], |
|
359 | - ); |
|
357 | + $spaces, |
|
358 | + $param['var_space'], |
|
359 | + ); |
|
360 | 360 | |
361 | 361 | $fix = $phpcsFile->addFixableError($error, $param['tag'], 'SpacingAfterParamName', $data); |
362 | 362 | if ($fix === true) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Processes this test, when one of its tokens is encountered. |
72 | 72 | * |
73 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
73 | + * @param File $phpcsFile The file being scanned. |
|
74 | 74 | * @param int $stackPtr The position of the current token |
75 | 75 | * in the stack passed in $tokens. |
76 | 76 | * |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | /** |
156 | 156 | * Determine if this is a multi-line function call. |
157 | 157 | * |
158 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
158 | + * @param File $phpcsFile The file being scanned. |
|
159 | 159 | * @param int $stackPtr The position of the current token |
160 | 160 | * in the stack passed in $tokens. |
161 | 161 | * @param int $openBracket The position of the opening bracket |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | * @param array $tokens The stack of tokens that make up |
164 | 164 | * the file. |
165 | 165 | * |
166 | - * @return void |
|
166 | + * @return boolean |
|
167 | 167 | */ |
168 | 168 | public function isMultiLineCall(File $phpcsFile, $stackPtr, $openBracket, $tokens) |
169 | 169 | { |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | /** |
181 | 181 | * Processes single-line calls. |
182 | 182 | * |
183 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
183 | + * @param File $phpcsFile The file being scanned. |
|
184 | 184 | * @param int $stackPtr The position of the current token |
185 | 185 | * in the stack passed in $tokens. |
186 | 186 | * @param int $openBracket The position of the opening bracket |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | /** |
266 | 266 | * Processes multi-line calls. |
267 | 267 | * |
268 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
268 | + * @param File $phpcsFile The file being scanned. |
|
269 | 269 | * @param int $stackPtr The position of the current token |
270 | 270 | * in the stack passed in $tokens. |
271 | 271 | * @param int $openBracket The position of the opening bracket |
@@ -34,9 +34,9 @@ discard block |
||
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 number of spaces code should be indented. |
@@ -225,9 +225,9 @@ discard block |
||
225 | 225 | if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) { |
226 | 226 | $error = 'Expected %s spaces after opening bracket; %s found'; |
227 | 227 | $data = array( |
228 | - $this->requiredSpacesAfterOpen, |
|
229 | - $spaceAfterOpen, |
|
230 | - ); |
|
228 | + $this->requiredSpacesAfterOpen, |
|
229 | + $spaceAfterOpen, |
|
230 | + ); |
|
231 | 231 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket', $data); |
232 | 232 | if ($fix === true) { |
233 | 233 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
@@ -257,9 +257,9 @@ discard block |
||
257 | 257 | if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) { |
258 | 258 | $error = 'Expected %s spaces before closing bracket; %s found'; |
259 | 259 | $data = array( |
260 | - $this->requiredSpacesBeforeClose, |
|
261 | - $spaceBeforeClose, |
|
262 | - ); |
|
260 | + $this->requiredSpacesBeforeClose, |
|
261 | + $spaceBeforeClose, |
|
262 | + ); |
|
263 | 263 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeCloseBracket', $data); |
264 | 264 | if ($fix === true) { |
265 | 265 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
@@ -447,9 +447,9 @@ discard block |
||
447 | 447 | ) { |
448 | 448 | $error = 'Multi-line function call not indented correctly; expected %s spaces but found %s'; |
449 | 449 | $data = array( |
450 | - $expectedIndent, |
|
451 | - $foundIndent, |
|
452 | - ); |
|
450 | + $expectedIndent, |
|
451 | + $foundIndent, |
|
452 | + ); |
|
453 | 453 | |
454 | 454 | $fix = $phpcsFile->addFixableError($error, $i, 'Indent', $data); |
455 | 455 | if ($fix === true) { |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $this->requiredSpacesAfterOpen, |
229 | 229 | $spaceAfterOpen, |
230 | 230 | ); |
231 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket', $data); |
|
231 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpenBracket', $data); |
|
232 | 232 | if ($fix === true) { |
233 | 233 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
234 | 234 | if ($spaceAfterOpen === 0) { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $this->requiredSpacesBeforeClose, |
261 | 261 | $spaceBeforeClose, |
262 | 262 | ); |
263 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeCloseBracket', $data); |
|
263 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeCloseBracket', $data); |
|
264 | 264 | if ($fix === true) { |
265 | 265 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
266 | 266 | if ($spaceBeforeClose === 0) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * Processes this test, when one of its tokens is encountered. |
46 | 46 | * |
47 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
47 | + * @param File $phpcsFile The file being scanned. |
|
48 | 48 | * @param int $stackPtr The position of the current token |
49 | 49 | * in the stack passed in $tokens. |
50 | 50 | * |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | /** |
170 | 170 | * Determine if this is a multi-line function declaration. |
171 | 171 | * |
172 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
172 | + * @param File $phpcsFile The file being scanned. |
|
173 | 173 | * @param int $stackPtr The position of the current token |
174 | 174 | * in the stack passed in $tokens. |
175 | 175 | * @param int $openBracket The position of the opening bracket |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * @param array $tokens The stack of tokens that make up |
178 | 178 | * the file. |
179 | 179 | * |
180 | - * @return void |
|
180 | + * @return boolean |
|
181 | 181 | */ |
182 | 182 | public function isMultiLineDeclaration($phpcsFile, $stackPtr, $openBracket, $tokens) |
183 | 183 | { |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * |
211 | 211 | * Just uses the Generic BSD-Allman brace sniff. |
212 | 212 | * |
213 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
213 | + * @param File $phpcsFile The file being scanned. |
|
214 | 214 | * @param int $stackPtr The position of the current token |
215 | 215 | * in the stack passed in $tokens. |
216 | 216 | * @param array $tokens The stack of tokens that make up |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | return array( |
47 | 47 | T_FUNCTION, |
48 | 48 | T_CLOSURE, |
49 | - ); |
|
49 | + ); |
|
50 | 50 | |
51 | 51 | }//end register() |
52 | 52 | |
@@ -353,9 +353,9 @@ discard block |
||
353 | 353 | if ($expectedIndent !== $foundIndent) { |
354 | 354 | $error = 'Multi-line function declaration not indented correctly; expected %s spaces but found %s'; |
355 | 355 | $data = array( |
356 | - $expectedIndent, |
|
357 | - $foundIndent, |
|
358 | - ); |
|
356 | + $expectedIndent, |
|
357 | + $foundIndent, |
|
358 | + ); |
|
359 | 359 | |
360 | 360 | $fix = $phpcsFile->addFixableError($error, $i, 'Indent', $data); |
361 | 361 | if ($fix === true) { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * Returns an array of tokens this test wants to listen for. |
22 | 22 | * |
23 | - * @return int[] |
|
23 | + * @return integer[] |
|
24 | 24 | */ |
25 | 25 | public function register() |
26 | 26 | { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * Processes this test, when one of its tokens is encountered. |
34 | 34 | * |
35 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
35 | + * @param File $phpcsFile The file being scanned. |
|
36 | 36 | * @param int $stackPtr The position of the current token in the |
37 | 37 | * stack passed in $tokens. |
38 | 38 | * |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | /** |
74 | 74 | * Returns true if the passed argument has a default value. |
75 | 75 | * |
76 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
76 | + * @param File $phpcsFile The file being scanned. |
|
77 | 77 | * @param int $argPtr The position of the argument |
78 | 78 | * in the stack. |
79 | 79 | * |