jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/404767 )
Change subject: Remove unneeded closing declaration comments ...................................................................... Remove unneeded closing declaration comments It does not place very well with the newline single comment sniff. Change-Id: I0cb7a9c7b54759dd3680380a23ac196e2cd993c3 --- M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php M MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php 2 files changed, 0 insertions(+), 17 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified Zoranzoki21: Looks good to me, but someone else must approve diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php index 3c63e4b..bb53b01 100644 --- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php +++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php @@ -57,7 +57,6 @@ public function register() { return [ T_FUNCTION ]; } - // end register() /** * Processes this test, when one of its tokens is encountered. @@ -172,7 +171,6 @@ $this->processParams( $phpcsFile, $stackPtr, $commentStart ); $this->processCovers( $phpcsFile, $stackPtr, $commentStart ); } - // end process() /** * Process the return comment of this function comment. @@ -351,9 +349,7 @@ $error = 'Missing @return tag in function comment'; $phpcsFile->addError( $error, $tokens[$commentStart]['comment_closer'], 'MissingReturn' ); } - // end if } - // end processReturn() /** * Process any throw tags that this function comment has. @@ -415,9 +411,7 @@ } } } - // end foreach } - // end processThrows() /** * Process any covers tags that this function comment has. @@ -445,9 +439,7 @@ } // TODO: Asset that the item being covered is valid. } - // end foreach } - // end processThrows() /** * Process the function parameter comments. @@ -534,12 +526,10 @@ $error = 'Missing parameter name'; $phpcsFile->addError( $error, $tag, 'MissingParamName' ); } - // end if } else { $error = 'Missing parameter type'; $phpcsFile->addError( $error, $tag, 'MissingParamType' ); } - // end if $params[] = [ 'tag' => $tag, 'type' => $type, @@ -551,7 +541,6 @@ 'var_space' => $varSpace, ]; } - // end foreach $realParams = $phpcsFile->getMethodParameters( $stackPtr ); $foundParams = []; // We want to use ... for all variable length arguments, so added @@ -662,7 +651,6 @@ $phpcsFile->addError( $error, $param['tag'], 'ExtraParamComment' ); } $foundParams[] = $var; - // end if // Check the short type of boolean and integer $explodedType = explode( '|', $param['type'] ); $fixType = false; @@ -714,7 +702,6 @@ } } } - // end foreach $realNames = []; foreach ( $realParams as $realParam ) { $realNames[] = $realParam['name']; @@ -727,7 +714,6 @@ $phpcsFile->addError( $error, $commentStart, 'MissingParamTag', $data ); } } - // end processParams() /** * Replace a @param comment @@ -997,4 +983,3 @@ } } } -// end class diff --git a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php index 5b22aeb..74bb5e9 100644 --- a/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php +++ b/MediaWiki/Tests/files/AlternativeSyntax/alternative_syntax.php @@ -71,5 +71,3 @@ echo $i; } } - -// end passed examples. -- To view, visit https://gerrit.wikimedia.org/r/404767 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0cb7a9c7b54759dd3680380a23ac196e2cd993c3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: Zoranzoki21 <zorandori4...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits