Skip to content

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

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

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

Conversation

@samsonasik

@samsonasik samsonasik commented Oct 2, 2025

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@samsonasik

Copy link
Copy Markdown
Member Author

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

@TomasVotruba

Copy link
Copy Markdown
Member

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

@github-actions

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

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

Development

Successfully merging this pull request may close these issues.

2 participants