@@ -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 |
@@ -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 |
@@ -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 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='CreateWidgetTypeCallbackUnitTest.js') |
|
43 | + public function getErrorList($testFile = 'CreateWidgetTypeCallbackUnitTest.js') |
|
44 | 44 | { |
45 | 45 | return array( |
46 | 46 | 18 => 1, |
@@ -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 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='AssignThisUnitTest.js') |
|
43 | + public function getErrorList($testFile = 'AssignThisUnitTest.js') |
|
44 | 44 | { |
45 | 45 | if ($testFile !== 'AssignThisUnitTest.js') { |
46 | 46 | return array(); |
@@ -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 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | T_ELSEIF, |
63 | 63 | T_TRY, |
64 | 64 | T_CATCH, |
65 | - ); |
|
65 | + ); |
|
66 | 66 | |
67 | 67 | }//end register() |
68 | 68 | |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | if ($spaceAfterOpen !== $this->requiredSpacesAfterOpen) { |
105 | 105 | $error = 'Expected %s spaces after opening bracket; %s found'; |
106 | 106 | $data = array( |
107 | - $this->requiredSpacesAfterOpen, |
|
108 | - $spaceAfterOpen, |
|
109 | - ); |
|
107 | + $this->requiredSpacesAfterOpen, |
|
108 | + $spaceAfterOpen, |
|
109 | + ); |
|
110 | 110 | $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); |
111 | 111 | if ($fix === true) { |
112 | 112 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
@@ -131,9 +131,9 @@ discard block |
||
131 | 131 | if ($spaceBeforeClose !== $this->requiredSpacesBeforeClose) { |
132 | 132 | $error = 'Expected %s spaces before closing bracket; %s found'; |
133 | 133 | $data = array( |
134 | - $this->requiredSpacesBeforeClose, |
|
135 | - $spaceBeforeClose, |
|
136 | - ); |
|
134 | + $this->requiredSpacesBeforeClose, |
|
135 | + $spaceBeforeClose, |
|
136 | + ); |
|
137 | 137 | $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); |
138 | 138 | if ($fix === true) { |
139 | 139 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->requiredSpacesAfterOpen, |
108 | 108 | $spaceAfterOpen, |
109 | 109 | ); |
110 | - $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); |
|
110 | + $fix = $phpcsFile->addFixableError($error, ($parenOpener + 1), 'SpacingAfterOpenBrace', $data); |
|
111 | 111 | if ($fix === true) { |
112 | 112 | $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); |
113 | 113 | if ($spaceAfterOpen === 0) { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $this->requiredSpacesBeforeClose, |
135 | 135 | $spaceBeforeClose, |
136 | 136 | ); |
137 | - $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); |
|
137 | + $fix = $phpcsFile->addFixableError($error, ($parenCloser - 1), 'SpaceBeforeCloseBrace', $data); |
|
138 | 138 | if ($fix === true) { |
139 | 139 | $padding = str_repeat(' ', $this->requiredSpacesBeforeClose); |
140 | 140 | if ($spaceBeforeClose === 0) { |
@@ -80,18 +80,18 @@ |
||
80 | 80 | $prefix = $stackPtr; |
81 | 81 | while (($prefix = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$methodPrefixes, ($prefix - 1), $prev)) !== false) { |
82 | 82 | switch ($tokens[$prefix]['code']) { |
83 | - case T_STATIC: |
|
84 | - $static = $prefix; |
|
85 | - break; |
|
86 | - case T_ABSTRACT: |
|
87 | - $abstract = $prefix; |
|
88 | - break; |
|
89 | - case T_FINAL: |
|
90 | - $final = $prefix; |
|
91 | - break; |
|
92 | - default: |
|
93 | - $visibility = $prefix; |
|
94 | - break; |
|
83 | + case T_STATIC: |
|
84 | + $static = $prefix; |
|
85 | + break; |
|
86 | + case T_ABSTRACT: |
|
87 | + $abstract = $prefix; |
|
88 | + break; |
|
89 | + case T_FINAL: |
|
90 | + $final = $prefix; |
|
91 | + break; |
|
92 | + default: |
|
93 | + $visibility = $prefix; |
|
94 | + break; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Processes the function tokens within the class. |
32 | 32 | * |
33 | - * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found. |
|
33 | + * @param File $phpcsFile The file where this token was found. |
|
34 | 34 | * @param int $stackPtr The position where the token was found. |
35 | 35 | * @param int $currScope The current scope opener token. |
36 | 36 | * |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | * Processes a token that is found within the scope that this test is |
181 | 181 | * listening to. |
182 | 182 | * |
183 | - * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found. |
|
183 | + * @param File $phpcsFile The file where this token was found. |
|
184 | 184 | * @param int $stackPtr The position in the stack where this |
185 | 185 | * token was found. |
186 | 186 | * |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $prevContent, |
91 | 91 | $stackPtrType, |
92 | 92 | $spaces, |
93 | - ); |
|
93 | + ); |
|
94 | 94 | |
95 | 95 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceBeforeKeyword', $data); |
96 | 96 | if ($fix === true) { |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $data = array( |
106 | 106 | $prevContent, |
107 | 107 | $stackPtrType, |
108 | - ); |
|
108 | + ); |
|
109 | 109 | |
110 | 110 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NewlineBeforeKeyword', $data); |
111 | 111 | if ($fix === true) { |
@@ -137,10 +137,10 @@ discard block |
||
137 | 137 | $found = strlen($gap); |
138 | 138 | $error = 'Expected 1 space between %s keyword and %s name; %s found'; |
139 | 139 | $data = array( |
140 | - $stackPtrType, |
|
141 | - $stackPtrType, |
|
142 | - $found, |
|
143 | - ); |
|
140 | + $stackPtrType, |
|
141 | + $stackPtrType, |
|
142 | + $found, |
|
143 | + ); |
|
144 | 144 | |
145 | 145 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterKeyword', $data); |
146 | 146 | if ($fix === true) { |
@@ -155,9 +155,9 @@ discard block |
||
155 | 155 | $found = strlen($gap); |
156 | 156 | $error = 'Expected 1 space after %s name; %s found'; |
157 | 157 | $data = array( |
158 | - $stackPtrType, |
|
159 | - $found, |
|
160 | - ); |
|
158 | + $stackPtrType, |
|
159 | + $found, |
|
160 | + ); |
|
161 | 161 | |
162 | 162 | $fix = $phpcsFile->addFixableError($error, $className, 'SpaceAfterName', $data); |
163 | 163 | if ($fix === true) { |
@@ -227,8 +227,8 @@ discard block |
||
227 | 227 | } |
228 | 228 | |
229 | 229 | $find = array( |
230 | - T_STRING, |
|
231 | - $keywordTokenType, |
|
230 | + T_STRING, |
|
231 | + $keywordTokenType, |
|
232 | 232 | ); |
233 | 233 | |
234 | 234 | $classNames = array(); |
@@ -255,8 +255,8 @@ discard block |
||
255 | 255 | ) { |
256 | 256 | $prev = $phpcsFile->findPrevious( |
257 | 257 | array( |
258 | - T_NS_SEPARATOR, |
|
259 | - T_WHITESPACE, |
|
258 | + T_NS_SEPARATOR, |
|
259 | + T_WHITESPACE, |
|
260 | 260 | ), |
261 | 261 | ($className - 1), |
262 | 262 | $implements, |
@@ -319,9 +319,9 @@ discard block |
||
319 | 319 | if ($found !== $expected) { |
320 | 320 | $error = 'Expected %s spaces before interface name; %s found'; |
321 | 321 | $data = array( |
322 | - $expected, |
|
323 | - $found, |
|
324 | - ); |
|
322 | + $expected, |
|
323 | + $found, |
|
324 | + ); |
|
325 | 325 | $fix = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data); |
326 | 326 | if ($fix === true) { |
327 | 327 | $padding = str_repeat(' ', $expected); |
@@ -358,9 +358,9 @@ discard block |
||
358 | 358 | if ($spaceBefore !== 1) { |
359 | 359 | $error = 'Expected 1 space before "%s"; %s found'; |
360 | 360 | $data = array( |
361 | - $tokens[$className]['content'], |
|
362 | - $spaceBefore, |
|
363 | - ); |
|
361 | + $tokens[$className]['content'], |
|
362 | + $spaceBefore, |
|
363 | + ); |
|
364 | 364 | |
365 | 365 | $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeName', $data); |
366 | 366 | if ($fix === true) { |
@@ -380,9 +380,9 @@ discard block |
||
380 | 380 | if ($tokens[($className + 2)]['code'] !== $keywordTokenType) { |
381 | 381 | $error = 'Expected 0 spaces between "%s" and comma; %s found'; |
382 | 382 | $data = array( |
383 | - $tokens[$className]['content'], |
|
384 | - strlen($tokens[($className + 1)]['content']), |
|
385 | - ); |
|
383 | + $tokens[$className]['content'], |
|
384 | + strlen($tokens[($className + 1)]['content']), |
|
385 | + ); |
|
386 | 386 | |
387 | 387 | $fix = $phpcsFile->addFixableError($error, $className, 'SpaceBeforeComma', $data); |
388 | 388 | if ($fix === true) { |
@@ -322,7 +322,7 @@ |
||
322 | 322 | $expected, |
323 | 323 | $found, |
324 | 324 | ); |
325 | - $fix = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data); |
|
325 | + $fix = $phpcsFile->addFixableError($error, $className, 'InterfaceWrongIndent', $data); |
|
326 | 326 | if ($fix === true) { |
327 | 327 | $padding = str_repeat(' ', $expected); |
328 | 328 | if ($found === 0) { |
@@ -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 | * |
@@ -28,15 +28,15 @@ |
||
28 | 28 | public function getErrorList($testFile='') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'EndFileNewlineUnitTest.1.inc': |
|
32 | - case 'EndFileNewlineUnitTest.3.inc': |
|
33 | - case 'EndFileNewlineUnitTest.6.inc': |
|
34 | - case 'EndFileNewlineUnitTest.7.inc': |
|
35 | - return array(2 => 1); |
|
36 | - break; |
|
37 | - default: |
|
38 | - return array(); |
|
39 | - break; |
|
31 | + case 'EndFileNewlineUnitTest.1.inc': |
|
32 | + case 'EndFileNewlineUnitTest.3.inc': |
|
33 | + case 'EndFileNewlineUnitTest.6.inc': |
|
34 | + case 'EndFileNewlineUnitTest.7.inc': |
|
35 | + return array(2 => 1); |
|
36 | + break; |
|
37 | + default: |
|
38 | + return array(); |
|
39 | + break; |
|
40 | 40 | }//end switch |
41 | 41 | |
42 | 42 | }//end getErrorList() |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getErrorList($testFile='') |
|
43 | + public function getErrorList($testFile = '') |
|
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | 46 | case 'EndFileNoNewlineUnitTest.1.inc': |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * |
76 | 76 | * @return array<int, int> |
77 | 77 | */ |
78 | - public function getWarningList($testFile='') |
|
78 | + public function getWarningList($testFile = '') |
|
79 | 79 | { |
80 | 80 | return array(); |
81 | 81 |