@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * Returns the token types that this sniff is interested in. |
43 | 43 | * |
44 | - * @return int[] |
|
44 | + * @return string[] |
|
45 | 45 | */ |
46 | 46 | public function register() |
47 | 47 | { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * Processes the tokens that this sniff is interested in. |
55 | 55 | * |
56 | - * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
|
56 | + * @param File $phpcsFile The file where the token was found. |
|
57 | 57 | * @param int $stackPtr The position in the stack where |
58 | 58 | * the token was found. |
59 | 59 | * |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | * @var array |
45 | 45 | */ |
46 | 46 | public $excludeStyles = array( |
47 | - 'background-position' => 'background-position', |
|
48 | - 'box-shadow' => 'box-shadow', |
|
49 | - 'transform-origin' => 'transform-origin', |
|
50 | - '-webkit-transform-origin' => '-webkit-transform-origin', |
|
51 | - '-ms-transform-origin' => '-ms-transform-origin', |
|
47 | + 'background-position' => 'background-position', |
|
48 | + 'box-shadow' => 'box-shadow', |
|
49 | + 'transform-origin' => 'transform-origin', |
|
50 | + '-webkit-transform-origin' => '-webkit-transform-origin', |
|
51 | + '-ms-transform-origin' => '-ms-transform-origin', |
|
52 | 52 | ); |
53 | 53 | |
54 | 54 | |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | |
166 | 166 | $error = 'Size definitions must use shorthand if available; expected "%s" but found "%s"'; |
167 | 167 | $data = array( |
168 | - $expected, |
|
169 | - $content, |
|
170 | - ); |
|
168 | + $expected, |
|
169 | + $content, |
|
170 | + ); |
|
171 | 171 | |
172 | 172 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUsed', $data); |
173 | 173 | if ($fix === true) { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Returns the token types that this sniff is interested in. |
29 | 29 | * |
30 | - * @return int[] |
|
30 | + * @return integer[] |
|
31 | 31 | */ |
32 | 32 | public function register() |
33 | 33 | { |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Processes the tokens that this sniff is interested in. |
41 | 41 | * |
42 | - * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
|
42 | + * @param File $phpcsFile The file where the token was found. |
|
43 | 43 | * @param int $stackPtr The position in the stack where |
44 | 44 | * the token was found. |
45 | 45 | * |
46 | - * @return void |
|
46 | + * @return null|integer |
|
47 | 47 | * @throws PHP_CodeSniffer_Exception If jslint.js could not be run |
48 | 48 | */ |
49 | 49 | public function process(File $phpcsFile, $stackPtr) |
@@ -42,7 +42,7 @@ discard block |
||
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 in the |
47 | 47 | * stack passed in $tokens. |
48 | 48 | * |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | /** |
238 | 238 | * Add and fix the missing brackets error. |
239 | 239 | * |
240 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
240 | + * @param File $phpcsFile The file being scanned. |
|
241 | 241 | * @param int $stackPtr The position of the current token in the |
242 | 242 | * stack passed in $tokens. |
243 | 243 | * |
@@ -36,9 +36,9 @@ discard block |
||
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 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | T_OPEN_SQUARE_BRACKET, |
139 | 139 | T_CLOSE_SQUARE_BRACKET, |
140 | 140 | T_MODULUS, |
141 | - ); |
|
141 | + ); |
|
142 | 142 | |
143 | 143 | for ($prev = ($stackPtr - 1); $prev > $bracket; $prev--) { |
144 | 144 | if (in_array($tokens[$prev]['code'], $allowed) === true) { |
@@ -202,13 +202,13 @@ discard block |
||
202 | 202 | // A list of tokens that indicate that the token is not |
203 | 203 | // part of an arithmetic operation. |
204 | 204 | $invalidTokens = array( |
205 | - T_COMMA, |
|
206 | - T_COLON, |
|
207 | - T_OPEN_PARENTHESIS, |
|
208 | - T_OPEN_SQUARE_BRACKET, |
|
209 | - T_OPEN_SHORT_ARRAY, |
|
210 | - T_CASE, |
|
211 | - ); |
|
205 | + T_COMMA, |
|
206 | + T_COLON, |
|
207 | + T_OPEN_PARENTHESIS, |
|
208 | + T_OPEN_SQUARE_BRACKET, |
|
209 | + T_OPEN_SHORT_ARRAY, |
|
210 | + T_CASE, |
|
211 | + ); |
|
212 | 212 | |
213 | 213 | if (in_array($tokens[$previousToken]['code'], $invalidTokens) === false) { |
214 | 214 | $this->addMissingBracketsError($phpcsFile, $stackPtr); |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | // check is that we are not also enclosed in square brackets |
226 | 226 | // like this: ($array[$index + 1]), which is invalid. |
227 | 227 | $brackets = array( |
228 | - T_OPEN_SQUARE_BRACKET, |
|
229 | - T_CLOSE_SQUARE_BRACKET, |
|
228 | + T_OPEN_SQUARE_BRACKET, |
|
229 | + T_CLOSE_SQUARE_BRACKET, |
|
230 | 230 | ); |
231 | 231 | |
232 | 232 | $squareBracket = $phpcsFile->findPrevious($brackets, ($stackPtr - 1), $lastBracket); |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | T_MODULUS => true, |
282 | 282 | T_ISSET => true, |
283 | 283 | T_ARRAY => true, |
284 | - ); |
|
284 | + ); |
|
285 | 285 | |
286 | 286 | // Find the first token in the expression. |
287 | 287 | for ($before = ($stackPtr - 1); $before > 0; $before--) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | /** |
56 | 56 | * Processes this test, when one of its tokens is encountered. |
57 | 57 | * |
58 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
58 | + * @param File $phpcsFile The file being scanned. |
|
59 | 59 | * @param int $stackPtr The position of the current token in the |
60 | 60 | * stack passed in $tokens. |
61 | 61 | * |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | /** |
95 | 95 | * Processes the contents of a single set of brackets. |
96 | 96 | * |
97 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
97 | + * @param File $phpcsFile The file being scanned. |
|
98 | 98 | * @param int $openBracket The position of the open bracket |
99 | 99 | * in the stack passed in $tokens. |
100 | 100 | * |
@@ -62,7 +62,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -238,7 +238,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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) { |
@@ -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 | { |
@@ -34,9 +34,9 @@ |
||
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 | /** |
@@ -147,7 +147,7 @@ |
||
147 | 147 | * |
148 | 148 | * @return void |
149 | 149 | */ |
150 | - public function processBracket($phpcsFile, $openBracket, $tokens, $type='function') |
|
150 | + public function processBracket($phpcsFile, $openBracket, $tokens, $type = 'function') |
|
151 | 151 | { |
152 | 152 | $errorPrefix = ''; |
153 | 153 | if ($type === 'use') { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * Returns an array of tokens this test wants to listen for. |
28 | 28 | * |
29 | - * @return array |
|
29 | + * @return string[] |
|
30 | 30 | */ |
31 | 31 | public function register() |
32 | 32 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Processes this test, when one of its tokens is encountered. |
40 | 40 | * |
41 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
41 | + * @param File $phpcsFile The file being scanned. |
|
42 | 42 | * @param int $stackPtr The position of the current token |
43 | 43 | * in the stack passed in $tokens. |
44 | 44 | * |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Registers the token types that this sniff wishes to listen to. |
29 | 29 | * |
30 | - * @return array |
|
30 | + * @return string[] |
|
31 | 31 | */ |
32 | 32 | public function register() |
33 | 33 | { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Process the tokens that this sniff is listening for. |
41 | 41 | * |
42 | - * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
|
42 | + * @param File $phpcsFile The file where the token was found. |
|
43 | 43 | * @param int $stackPtr The position in the stack where |
44 | 44 | * the token was found. |
45 | 45 | * |
@@ -80,7 +80,7 @@ |
||
80 | 80 | /** |
81 | 81 | * Process the tokens that this sniff is listening for. |
82 | 82 | * |
83 | - * @param PHP_CodeSniffer_File $phpcsFile The file where the token was found. |
|
83 | + * @param File $phpcsFile The file where the token was found. |
|
84 | 84 | * @param int $stackPtr The position in the stack where the token |
85 | 85 | * was found. |
86 | 86 | * |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | * @var array |
56 | 56 | */ |
57 | 57 | public $supportedTokenizers = array( |
58 | - 'PHP', |
|
59 | - 'JS', |
|
60 | - ); |
|
58 | + 'PHP', |
|
59 | + 'JS', |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | /** |
63 | 63 | * A list of valid comparison operators. |
@@ -65,13 +65,13 @@ discard block |
||
65 | 65 | * @var array |
66 | 66 | */ |
67 | 67 | private static $_validOps = array( |
68 | - T_IS_IDENTICAL, |
|
69 | - T_IS_NOT_IDENTICAL, |
|
70 | - T_LESS_THAN, |
|
71 | - T_GREATER_THAN, |
|
72 | - T_IS_GREATER_OR_EQUAL, |
|
73 | - T_IS_SMALLER_OR_EQUAL, |
|
74 | - T_INSTANCEOF, |
|
68 | + T_IS_IDENTICAL, |
|
69 | + T_IS_NOT_IDENTICAL, |
|
70 | + T_LESS_THAN, |
|
71 | + T_GREATER_THAN, |
|
72 | + T_IS_GREATER_OR_EQUAL, |
|
73 | + T_IS_SMALLER_OR_EQUAL, |
|
74 | + T_INSTANCEOF, |
|
75 | 75 | ); |
76 | 76 | |
77 | 77 | /** |
@@ -80,16 +80,16 @@ discard block |
||
80 | 80 | * @var array(int => string) |
81 | 81 | */ |
82 | 82 | private static $_invalidOps = array( |
83 | - 'PHP' => array( |
|
84 | - T_IS_EQUAL => '===', |
|
85 | - T_IS_NOT_EQUAL => '!==', |
|
86 | - T_BOOLEAN_NOT => '=== FALSE', |
|
83 | + 'PHP' => array( |
|
84 | + T_IS_EQUAL => '===', |
|
85 | + T_IS_NOT_EQUAL => '!==', |
|
86 | + T_BOOLEAN_NOT => '=== FALSE', |
|
87 | 87 | ), |
88 | - 'JS' => array( |
|
89 | - T_IS_EQUAL => '===', |
|
90 | - T_IS_NOT_EQUAL => '!==', |
|
88 | + 'JS' => array( |
|
89 | + T_IS_EQUAL => '===', |
|
90 | + T_IS_NOT_EQUAL => '!==', |
|
91 | 91 | ), |
92 | - ); |
|
92 | + ); |
|
93 | 93 | |
94 | 94 | |
95 | 95 | /** |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | T_INLINE_THEN, |
106 | 106 | T_WHILE, |
107 | 107 | T_FOR, |
108 | - ); |
|
108 | + ); |
|
109 | 109 | |
110 | 110 | }//end register() |
111 | 111 | |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | if (in_array($type, array_keys(self::$_invalidOps[$tokenizer])) === true) { |
192 | 192 | $error = 'Operator %s prohibited; use %s instead'; |
193 | 193 | $data = array( |
194 | - $tokens[$i]['content'], |
|
195 | - self::$_invalidOps[$tokenizer][$type], |
|
196 | - ); |
|
194 | + $tokens[$i]['content'], |
|
195 | + self::$_invalidOps[$tokenizer][$type], |
|
196 | + ); |
|
197 | 197 | $phpcsFile->addError($error, $i, 'NotAllowed', $data); |
198 | 198 | $foundOps++; |
199 | 199 | } else if (in_array($type, self::$_validOps) === true) { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Processes this test, when one of its tokens is encountered. |
40 | 40 | * |
41 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
41 | + * @param File $phpcsFile The file being scanned. |
|
42 | 42 | * @param int $stackPtr The position of the current token |
43 | 43 | * in the stack passed in $tokens. |
44 | 44 | * |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * Checks to ensure increment and decrement operators are not confusing. |
62 | 62 | * |
63 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
63 | + * @param File $phpcsFile The file being scanned. |
|
64 | 64 | * @param int $stackPtr The position of the current token |
65 | 65 | * in the stack passed in $tokens. |
66 | 66 | * |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | /** |
107 | 107 | * Checks to ensure increment and decrement operators are used. |
108 | 108 | * |
109 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
109 | + * @param File $phpcsFile The file being scanned. |
|
110 | 110 | * @param int $stackPtr The position of the current token |
111 | 111 | * in the stack passed in $tokens. |
112 | 112 | * |
@@ -57,7 +57,7 @@ |
||
57 | 57 | 48 => 1, |
58 | 58 | 70 => 1, |
59 | 59 | 71 => 1, |
60 | - ); |
|
60 | + ); |
|
61 | 61 | |
62 | 62 | }//end getErrorList() |
63 | 63 |