Skip to content

Commit 3f2e4cf

Browse files
committed
php-parser 5.0 renamed Node\Stmt\UseUse to Node\UseItem so let's use that
1 parent ac1cf3e commit 3f2e4cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Usages/NamespaceUsages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use PhpParser\Node\NullableType;
1414
use PhpParser\Node\Stmt\Class_;
1515
use PhpParser\Node\Stmt\TraitUse;
16-
use PhpParser\Node\Stmt\UseUse;
1716
use PhpParser\Node\UnionType;
17+
use PhpParser\Node\UseItem;
1818
use PHPStan\Analyser\Scope;
1919
use PHPStan\Rules\Rule;
2020
use PHPStan\Rules\RuleError;
@@ -85,7 +85,7 @@ public function processNode(Node $node, Scope $scope): array
8585
$namespaces[] = $this->namespaceUsageFactory->create($type->toString());
8686
}
8787
}
88-
} elseif ($node instanceof UseUse) {
88+
} elseif ($node instanceof UseItem) {
8989
$namespaces = [$this->namespaceUsageFactory->create($node->name->toString(), true)];
9090
} elseif ($node instanceof StaticCall && $node->class instanceof Name) {
9191
$namespaces = [$this->namespaceUsageFactory->create($node->class->toString())];

0 commit comments

Comments
 (0)