Skip to content

[DeadCode] Retarget RemoveParentDelegatingClassMethodRector to Class_ node - #8824

Merged
TomasVotruba merged 1 commit into
mainfrom
retarget-remove-parent-delegating-to-class
Oct 25, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
retarget-remove-parent-delegating-to-class

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Retargets RemoveParentDelegatingClassMethodRector from the ClassMethod node to the Class_ node.

The rule now resolves the class reflection straight from the class name via ReflectionProvider, rather than fetching the scope on every visited ClassMethod. The parent class reflection is resolved once per class, then the class methods are iterated and the delegating ones dropped in a single pass.

Rule and tests moved to the Class_ directory to match the subscribed node type.

… node

Subscribe to Class_ and resolve the class reflection from the node name via ReflectionProvider, instead of fetching scope per ClassMethod. Iterate the class methods once and drop the delegating ones.
@TomasVotruba
TomasVotruba force-pushed the retarget-remove-parent-delegating-to-class branch from 2d809af to 2ddbeca Compare October 25, 2026 18:19
@TomasVotruba
TomasVotruba merged commit 87cb92a into main Oct 25, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the retarget-remove-parent-delegating-to-class branch October 25, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant