We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86143b3 commit efe9d12Copy full SHA for efe9d12
PhpCollective/Sniffs/Commenting/DocBlockReturnVoidSniff.php
@@ -391,6 +391,9 @@ protected function documentedReturnType(array $tokens, int $docBlockReturnIndex)
391
protected function hasReturnType(File $phpcsFile, int $stackPtr): bool
392
{
393
$tokens = $phpcsFile->getTokens();
394
+ if (empty($tokens[$stackPtr]['parenthesis_closer']) || empty($tokens[$stackPtr]['scope_opener'])) {
395
+ return false;
396
+ }
397
398
$parenthesisCloserIndex = $tokens[$stackPtr]['parenthesis_closer'];
399
$scopeOpenerIndex = $tokens[$stackPtr]['scope_opener'];
0 commit comments