Apply rector rules: symfony up to 54

This commit is contained in:
2024-04-04 23:30:25 +02:00
parent 1ee3b9e2f0
commit 579bd829f8
204 changed files with 974 additions and 2346 deletions

View File

@@ -60,9 +60,7 @@ final class EventController extends AbstractController
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
) {}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/delete", name="chill_event__event_delete", requirements={"event_id"="\d+"}, methods={"GET", "DELETE"})
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'DELETE'])]
public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();
@@ -113,9 +111,11 @@ final class EventController extends AbstractController
* Displays a form to edit an existing Event entity.
*
* @return \Symfony\Component\HttpFoundation\Response
* @return \Symfony\Component\HttpFoundation\Response
*
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/edit", name="chill_event__event_edit")
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/edit', name: 'chill_event__event_edit')]
public function editAction($event_id)
{
$em = $this->managerRegistry->getManager();
@@ -140,9 +140,11 @@ final class EventController extends AbstractController
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Doctrine\ORM\NonUniqueResultException
* @throws \Doctrine\ORM\NonUniqueResultException
*
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{person_id}/list", name="chill_event__list_by_person", methods={"GET"})
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{person_id}/list', name: 'chill_event__list_by_person', methods: ['GET'])]
public function listByPersonAction($person_id)
{
$em = $this->managerRegistry->getManager();
@@ -188,9 +190,7 @@ final class EventController extends AbstractController
]);
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/most_recent", name="chill_event_list_most_recent", options={null})
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/most_recent', name: 'chill_event_list_most_recent', options: [null])]
public function mostRecentIndexAction()
{
return $this->redirectToRoute('chill_main_search', [
@@ -202,9 +202,11 @@ final class EventController extends AbstractController
* Displays a form to create a new Event entity.
*
* @return \Symfony\Component\HttpFoundation\Response
* @return \Symfony\Component\HttpFoundation\Response
*
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/new", name="chill_event__event_new", methods={"GET", "POST"})
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/new', name: 'chill_event__event_new', methods: ['GET', 'POST'])]
public function newAction(?Center $center, Request $request)
{
$user = $this->security->getUser();
@@ -244,9 +246,8 @@ final class EventController extends AbstractController
/**
* First step of new Event form.
*
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/new/pick-center", name="chill_event__event_new_pickcenter", options={null})
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/new/pick-center', name: 'chill_event__event_new_pickcenter', options: [null])]
public function newPickCenterAction()
{
$role = 'CHILL_EVENT_CREATE';
@@ -294,9 +295,11 @@ final class EventController extends AbstractController
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
* @throws \PhpOffice\PhpSpreadsheet\Exception
*
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/show", name="chill_event__event_show")
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/show', name: 'chill_event__event_show')]
public function showAction(Event $event, Request $request)
{
if (!$event) {
@@ -326,9 +329,8 @@ final class EventController extends AbstractController
/**
* Edits an existing Event entity.
*
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/event/{event_id}/update", name="chill_event__event_update", methods={"POST", "PUT"})
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/update', name: 'chill_event__event_update', methods: ['POST', 'PUT'])]
public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
{
$em = $this->managerRegistry->getManager();