@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function register() |
| 23 | 23 | { |
| 24 | - return [T_CLASS]; |
|
| 24 | + return [ T_CLASS ]; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
| 36 | 36 | { |
| 37 | 37 | $tokens = $phpcsFile->getTokens(); |
| 38 | - $token = $tokens[$stackPtr]; |
|
| 38 | + $token = $tokens[ $stackPtr ]; |
|
| 39 | 39 | |
| 40 | - $openParenthesis = $tokens[$token['scope_opener']]; |
|
| 41 | - $closedParenthesis = $tokens[$token['scope_closer']]; |
|
| 40 | + $openParenthesis = $tokens[ $token[ 'scope_opener' ] ]; |
|
| 41 | + $closedParenthesis = $tokens[ $token[ 'scope_closer' ] ]; |
|
| 42 | 42 | |
| 43 | - $classLength = $closedParenthesis['line'] - $openParenthesis['line']; |
|
| 43 | + $classLength = $closedParenthesis[ 'line' ] - $openParenthesis[ 'line' ]; |
|
| 44 | 44 | |
| 45 | 45 | if ($classLength > $this->maxLength) { |
| 46 | 46 | $phpcsFile->addError("Class is {$classLength} lines. Must be {$this->maxLength} lines or fewer.", $stackPtr); |