@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | public function register() |
| 16 | 16 | { |
| 17 | - return [T_RETURN]; |
|
| 17 | + return [ T_RETURN ]; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -30,13 +30,13 @@ discard block |
||
| 30 | 30 | $returnTokenIndex = $stackPtr; |
| 31 | 31 | |
| 32 | 32 | $scope = array_slice($tokens, $returnTokenIndex, null, true); |
| 33 | - $semicolons = array_filter($scope, function ($token) { |
|
| 34 | - return $token['type'] === 'T_SEMICOLON'; |
|
| 33 | + $semicolons = array_filter($scope, function($token) { |
|
| 34 | + return $token[ 'type' ] === 'T_SEMICOLON'; |
|
| 35 | 35 | }); |
| 36 | 36 | |
| 37 | 37 | $returnValueIndex = key($semicolons) - 1; |
| 38 | 38 | |
| 39 | - if ($scope[$returnValueIndex]['type'] === 'T_NULL') { |
|
| 39 | + if ($scope[ $returnValueIndex ][ 'type' ] === 'T_NULL') { |
|
| 40 | 40 | $error = "Return null value found."; |
| 41 | 41 | $phpcsFile->addError($error, $returnValueIndex); |
| 42 | 42 | } |