@@ -131,16 +131,16 @@ |
||
131 | 131 | && $lineLength > $this->absoluteLineLimit |
132 | 132 | ) { |
133 | 133 | $data = array( |
134 | - $this->absoluteLineLimit, |
|
135 | - $lineLength, |
|
134 | + $this->absoluteLineLimit, |
|
135 | + $lineLength, |
|
136 | 136 | ); |
137 | 137 | |
138 | 138 | $error = 'Line exceeds maximum limit of %s characters; contains %s characters'; |
139 | 139 | $phpcsFile->addError($error, $stackPtr, 'MaxExceeded', $data); |
140 | 140 | } else if ($lineLength > $this->lineLimit) { |
141 | 141 | $data = array( |
142 | - $this->lineLimit, |
|
143 | - $lineLength, |
|
142 | + $this->lineLimit, |
|
143 | + $lineLength, |
|
144 | 144 | ); |
145 | 145 | |
146 | 146 | $warning = 'Line exceeds %s characters; contains %s characters'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Returns an array of tokens this test wants to listen for. |
29 | 29 | * |
30 | - * @return array |
|
30 | + * @return integer[] |
|
31 | 31 | */ |
32 | 32 | public function register() |
33 | 33 | { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | /** |
40 | 40 | * Processes this test, when one of its tokens is encountered. |
41 | 41 | * |
42 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
42 | + * @param File $phpcsFile The file being scanned. |
|
43 | 43 | * @param int $stackPtr The position of the current token in the |
44 | 44 | * stack passed in $tokens. |
45 | 45 | * |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * |
210 | 210 | * Note that nested switches are ignored. |
211 | 211 | * |
212 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
212 | + * @param File $phpcsFile The file being scanned. |
|
213 | 213 | * @param int $stackPtr The position to start looking at. |
214 | 214 | * @param int $end The position to stop looking at. |
215 | 215 | * |
@@ -34,10 +34,10 @@ |
||
34 | 34 | * @var array |
35 | 35 | */ |
36 | 36 | public $supportedTokenizers = array( |
37 | - 'PHP', |
|
38 | - 'JS', |
|
39 | - 'CSS', |
|
40 | - ); |
|
37 | + 'PHP', |
|
38 | + 'JS', |
|
39 | + 'CSS', |
|
40 | + ); |
|
41 | 41 | |
42 | 42 | |
43 | 43 | /** |
@@ -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 integer[] |
|
30 | 30 | */ |
31 | 31 | public function register() |
32 | 32 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * Processes this sniff 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 | * |
@@ -59,9 +59,9 @@ |
||
59 | 59 | $lowercaseFilename = strtolower($filename); |
60 | 60 | if ($filename !== $lowercaseFilename) { |
61 | 61 | $data = array( |
62 | - $filename, |
|
63 | - $lowercaseFilename, |
|
64 | - ); |
|
62 | + $filename, |
|
63 | + $lowercaseFilename, |
|
64 | + ); |
|
65 | 65 | $error = 'Filename "%s" doesn\'t match the expected filename "%s"'; |
66 | 66 | $phpcsFile->addError($error, $stackPtr, 'NotFound', $data); |
67 | 67 | $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'no'); |
@@ -58,7 +58,7 @@ |
||
58 | 58 | $filename = basename($filename); |
59 | 59 | $lowercaseFilename = strtolower($filename); |
60 | 60 | if ($filename !== $lowercaseFilename) { |
61 | - $data = array( |
|
61 | + $data = array( |
|
62 | 62 | $filename, |
63 | 63 | $lowercaseFilename, |
64 | 64 | ); |
@@ -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 | * If true, an error will be thrown; otherwise a warning. |
@@ -242,11 +242,11 @@ discard block |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | $assignments[$assign] = array( |
245 | - 'var_end' => $varEnd, |
|
246 | - 'assign_len' => $assignLen, |
|
247 | - 'assign_col' => $assignColumn, |
|
248 | - 'expected' => $padding, |
|
249 | - 'found' => $found, |
|
245 | + 'var_end' => $varEnd, |
|
246 | + 'assign_len' => $assignLen, |
|
247 | + 'assign_col' => $assignColumn, |
|
248 | + 'expected' => $padding, |
|
249 | + 'found' => $found, |
|
250 | 250 | ); |
251 | 251 | |
252 | 252 | $lastLine = $tokens[$assign]['line']; |
@@ -288,9 +288,9 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | $errorData = array( |
291 | - $expectedText, |
|
292 | - $foundText, |
|
293 | - ); |
|
291 | + $expectedText, |
|
292 | + $foundText, |
|
293 | + ); |
|
294 | 294 | |
295 | 295 | if ($this->error === true) { |
296 | 296 | $fix = $phpcsFile->addFixableError($error, $assignment, $type, $errorData); |
@@ -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,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) { |
@@ -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) { |
@@ -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 | { |
@@ -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 | /** |
@@ -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 | /** |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | * @var array |
33 | 33 | */ |
34 | 34 | public $supportedTokenizers = array( |
35 | - 'PHP', |
|
36 | - 'JS', |
|
37 | - ); |
|
35 | + 'PHP', |
|
36 | + 'JS', |
|
37 | + ); |
|
38 | 38 | |
39 | 39 | |
40 | 40 | /** |
@@ -65,9 +65,9 @@ discard block |
||
65 | 65 | $commentEnd = $tokens[$stackPtr]['comment_closer']; |
66 | 66 | |
67 | 67 | $empty = array( |
68 | - T_DOC_COMMENT_WHITESPACE, |
|
69 | - T_DOC_COMMENT_STAR, |
|
70 | - ); |
|
68 | + T_DOC_COMMENT_WHITESPACE, |
|
69 | + T_DOC_COMMENT_STAR, |
|
70 | + ); |
|
71 | 71 | |
72 | 72 | $short = $phpcsFile->findNext($empty, ($stackPtr + 1), $commentEnd, true); |
73 | 73 | if ($short === false) { |
@@ -310,9 +310,9 @@ discard block |
||
310 | 310 | if ($padding !== $required) { |
311 | 311 | $error = 'Tag value indented incorrectly; expected %s spaces but found %s'; |
312 | 312 | $data = array( |
313 | - $required, |
|
314 | - $padding, |
|
315 | - ); |
|
313 | + $required, |
|
314 | + $padding, |
|
315 | + ); |
|
316 | 316 | |
317 | 317 | $fix = $phpcsFile->addFixableError($error, ($tag + 1), 'TagValueIndent', $data); |
318 | 318 | if ($fix === true) { |
@@ -30,7 +30,7 @@ discard block |
||
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 |
||
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 | * |