Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CodeQuality] Add SwitchTrueToIfRector #3535

Merged
merged 3 commits into from
Mar 29, 2023
Merged

Conversation

TomasVotruba
Copy link
Member

No description provided.

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@TomasVotruba TomasVotruba force-pushed the tv-switch-true-to-if branch 2 times, most recently from 85fcce6 to 379523c Compare March 29, 2023 07:24
@TomasVotruba TomasVotruba force-pushed the tv-switch-true-to-if branch from 379523c to c06b24f Compare March 29, 2023 07:24
@TomasVotruba TomasVotruba enabled auto-merge (squash) March 29, 2023 07:25
@TomasVotruba TomasVotruba merged commit 26e570f into main Mar 29, 2023
@TomasVotruba TomasVotruba deleted the tv-switch-true-to-if branch March 29, 2023 07:30
return array_merge($newStmts, $defaultCase->stmts);
}

return $newStmts;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when $newStmts is empty array, it should be skipped, as it valid code, ref https://3v4l.org/qGdQ0 and it will got error as return empty array of node.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

None yet

3 participants