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

[DeadCode] Add ReplaceBlockToItsStmtsRector #6641

Merged
merged 2 commits into from
Jan 1, 2025
Merged

[DeadCode] Add ReplaceBlockToItsStmtsRector #6641

merged 2 commits into from
Jan 1, 2025

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Jan 1, 2025

This PR inspired by @tacman use case at:

that handled at PR:

the block statement should never used imo, as it always executed, direct replace with its stmts instead.

{
    echo "statement 1";
    echo PHP_EOL;
    echo "statement 2";
}

see https://3v4l.org/ZUfEV

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba
Copy link
Member

Looks good 👍

@samsonasik
Copy link
Member Author

Thank you @TomasVotruba for the review, let's merge 👍

@samsonasik samsonasik merged commit 66d9316 into main Jan 1, 2025
41 checks passed
@samsonasik samsonasik deleted the replace-block branch January 1, 2025 16:32
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