@@ -81,7 +81,7 @@ |
||
| 81 | 81 | $stackPtr, |
| 82 | 82 | $currScope |
| 83 | 83 | ) { |
| 84 | - $find = array( |
|
| 84 | + $find = array( |
|
| 85 | 85 | T_COMMENT, |
| 86 | 86 | T_DOC_COMMENT_CLOSE_TAG, |
| 87 | 87 | T_CLASS, |
@@ -193,7 +193,7 @@ |
||
| 193 | 193 | T_STRING, |
| 194 | 194 | ); |
| 195 | 195 | |
| 196 | - $start = $phpcsFile->findNext( |
|
| 196 | + $start = $phpcsFile->findNext( |
|
| 197 | 197 | PHP_CodeSniffer_Tokens::$emptyTokens, |
| 198 | 198 | ($stackPtr + 1), |
| 199 | 199 | null, |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | ',', |
| 29 | 29 | array_filter( |
| 30 | 30 | $standards, |
| 31 | - function ($v) use ($myStandardName) { |
|
| 31 | + function($v) use ($myStandardName) { |
|
| 32 | 32 | return $v !== $myStandardName; |
| 33 | 33 | } |
| 34 | 34 | ) |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | '@throws' => 1, |
| 81 | 81 | '@var' => 2, |
| 82 | 82 | ); |
| 83 | - $scanTokens = array( |
|
| 83 | + $scanTokens = array( |
|
| 84 | 84 | T_NS_SEPARATOR, |
| 85 | 85 | T_DOC_COMMENT_OPEN_TAG, |
| 86 | 86 | ); |
@@ -216,13 +216,13 @@ discard block |
||
| 216 | 216 | $end, |
| 217 | 217 | true |
| 218 | 218 | ); |
| 219 | - $classNameEnd = $phpcsFile->findNext( |
|
| 219 | + $classNameEnd = $phpcsFile->findNext( |
|
| 220 | 220 | $this->classNameTokens, |
| 221 | 221 | ($classNameStart + 1), |
| 222 | 222 | $end, |
| 223 | 223 | true |
| 224 | 224 | ); |
| 225 | - $useEnd = $phpcsFile->findNext( |
|
| 225 | + $useEnd = $phpcsFile->findNext( |
|
| 226 | 226 | array( |
| 227 | 227 | T_SEMICOLON, |
| 228 | 228 | T_COMMA, |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $classNameEnd, |
| 231 | 231 | $end |
| 232 | 232 | ); |
| 233 | - $aliasNamePtr = $phpcsFile->findPrevious( |
|
| 233 | + $aliasNamePtr = $phpcsFile->findPrevious( |
|
| 234 | 234 | PHP_CodeSniffer_Tokens::$emptyTokens, |
| 235 | 235 | ($useEnd - 1), |
| 236 | 236 | null, |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | $namespace, |
| 335 | 335 | $startPtr, |
| 336 | 336 | $endPtr, |
| 337 | - $isDocBlock=false |
|
| 337 | + $isDocBlock = false |
|
| 338 | 338 | ) { |
| 339 | 339 | $msg = 'Shorthand possible. Replace "%s" with "%s"'; |
| 340 | 340 | $code = 'UnnecessaryNamespaceUsage'; |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | } else if (strpos($fullClassName, $namespace) === 0) { |
| 364 | 364 | $replacement = substr($fullClassName, strlen($namespace)); |
| 365 | 365 | |
| 366 | - $data = array( |
|
| 366 | + $data = array( |
|
| 367 | 367 | $className, |
| 368 | 368 | $replacement, |
| 369 | 369 | ); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | * @return array<int, int> |
| 47 | 47 | * @throws RuntimeException |
| 48 | 48 | */ |
| 49 | - protected function getErrorList($testFile='') |
|
| 49 | + protected function getErrorList($testFile = '') |
|
| 50 | 50 | { |
| 51 | 51 | switch ($testFile) { |
| 52 | 52 | case 'VariableInDoubleQuotedStringUnitTest.pass.inc': |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | * @return array<int, int> |
| 47 | 47 | * @throws RuntimeException |
| 48 | 48 | */ |
| 49 | - protected function getErrorList($testFile='') |
|
| 49 | + protected function getErrorList($testFile = '') |
|
| 50 | 50 | { |
| 51 | 51 | switch ($testFile) { |
| 52 | 52 | case 'PropertyCommentUnitTest.pass.inc': |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | * @return array<int, int> |
| 48 | 48 | * @throws RuntimeException |
| 49 | 49 | */ |
| 50 | - protected function getErrorList($testFile='') |
|
| 50 | + protected function getErrorList($testFile = '') |
|
| 51 | 51 | { |
| 52 | 52 | switch ($testFile) { |
| 53 | 53 | case 'AlphabeticalUseStatementsUnitTest.pass.inc': |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | * @return array<int, int> |
| 48 | 48 | * @throws RuntimeException |
| 49 | 49 | */ |
| 50 | - protected function getErrorList($testFile='') |
|
| 50 | + protected function getErrorList($testFile = '') |
|
| 51 | 51 | { |
| 52 | 52 | switch ($testFile) { |
| 53 | 53 | case 'UseArrayShortTagUnitTest.pass.inc': |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | * @return array<int, int> |
| 47 | 47 | * @throws RuntimeException |
| 48 | 48 | */ |
| 49 | - protected function getErrorList($testFile='') |
|
| 49 | + protected function getErrorList($testFile = '') |
|
| 50 | 50 | { |
| 51 | 51 | switch ($testFile) { |
| 52 | 52 | case 'ArrayAlignmentUnitTest.pass.inc': |