Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 13:11:42 +02:00
parent a3f775a69b
commit 0ff4593863
118 changed files with 143 additions and 658 deletions

View File

@@ -62,7 +62,7 @@ final class EventController extends AbstractController
) {}
#[\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
public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|Response
{
$em = $this->managerRegistry->getManager();
$event = $em->getRepository(Event::class)->findOneBy([
@@ -110,7 +110,6 @@ final class EventController extends AbstractController
/**
* Displays a form to edit an existing Event entity.
*
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/edit', name: 'chill_event__event_edit')]
public function editAction($event_id): Response
@@ -134,8 +133,6 @@ final class EventController extends AbstractController
/**
* List events subscriptions for a person.
*
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Doctrine\ORM\NonUniqueResultException
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{person_id}/list', name: 'chill_event__list_by_person', methods: ['GET'])]
@@ -281,10 +278,9 @@ final class EventController extends AbstractController
*
* @ParamConverter("event", options={"id": "event_id"})
*
* @return \Symfony\Component\HttpFoundation\Response
* @return Response
*
* @throws \PhpOffice\PhpSpreadsheet\Exception
*
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/show', name: 'chill_event__event_show')]
public function showAction(Event $event, Request $request)
@@ -318,7 +314,7 @@ 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'])]
public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|Response
{
$em = $this->managerRegistry->getManager();

View File

@@ -289,7 +289,6 @@ final class ParticipationController extends AbstractController
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the participation is not found
* @throws \Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException if the user is not allowed to edit the participation
*
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{participation_id}/edit', name: 'chill_event_participation_edit')]
public function editAction(int $participation_id): Response
@@ -321,7 +320,6 @@ final class ParticipationController extends AbstractController
* show a form to edit multiple participation for the same event.
*
* @param int $event_id
*
*/
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{event_id}/edit_multiple', name: 'chill_event_participation_edit_multiple')]
public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse