We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67307b3 commit fca9a8eCopy full SHA for fca9a8e
1 file changed
Oxid/Sniffs/Commenting/FunctionCommentSniff.php
@@ -115,7 +115,9 @@ protected function functionHasReturnStatement(PHP_CodeSniffer_File $phpcsFile, $
115
$returnStatement = false;
116
if (isset($sFunctionToken['scope_closer']) and isset($sFunctionToken['scope_opener'])) {
117
$startSearch = $continueSearch !== null ? $continueSearch : $sFunctionToken['scope_opener'];
118
- $returnStatement = $phpcsFile->findNext(T_RETURN, $startSearch, $sFunctionToken['scope_closer']);
+ $returnStatement =
119
+ $phpcsFile->findNext(T_RETURN, $startSearch, $sFunctionToken['scope_closer'])
120
+ || $phpcsFile->findNext(T_YIELD, $startSearch, $sFunctionToken['scope_closer']);
121
}
122
123
if ($returnStatement !== false) {
0 commit comments