Skip to content

Commit fb71542

Browse files
authored
Fix infinite loop check intsanceof name check to use Name class (#481)
1 parent 7da017c commit fb71542

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/NodeAnalyzer/AttributeFinder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use PhpParser\Node\AttributeGroup;
99
use PhpParser\Node\Expr;
1010
use PhpParser\Node\Identifier;
11-
use PhpParser\Node\Name\FullyQualified;
11+
use PhpParser\Node\Name;
1212
use PhpParser\Node\Param;
1313
use PhpParser\Node\Stmt\Class_;
1414
use PhpParser\Node\Stmt\ClassLike;
@@ -85,7 +85,7 @@ public function findAttributeByClass(
8585
/** @var AttributeGroup $attrGroup */
8686
foreach ($node->attrGroups as $attrGroup) {
8787
foreach ($attrGroup->attrs as $attribute) {
88-
if (! $attribute->name instanceof FullyQualified) {
88+
if (! $attribute->name instanceof Name) {
8989
continue;
9090
}
9191

@@ -110,7 +110,7 @@ public function findManyByClass(
110110
/** @var AttributeGroup $attrGroup */
111111
foreach ($node->attrGroups as $attrGroup) {
112112
foreach ($attrGroup->attrs as $attribute) {
113-
if (! $attribute->name instanceof FullyQualified) {
113+
if (! $attribute->name instanceof Name) {
114114
continue;
115115
}
116116

0 commit comments

Comments
 (0)