Skip to content

[CodeQuality] Add SwitchTrueToIfRector#3535

Merged
TomasVotruba merged 3 commits intomainfrom
tv-switch-true-to-if
Mar 29, 2023
Merged

[CodeQuality] Add SwitchTrueToIfRector#3535
TomasVotruba merged 3 commits intomainfrom
tv-switch-true-to-if

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

No description provided.

@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
Copy Markdown
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
Copy Markdown
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.

3 participants