Skip to content

[DeadCode] Add empty() + count($values) > 0 checks to RemoveUnusedNonEmptyArrayBeforeForeachRector#3070

Merged
TomasVotruba merged 3 commits intomasterfrom
fix-foreach
Mar 26, 2020
Merged

[DeadCode] Add empty() + count($values) > 0 checks to RemoveUnusedNonEmptyArrayBeforeForeachRector#3070
TomasVotruba merged 3 commits intomasterfrom
fix-foreach

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

Follow up to #3066

image

@TomasVotruba TomasVotruba changed the title Add empty() check to RemoveUnusedNonEmptyArrayBeforeForeachRector [DeadCode] Add empty() + count($values) > 0 checks to RemoveUnusedNonEmptyArrayBeforeForeachRector Mar 26, 2020
@TomasVotruba
Copy link
Copy Markdown
Member Author

TomasVotruba commented Mar 26, 2020

@afilina Any more samples from your favorite legacy projects that we should check here?
My brain is too modern to think of anything nasty, but I bet there is more cases Rector should handle.

@TomasVotruba TomasVotruba merged commit 32ce46e into master Mar 26, 2020
@TomasVotruba TomasVotruba deleted the fix-foreach branch March 26, 2020 21:25
@afilina
Copy link
Copy Markdown
Contributor

afilina commented Mar 30, 2020

@TomasVotruba I'll append examples should I stumble upon something new.

TomasVotruba added a commit that referenced this pull request Nov 16, 2022
rectorphp/rector-src@8ac960d fix(UpdateFileNameByClassNameFileSystemRector): compare shortClass Wi… (#3070)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants