1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Make sure we only checking namespaces with names

This commit is contained in:
Matthew Brown 2016-11-20 17:26:30 -05:00
parent 4a66dad2ac
commit 64029b2c74

View File

@ -212,7 +212,8 @@ class FileChecker implements StatementsSource
if ($stmt instanceof PhpParser\Node\Stmt\Class_
|| $stmt instanceof PhpParser\Node\Stmt\Interface_
|| $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_
) {
if ($leftover_stmts) {