mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Make sure we only checking namespaces with names
This commit is contained in:
parent
4a66dad2ac
commit
64029b2c74
@ -212,7 +212,8 @@ class FileChecker implements StatementsSource
|
|||||||
if ($stmt instanceof PhpParser\Node\Stmt\Class_
|
if ($stmt instanceof PhpParser\Node\Stmt\Class_
|
||||||
|| $stmt instanceof PhpParser\Node\Stmt\Interface_
|
|| $stmt instanceof PhpParser\Node\Stmt\Interface_
|
||||||
|| $stmt instanceof PhpParser\Node\Stmt\Trait_
|
|| $stmt instanceof PhpParser\Node\Stmt\Trait_
|
||||||
|| $stmt instanceof PhpParser\Node\Stmt\Namespace_
|
|| ($stmt instanceof PhpParser\Node\Stmt\Namespace_ &&
|
||||||
|
$stmt->name instanceof PhpParser\Node\Name)
|
||||||
|| $stmt instanceof PhpParser\Node\Stmt\Function_
|
|| $stmt instanceof PhpParser\Node\Stmt\Function_
|
||||||
) {
|
) {
|
||||||
if ($leftover_stmts) {
|
if ($leftover_stmts) {
|
||||||
|
Loading…
Reference in New Issue
Block a user