Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
Return in closure not checked for @return comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jdlabails committed Mar 11, 2016
1 parent 0937a30 commit 7be0d2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Symfony2/Sniffs/Commenting/FunctionCommentSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected function processReturn(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $co
// iterate over all return statements of this function,
// run the check on the first which is not only 'return;'
while ($returnToken = $phpcsFile->findNext(T_RETURN, $start, $tokens[$stackPtr]['scope_closer'])) {
if ($this->isMatchingReturn($tokens, $returnToken)) {
if ($this->isMatchingReturn($tokens, $returnToken) && !in_array('PHPCS_T_CLOSURE', $tokens[$returnToken]['conditions'])) {
parent::processReturn($phpcsFile, $stackPtr, $commentStart);
break;
}
Expand Down

0 comments on commit 7be0d2b

Please sign in to comment.