Question
Like mentioned in #2215 the TemplateAnnotationRector removes the Template annotation when the the controller uses as private method in its return statement, but the private method still returns an array at the end:
/**
* @Route("/create", name="survey_create")
* @Template("PAPPSurveyBundle:Survey:create.html.twig")
*
* @return array
*/
public function createAction(Request $request, Party $currentParty)
{
$survey = $this->surveyHelper->createSurvey($currentParty);
return $this->processForm($request, $currentParty, $survey, $this->generateUrl('survey_save'));
}
private function processForm(Request $request, Party $party, Survey $survey, $url)
{
...
return [
'form' => $form->createView(),
];
}
When I would fix this manually I would put the render Method into the private method. Is this something rector can handle or should this be fixed manually?
Question
Like mentioned in #2215 the TemplateAnnotationRector removes the Template annotation when the the controller uses as private method in its return statement, but the private method still returns an array at the end:
When I would fix this manually I would put the render Method into the private method. Is this something rector can handle or should this be fixed manually?