Skip to content

Commit 3ce9bbb

Browse files
authored
[NodeManipulator] Use ClassReflection parent isFinalByKeyword()->yes() on ClassDependencyManipulator (#8002)
1 parent 8a22661 commit 3ce9bbb

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/NodeManipulator/ClassDependencyManipulator.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,7 @@ public function hasFinalParentConstructor(Class_ $class): bool
210210
continue;
211211
}
212212

213-
$parentClass = $this->astResolver->resolveClassFromClassReflection($ancestor);
214-
if (! $parentClass instanceof ClassLike) {
215-
continue;
216-
}
217-
218-
$parentConstructorMethod = $parentClass->getMethod(MethodName::CONSTRUCT);
219-
if (! $parentConstructorMethod instanceof ClassMethod) {
220-
continue;
221-
}
222-
223-
return $parentConstructorMethod->isFinal();
213+
return $ancestor->getNativeMethod(MethodName::CONSTRUCT)->isFinalByKeyword()->yes();
224214
}
225215

226216
return false;

0 commit comments

Comments
 (0)