Skip to content

Commit

Permalink
Defer type-resolving in RemoveJustPropertyFetchRector (#3761)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed May 8, 2023
1 parent 01c1377 commit b116bc0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,6 @@ private function matchVariableToPropertyAssign(Stmt $stmt): ?PropertyFetchToVari
return null;
}

if ($this->isPropertyFetchCallerNode($assign->expr)) {
return null;
}

// keep property fetch nesting
if ($assign->expr->var instanceof PropertyFetch) {
return null;
Expand All @@ -259,6 +255,10 @@ private function matchVariableToPropertyAssign(Stmt $stmt): ?PropertyFetchToVari
return null;
}

if ($this->isPropertyFetchCallerNode($assign->expr)) {
return null;
}

return new PropertyFetchToVariableAssign($assign->var, $assign->expr);
}

Expand Down

0 comments on commit b116bc0

Please sign in to comment.