@@ -92,9 +92,9 @@ |
||
| 92 | 92 | if ($expected !== $tokens[$i]['content']) { |
| 93 | 93 | $error = 'Style definitions must be lowercase; expected %s but found %s'; |
| 94 | 94 | $data = array( |
| 95 | - $expected, |
|
| 96 | - $tokens[$i]['content'], |
|
| 97 | - ); |
|
| 95 | + $expected, |
|
| 96 | + $tokens[$i]['content'], |
|
| 97 | + ); |
|
| 98 | 98 | |
| 99 | 99 | $fix = $phpcsFile->addFixableError($error, $i, 'FoundUpper', $data); |
| 100 | 100 | if ($fix === true) { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | T_REQUIRE, |
| 49 | 49 | T_REQUIRE_ONCE, |
| 50 | 50 | T_NEW, |
| 51 | - ); |
|
| 51 | + ); |
|
| 52 | 52 | |
| 53 | 53 | }//end register() |
| 54 | 54 | |
@@ -85,9 +85,9 @@ discard block |
||
| 85 | 85 | } else { |
| 86 | 86 | $error = 'Language constructs must be followed by a single space; expected "%s" but found "%s"'; |
| 87 | 87 | $data = array( |
| 88 | - $tokens[$stackPtr]['content'].' '.$tokens[($stackPtr + 1)]['content'], |
|
| 89 | - $tokens[$stackPtr]['content'].$tokens[($stackPtr + 1)]['content'], |
|
| 90 | - ); |
|
| 88 | + $tokens[$stackPtr]['content'].' '.$tokens[($stackPtr + 1)]['content'], |
|
| 89 | + $tokens[$stackPtr]['content'].$tokens[($stackPtr + 1)]['content'], |
|
| 90 | + ); |
|
| 91 | 91 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); |
| 92 | 92 | if ($fix === true) { |
| 93 | 93 | $phpcsFile->fixer->addContent($stackPtr, ' '); |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | $tokens[$stackPtr]['content'].' '.$tokens[($stackPtr + 1)]['content'], |
| 89 | 89 | $tokens[$stackPtr]['content'].$tokens[($stackPtr + 1)]['content'], |
| 90 | 90 | ); |
| 91 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); |
|
| 91 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Incorrect', $data); |
|
| 92 | 92 | if ($fix === true) { |
| 93 | 93 | $phpcsFile->fixer->addContent($stackPtr, ' '); |
| 94 | 94 | } |
@@ -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 | /** |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | return array( |
| 52 | 52 | T_FUNCTION, |
| 53 | 53 | T_CLOSURE, |
| 54 | - ); |
|
| 54 | + ); |
|
| 55 | 55 | |
| 56 | 56 | }//end register() |
| 57 | 57 | |
@@ -93,9 +93,9 @@ |
||
| 93 | 93 | ) { |
| 94 | 94 | $error = 'Closing brace indented incorrectly; expected %s spaces, found %s'; |
| 95 | 95 | $data = array( |
| 96 | - ($startColumn - 1), |
|
| 97 | - ($braceIndent - 1), |
|
| 98 | - ); |
|
| 96 | + ($startColumn - 1), |
|
| 97 | + ($braceIndent - 1), |
|
| 98 | + ); |
|
| 99 | 99 | |
| 100 | 100 | $fix = $phpcsFile->addFixableError($error, $scopeEnd, 'Indent', $data); |
| 101 | 101 | if ($fix === true) { |
@@ -36,9 +36,9 @@ |
||
| 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 | /** |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | return array( |
| 48 | 48 | T_PROPERTY, |
| 49 | 49 | T_LABEL, |
| 50 | - ); |
|
| 50 | + ); |
|
| 51 | 51 | |
| 52 | 52 | }//end register() |
| 53 | 53 | |
@@ -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 | * Allow newlines instead of spaces. |
@@ -59,9 +59,9 @@ discard block |
||
| 59 | 59 | $operators = PHP_CodeSniffer_Tokens::$operators; |
| 60 | 60 | $assignment = PHP_CodeSniffer_Tokens::$assignmentTokens; |
| 61 | 61 | $inlineIf = array( |
| 62 | - T_INLINE_THEN, |
|
| 63 | - T_INLINE_ELSE, |
|
| 64 | - ); |
|
| 62 | + T_INLINE_THEN, |
|
| 63 | + T_INLINE_ELSE, |
|
| 64 | + ); |
|
| 65 | 65 | |
| 66 | 66 | return array_unique( |
| 67 | 67 | array_merge($comparison, $operators, $assignment, $inlineIf) |
@@ -219,16 +219,16 @@ discard block |
||
| 219 | 219 | // A list of tokens that indicate that the token is not |
| 220 | 220 | // part of an arithmetic operation. |
| 221 | 221 | $invalidTokens = array( |
| 222 | - T_COMMA => true, |
|
| 223 | - T_OPEN_PARENTHESIS => true, |
|
| 224 | - T_OPEN_SQUARE_BRACKET => true, |
|
| 225 | - T_OPEN_SHORT_ARRAY => true, |
|
| 226 | - T_DOUBLE_ARROW => true, |
|
| 227 | - T_COLON => true, |
|
| 228 | - T_INLINE_THEN => true, |
|
| 229 | - T_INLINE_ELSE => true, |
|
| 230 | - T_CASE => true, |
|
| 231 | - ); |
|
| 222 | + T_COMMA => true, |
|
| 223 | + T_OPEN_PARENTHESIS => true, |
|
| 224 | + T_OPEN_SQUARE_BRACKET => true, |
|
| 225 | + T_OPEN_SHORT_ARRAY => true, |
|
| 226 | + T_DOUBLE_ARROW => true, |
|
| 227 | + T_COLON => true, |
|
| 228 | + T_INLINE_THEN => true, |
|
| 229 | + T_INLINE_ELSE => true, |
|
| 230 | + T_CASE => true, |
|
| 231 | + ); |
|
| 232 | 232 | |
| 233 | 233 | if (isset($invalidTokens[$tokens[$prev]['code']]) === true) { |
| 234 | 234 | // Just trying to use a negative value; eg. myFunction($var, -2). |
@@ -261,9 +261,9 @@ discard block |
||
| 261 | 261 | ) { |
| 262 | 262 | $error = 'Expected 1 space before "%s"; %s found'; |
| 263 | 263 | $data = array( |
| 264 | - $operator, |
|
| 265 | - $found, |
|
| 266 | - ); |
|
| 264 | + $operator, |
|
| 265 | + $found, |
|
| 266 | + ); |
|
| 267 | 267 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data); |
| 268 | 268 | if ($fix === true) { |
| 269 | 269 | $phpcsFile->fixer->beginChangeset(); |
@@ -308,9 +308,9 @@ discard block |
||
| 308 | 308 | ) { |
| 309 | 309 | $error = 'Expected 1 space after "%s"; %s found'; |
| 310 | 310 | $data = array( |
| 311 | - $operator, |
|
| 312 | - $found, |
|
| 313 | - ); |
|
| 311 | + $operator, |
|
| 312 | + $found, |
|
| 313 | + ); |
|
| 314 | 314 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfter', $data); |
| 315 | 315 | if ($fix === true) { |
| 316 | 316 | $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | $operator, |
| 265 | 265 | $found, |
| 266 | 266 | ); |
| 267 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data); |
|
| 267 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingBefore', $data); |
|
| 268 | 268 | if ($fix === true) { |
| 269 | 269 | $phpcsFile->fixer->beginChangeset(); |
| 270 | 270 | if ($found === 'newline') { |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $operator, |
| 312 | 312 | $found, |
| 313 | 313 | ); |
| 314 | - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfter', $data); |
|
| 314 | + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfter', $data); |
|
| 315 | 315 | if ($fix === true) { |
| 316 | 316 | $phpcsFile->fixer->replaceToken(($stackPtr + 1), ' '); |
| 317 | 317 | } |
@@ -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 | /** |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | return array( |
| 52 | 52 | T_FUNCTION, |
| 53 | 53 | T_CLOSURE, |
| 54 | - ); |
|
| 54 | + ); |
|
| 55 | 55 | |
| 56 | 56 | }//end register() |
| 57 | 57 | |
@@ -78,9 +78,9 @@ discard block |
||
| 78 | 78 | $nextContent = $phpcsFile->findNext(T_WHITESPACE, ($openBrace + 1), null, true); |
| 79 | 79 | |
| 80 | 80 | if ($nextContent === $tokens[$stackPtr]['scope_closer']) { |
| 81 | - // The next bit of content is the closing brace, so this |
|
| 82 | - // is an empty function and should have a blank line |
|
| 83 | - // between the opening and closing braces. |
|
| 81 | + // The next bit of content is the closing brace, so this |
|
| 82 | + // is an empty function and should have a blank line |
|
| 83 | + // between the opening and closing braces. |
|
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | * @var array |
| 39 | 39 | */ |
| 40 | 40 | public $supportedTokenizers = array( |
| 41 | - 'PHP', |
|
| 42 | - 'JS', |
|
| 43 | - 'CSS', |
|
| 44 | - ); |
|
| 41 | + 'PHP', |
|
| 42 | + 'JS', |
|
| 43 | + 'CSS', |
|
| 44 | + ); |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * If TRUE, whitespace rules are not checked for blank lines. |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | T_COMMENT, |
| 68 | 68 | T_DOC_COMMENT_WHITESPACE, |
| 69 | 69 | T_CLOSURE, |
| 70 | - ); |
|
| 70 | + ); |
|
| 71 | 71 | |
| 72 | 72 | }//end register() |
| 73 | 73 | |