mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +01:00
Look at interface namespaces as well
This commit is contained in:
parent
083840359a
commit
b862073514
@ -72,6 +72,15 @@ class FileChecker
|
|||||||
$this->_checkClass($stmt, $this->_namespace, $this->_aliased_classes);
|
$this->_checkClass($stmt, $this->_namespace, $this->_aliased_classes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($stmt instanceof PhpParser\Node\Stmt\Interface_) {
|
||||||
|
if ($namespace->name === null) {
|
||||||
|
throw new CodeException('Empty namespace', $this->_file_name, $stmt->getLine());
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_namespace = implode('\\', $namespace->name->parts);
|
||||||
|
|
||||||
|
// @todo check interface
|
||||||
|
}
|
||||||
else if ($stmt instanceof PhpParser\Node\Stmt\Use_) {
|
else if ($stmt instanceof PhpParser\Node\Stmt\Use_) {
|
||||||
foreach ($stmt->uses as $use) {
|
foreach ($stmt->uses as $use) {
|
||||||
$this->_aliased_classes[$use->alias] = implode('\\', $use->name->parts);
|
$this->_aliased_classes[$use->alias] = implode('\\', $use->name->parts);
|
||||||
|
Loading…
Reference in New Issue
Block a user