Skip to content
Permalink
Browse files

Fix #2340 - don’t stub functions unnecessarily

  • Loading branch information
muglug committed Nov 14, 2019
1 parent 5fabf41 commit 8154a9ef16d135f114c55d777e96eb7c88f8afd4
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/Psalm/Internal/Visitor/ReflectorVisitor.php
@@ -653,11 +653,13 @@ public function leaveNode(PhpParser\Node $node)
if (!$this->file_storage->has_visitor_issues) {
$this->codebase->cacheClassLikeStorage($classlike_storage, $this->file_path);
}
} elseif ($node instanceof PhpParser\Node\Stmt\Function_
|| $node instanceof PhpParser\Node\Stmt\ClassMethod
) {
$this->function_template_types = [];
} elseif ($node instanceof PhpParser\Node\FunctionLike) {
if ($node instanceof PhpParser\Node\Stmt\Function_
|| $node instanceof PhpParser\Node\Stmt\ClassMethod
) {
$this->function_template_types = [];
}
if ($this->skip_if_descendants) {
return;
}

0 comments on commit 8154a9e

Please sign in to comment.
You can’t perform that action at this time.