mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-21 01:41:00 +01:00
use findChildrenOfClass() instead of interface + filter
This commit is contained in:
parent
ebbd854a2d
commit
34f8319292
@ -154,14 +154,10 @@ CODE_SAMPLE
|
||||
throw new ShouldNotHappenException(__METHOD__ . '() on line ' . __LINE__);
|
||||
}
|
||||
|
||||
$childrenClassLikes = $this->parsedNodesByType->findClassesAndInterfacesByType($className);
|
||||
$childrenClassLikes = $this->parsedNodesByType->findChildrenOfClass($className);
|
||||
|
||||
// update their methods as well
|
||||
foreach ($childrenClassLikes as $childClassLike) {
|
||||
if (! $childClassLike instanceof Class_) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$usedTraits = $this->parsedNodesByType->findUsedTraitsInClass($childClassLike);
|
||||
foreach ($usedTraits as $trait) {
|
||||
$this->addReturnTypeToMethod($trait, $node, $returnTypeInfo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user