mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Check all class statements
This commit is contained in:
parent
b3c3a1fabf
commit
225e1dbff6
@ -33,12 +33,24 @@ class ClassChecker implements StatementsSource
|
||||
self::checkClassName($this->_class->extends, $this->_namespace, $this->_aliased_classes, $this->_file_name);
|
||||
}
|
||||
|
||||
$leftover_stmts = [];
|
||||
|
||||
foreach ($this->_class->stmts as $stmt) {
|
||||
if ($stmt instanceof PhpParser\Node\Stmt\ClassMethod) {
|
||||
$method_checker = new ClassMethodChecker($stmt, $this);
|
||||
$method_checker->check();
|
||||
|
||||
} else {
|
||||
$leftover_stmts[] = $stmt;
|
||||
}
|
||||
}
|
||||
|
||||
if ($leftover_stmts) {
|
||||
$scope_vars = [];
|
||||
$possibly_in_scope_vars = [];
|
||||
|
||||
(new StatementsChecker($this))->check($leftover_stmts, $scope_vars, $possibly_in_scope_vars);
|
||||
}
|
||||
}
|
||||
|
||||
public static function checkClassName(PhpParser\Node\Name $class_name, $namespace, array $aliased_classes, $file_name)
|
||||
|
Loading…
Reference in New Issue
Block a user