The method isAnonymous() does not exist on PhpParser\Node. It seems like you code against a sub-type of PhpParser\Node such as PhpParser\Node\Stmt\Class_.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
33
if ($node->/** @scrutinizer ignore-call */ isAnonymous()) {
Loading history...
34
return [];
35
}
36
37
$classReflection = $scope->getClassReflection();
38
if (!$classReflection instanceof ClassReflection) {