mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Don’t do last-minute checks for classes
This commit is contained in:
parent
29e78c5df1
commit
99eb903b0d
@ -258,13 +258,6 @@ class ClassLikes
|
||||
)
|
||||
&& !$this->classlike_storage_provider->has($fq_class_name_lc)
|
||||
) {
|
||||
if ($this->debug_output) {
|
||||
echo 'Last-chance attempt to hydrate ' . $fq_class_name . "\n";
|
||||
}
|
||||
// attempt to load in the class
|
||||
$this->scanner->queueClassLikeForScanning($fq_class_name);
|
||||
$this->codebase->scanFiles();
|
||||
|
||||
if (!isset($this->existing_classes_lc[$fq_class_name_lc])) {
|
||||
$this->existing_classes_lc[$fq_class_name_lc] = false;
|
||||
|
||||
@ -307,14 +300,6 @@ class ClassLikes
|
||||
)
|
||||
&& !$this->classlike_storage_provider->has($fq_class_name_lc)
|
||||
) {
|
||||
if ($this->debug_output) {
|
||||
echo 'Last-chance attempt to hydrate ' . $fq_class_name . "\n";
|
||||
}
|
||||
|
||||
// attempt to load in the class
|
||||
$this->scanner->queueClassLikeForScanning($fq_class_name);
|
||||
$this->scanner->scanFiles($this);
|
||||
|
||||
if (!isset($this->existing_interfaces_lc[$fq_class_name_lc])) {
|
||||
$this->existing_interfaces_lc[$fq_class_name_lc] = false;
|
||||
|
||||
|
@ -376,6 +376,10 @@ class DependencyFinderVisitor extends PhpParser\NodeVisitorAbstract implements P
|
||||
} elseif ($node instanceof PhpParser\Node\Expr\Assign
|
||||
|| $node instanceof PhpParser\Node\Expr\AssignOp
|
||||
|| $node instanceof PhpParser\Node\Expr\AssignRef
|
||||
|| $node instanceof PhpParser\Node\Stmt\For_
|
||||
|| $node instanceof PhpParser\Node\Stmt\Foreach_
|
||||
|| $node instanceof PhpParser\Node\Stmt\While_
|
||||
|| $node instanceof PhpParser\Node\Stmt\Do_
|
||||
) {
|
||||
if ($doc_comment = $node->getDocComment()) {
|
||||
$var_comments = [];
|
||||
|
Loading…
Reference in New Issue
Block a user