Bug Report
| Subject |
Details |
| Rector version |
dev-main |
Minimal PHP Code Causing Issue
Got error like this on run on CodeIgniter 4 system directory:
3) system/Model.php:799
---------- begin diff ----------
@@ @@
return parent::__get($name);
}
- if (isset($this->builder()->{$name})) {
- return $this->builder()->{$name};
- }
-
- return null;
+ return $this->builder()->{$name} ?? null;
}
/**
----------- end diff -----------
Applied rules:
* IfIssetToCoalescingRector
[ERROR] Could not process some files, due to:
"Child process error: ".
Expected Behaviour
Should not erorr. the error is only show once tho, run once more with fix already cover it. As I see, RemoveUnusedVariableAssignRector may need refactor, so even this patch should not needed.
Bug Report
Minimal PHP Code Causing Issue
Got error like this on run on CodeIgniter 4 system directory:
3) system/Model.php:799 ---------- begin diff ---------- @@ @@ return parent::__get($name); } - if (isset($this->builder()->{$name})) { - return $this->builder()->{$name}; - } - - return null; + return $this->builder()->{$name} ?? null; } /** ----------- end diff ----------- Applied rules: * IfIssetToCoalescingRector [ERROR] Could not process some files, due to: "Child process error: ".Expected Behaviour
Should not erorr. the error is only show once tho, run once more with fix already cover it. As I see,
RemoveUnusedVariableAssignRectormay need refactor, so even this patch should not needed.