Skip to content

[CodeQuality] Avoid too early findInstanceOf() usage on RepeatedOrEqualToInArrayRector#7401

Merged
samsonasik merged 1 commit intomainfrom
avoid-too-early-find
Oct 2, 2025
Merged

[CodeQuality] Avoid too early findInstanceOf() usage on RepeatedOrEqualToInArrayRector#7401
samsonasik merged 1 commit intomainfrom
avoid-too-early-find

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Oct 2, 2025

move to before its usage.

@samsonasik samsonasik enabled auto-merge (squash) October 2, 2025 23:17
@samsonasik samsonasik merged commit 73031f7 into main Oct 2, 2025
50 checks passed
@samsonasik samsonasik deleted the avoid-too-early-find branch October 2, 2025 23:18
@TomasVotruba
Copy link
Member

Thanks. Could we have this one as Rector rule? I saw this pattern so many times

@samsonasik
Copy link
Member Author

@TomasVotruba we had MoveVariableDeclarationNearReferenceRector in the past, and you removed it at PR:

@TomasVotruba
Copy link
Member

I see :) the nested reference is a problem indeed. Thanks, let's skip this one then

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants