Skip to content
Browse files

Code standard change: The closing parenthesis of a multi-line functio…

…n declaration must be on the same line
  • Loading branch information...
1 parent 11115b4 commit 2f350fb59ff84235983b354d4a28fc977e09141e @elkuku committed
Showing with 4 additions and 5 deletions.
  1. +4 −5 build/phpcs/Joomla/Sniffs/Functions/FunctionDeclarationSniff.php
View
9 build/phpcs/Joomla/Sniffs/Functions/FunctionDeclarationSniff.php
@@ -215,11 +215,10 @@ public function processMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $st
true
);
- //-- elkuku: disabled
-// if ($tokens[$prev]['line'] === $tokens[$closeBracket]['line']) {
-// $error = 'The closing parenthesis of a multi-line function declaration must be on a new line';
-// $phpcsFile->addError($error, $closeBracket, 'CloseBracketLine');
-// }
+ if ($tokens[$prev]['line'] != $tokens[$closeBracket]['line']) {
+ $error = 'The closing parenthesis of a multi-line function declaration must be on the same line';
+ $phpcsFile->addError($error, $closeBracket, 'CloseBracketLine');
+ }
}//end processMultiLineDeclaration()

0 comments on commit 2f350fb

Please sign in to comment.
Something went wrong with that request. Please try again.