@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | if ($tokens[$openBracket]['code'] !== T_OPEN_PARENTHESIS) { |
| 90 | 90 | $functionKeyword = $phpcsFile->findPrevious( |
| 91 | 91 | array( |
| 92 | - T_WHITESPACE, |
|
| 93 | - T_COMMA, |
|
| 94 | - T_COMMENT, |
|
| 95 | - T_STRING, |
|
| 96 | - T_NS_SEPARATOR, |
|
| 92 | + T_WHITESPACE, |
|
| 93 | + T_COMMA, |
|
| 94 | + T_COMMENT, |
|
| 95 | + T_STRING, |
|
| 96 | + T_NS_SEPARATOR, |
|
| 97 | 97 | ), |
| 98 | 98 | ($stackPtr - 1), |
| 99 | 99 | null, |
@@ -114,9 +114,9 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | $error = 'Class constants must be uppercase; expected %s but found %s'; |
| 116 | 116 | $data = array( |
| 117 | - strtoupper($constName), |
|
| 118 | - $constName, |
|
| 119 | - ); |
|
| 117 | + strtoupper($constName), |
|
| 118 | + $constName, |
|
| 119 | + ); |
|
| 120 | 120 | $phpcsFile->addError($error, $stackPtr, 'ClassConstantNotUpperCase', $data); |
| 121 | 121 | } else { |
| 122 | 122 | $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'upper'); |
@@ -166,9 +166,9 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | $error = 'Constants must be uppercase; expected %s but found %s'; |
| 168 | 168 | $data = array( |
| 169 | - $prefix.strtoupper($constName), |
|
| 170 | - $prefix.$constName, |
|
| 171 | - ); |
|
| 169 | + $prefix.strtoupper($constName), |
|
| 170 | + $prefix.$constName, |
|
| 171 | + ); |
|
| 172 | 172 | $phpcsFile->addError($error, $stackPtr, 'ConstantNotUpperCase', $data); |
| 173 | 173 | } else { |
| 174 | 174 | $phpcsFile->recordMetric($stackPtr, 'Constant name case', 'upper'); |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | * @var array |
| 39 | 39 | */ |
| 40 | 40 | protected $properties = array( |
| 41 | - 'svn:keywords' => 'Author Id Revision', |
|
| 42 | - 'svn:eol-style' => 'native', |
|
| 41 | + 'svn:keywords' => 'Author Id Revision', |
|
| 42 | + 'svn:eol-style' => 'native', |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | |
@@ -89,9 +89,9 @@ discard block |
||
| 89 | 89 | ) { |
| 90 | 90 | $error = 'Unexpected Subversion property "%s" = "%s"'; |
| 91 | 91 | $data = array( |
| 92 | - $key, |
|
| 93 | - $properties[$key], |
|
| 94 | - ); |
|
| 92 | + $key, |
|
| 93 | + $properties[$key], |
|
| 94 | + ); |
|
| 95 | 95 | $phpcsFile->addError($error, $stackPtr, 'Unexpected', $data); |
| 96 | 96 | continue; |
| 97 | 97 | } |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | ) { |
| 102 | 102 | $error = 'Missing Subversion property "%s" = "%s"'; |
| 103 | 103 | $data = array( |
| 104 | - $key, |
|
| 105 | - $this->properties[$key], |
|
| 106 | - ); |
|
| 104 | + $key, |
|
| 105 | + $this->properties[$key], |
|
| 106 | + ); |
|
| 107 | 107 | $phpcsFile->addError($error, $stackPtr, 'Missing', $data); |
| 108 | 108 | continue; |
| 109 | 109 | } |
@@ -113,10 +113,10 @@ discard block |
||
| 113 | 113 | ) { |
| 114 | 114 | $error = 'Subversion property "%s" = "%s" does not match "%s"'; |
| 115 | 115 | $data = array( |
| 116 | - $key, |
|
| 117 | - $properties[$key], |
|
| 118 | - $this->properties[$key], |
|
| 119 | - ); |
|
| 116 | + $key, |
|
| 117 | + $properties[$key], |
|
| 118 | + $this->properties[$key], |
|
| 119 | + ); |
|
| 120 | 120 | $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data); |
| 121 | 121 | } |
| 122 | 122 | }//end foreach |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * Returns an array of tokens this test wants to listen for. |
| 43 | 43 | * |
| 44 | - * @return array |
|
| 44 | + * @return integer[] |
|
| 45 | 45 | */ |
| 46 | 46 | public function register() |
| 47 | 47 | { |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | $data = array( |
| 111 | 111 | $code, |
| 112 | 112 | $error, |
| 113 | - ); |
|
| 113 | + ); |
|
| 114 | 114 | if (in_array($code, $this->errorCodes) === true) { |
| 115 | 115 | $phpcsFile->addErrorOnLine($message, $line, 'ExternalToolError', $data); |
| 116 | 116 | } else { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * Returns the token types that this sniff is interested in. |
| 41 | 41 | * |
| 42 | - * @return int[] |
|
| 42 | + * @return integer[] |
|
| 43 | 43 | */ |
| 44 | 44 | public function register() |
| 45 | 45 | { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * @param int $stackPtr The position in the stack where |
| 56 | 56 | * the token was found. |
| 57 | 57 | * |
| 58 | - * @return void |
|
| 58 | + * @return null|integer |
|
| 59 | 59 | * @throws PHP_CodeSniffer_Exception If jslint.js could not be run |
| 60 | 60 | */ |
| 61 | 61 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | * @var array |
| 37 | 37 | */ |
| 38 | 38 | public $supportedTokenizers = array( |
| 39 | - 'PHP', |
|
| 40 | - 'JS', |
|
| 41 | - 'CSS', |
|
| 42 | - ); |
|
| 39 | + 'PHP', |
|
| 40 | + 'JS', |
|
| 41 | + 'CSS', |
|
| 42 | + ); |
|
| 43 | 43 | |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | T_INLINE_HTML => true, |
| 75 | 75 | T_DOC_COMMENT_WHITESPACE => true, |
| 76 | 76 | T_DOC_COMMENT_STRING => true, |
| 77 | - ); |
|
| 77 | + ); |
|
| 78 | 78 | |
| 79 | 79 | for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) { |
| 80 | 80 | if (isset($checkTokens[$tokens[$i]['code']]) === false) { |
@@ -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) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** |
| 33 | 33 | * Returns an array of tokens this test wants to listen for. |
| 34 | 34 | * |
| 35 | - * @return array |
|
| 35 | + * @return integer[] |
|
| 36 | 36 | */ |
| 37 | 37 | public function register() |
| 38 | 38 | { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @param int $stackPtr The position of the current token in |
| 49 | 49 | * the stack passed in $tokens. |
| 50 | 50 | * |
| 51 | - * @return void |
|
| 51 | + * @return integer |
|
| 52 | 52 | */ |
| 53 | 53 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
| 54 | 54 | { |
@@ -84,10 +84,10 @@ |
||
| 84 | 84 | $nextSeparator = $openBracket; |
| 85 | 85 | |
| 86 | 86 | $find = array( |
| 87 | - T_COMMA, |
|
| 88 | - T_VARIABLE, |
|
| 89 | - T_CLOSURE, |
|
| 90 | - T_OPEN_SHORT_ARRAY, |
|
| 87 | + T_COMMA, |
|
| 88 | + T_VARIABLE, |
|
| 89 | + T_CLOSURE, |
|
| 90 | + T_OPEN_SHORT_ARRAY, |
|
| 91 | 91 | ); |
| 92 | 92 | |
| 93 | 93 | while (($nextSeparator = $phpcsFile->findNext($find, ($nextSeparator + 1), $closeBracket)) !== false) { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | return array( |
| 57 | 57 | T_FUNCTION, |
| 58 | 58 | T_CLOSURE, |
| 59 | - ); |
|
| 59 | + ); |
|
| 60 | 60 | |
| 61 | 61 | }//end register() |
| 62 | 62 | |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | $error = 'Opening brace indented incorrectly; expected %s spaces, found %s'; |
| 170 | 170 | $data = array( |
| 171 | - $expected, |
|
| 172 | - $found, |
|
| 173 | - ); |
|
| 171 | + $expected, |
|
| 172 | + $found, |
|
| 173 | + ); |
|
| 174 | 174 | |
| 175 | 175 | $fix = $phpcsFile->addFixableError($error, $openingBrace, 'BraceIndent', $data); |
| 176 | 176 | if ($fix === true) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | return array( |
| 40 | 40 | T_STRING, |
| 41 | 41 | T_VARIABLE, |
| 42 | - ); |
|
| 42 | + ); |
|
| 43 | 43 | |
| 44 | 44 | }//end register() |
| 45 | 45 | |
@@ -95,9 +95,9 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | $nextSeparator = $openBracket; |
| 97 | 97 | $find = array( |
| 98 | - T_VARIABLE, |
|
| 99 | - T_OPEN_SHORT_ARRAY, |
|
| 100 | - ); |
|
| 98 | + T_VARIABLE, |
|
| 99 | + T_OPEN_SHORT_ARRAY, |
|
| 100 | + ); |
|
| 101 | 101 | |
| 102 | 102 | while (($nextSeparator = $phpcsFile->findNext($find, ($nextSeparator + 1), $closeBracket)) !== false) { |
| 103 | 103 | if (isset($tokens[$nextSeparator]['nested_parenthesis']) === false) { |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * Returns an array of tokens this test wants to listen for. |
| 43 | 43 | * |
| 44 | - * @return array |
|
| 44 | + * @return integer[] |
|
| 45 | 45 | */ |
| 46 | 46 | public function register() |
| 47 | 47 | { |
@@ -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 | /** |