-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#3447Closed
Copy link
Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/e8d55b28-49e1-46ff-81df-2866f17b85f3
<?php
final class DemoFile
{
public function run()
{
if (($value = "foo") !== null) {
echo $value;
}
}
}Responsible rules
RemoveAlwaysTrueIfConditionRector
Expected Behavior
The Rector should either not touch the code or extract the assignment before removing the if-statement.
Reactions are currently unavailable