Skip to content

dev-main cause [ERROR] Could not process some files  #7949

@samsonasik

Description

@samsonasik

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions