Find the best Rector rule to solve your problem


RedirectToRouteRector

Turns redirect to route to short helper method in Controller in Symfony

-$this->redirect($this->generateUrl("homepage"));
+$this->redirectToRoute("homepage");