Skip to content

Commit efe9d12

Browse files
committed
Fix up tests.
1 parent 86143b3 commit efe9d12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

PhpCollective/Sniffs/Commenting/DocBlockReturnVoidSniff.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ protected function documentedReturnType(array $tokens, int $docBlockReturnIndex)
391391
protected function hasReturnType(File $phpcsFile, int $stackPtr): bool
392392
{
393393
$tokens = $phpcsFile->getTokens();
394+
if (empty($tokens[$stackPtr]['parenthesis_closer']) || empty($tokens[$stackPtr]['scope_opener'])) {
395+
return false;
396+
}
394397

395398
$parenthesisCloserIndex = $tokens[$stackPtr]['parenthesis_closer'];
396399
$scopeOpenerIndex = $tokens[$stackPtr]['scope_opener'];

0 commit comments

Comments
 (0)