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 17813d7 commit 871fd97Copy full SHA for 871fd97
src/NodeVisitor.php
@@ -420,7 +420,8 @@ function (\PhpParser\Node\Const_ $const) {
420
// Only @var comments are actual, useful documentation for stubs
421
if (
422
$this->needsDocumentedGlobals &&
423
- preg_match('/@(?:[a-z]+-)?var\s/', (string) $node->getDocComment())
+ $node->getDocComment() &&
424
+ preg_match('/@(?:[a-z]+-)?var\s/', $node->getDocComment()->getText())
425
) {
426
$this->count('globals', $node->expr->var->name);
427
return $this->needsDocumentedGlobals;
0 commit comments