mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -37,6 +37,7 @@ use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
@@ -110,13 +111,9 @@ 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)
|
||||
public function editAction($event_id): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
@@ -140,12 +137,9 @@ 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)
|
||||
public function listByPersonAction($person_id): Response
|
||||
{
|
||||
$em = $this->managerRegistry->getManager();
|
||||
|
||||
@@ -200,14 +194,9 @@ 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)
|
||||
public function newAction(?Center $center, Request $request): Response
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
|
||||
@@ -248,7 +237,7 @@ 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])]
|
||||
public function newPickCenterAction()
|
||||
public function newPickCenterAction(): Response
|
||||
{
|
||||
$role = 'CHILL_EVENT_CREATE';
|
||||
|
||||
@@ -295,9 +284,7 @@ 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)
|
||||
@@ -370,7 +357,7 @@ final class EventController extends AbstractController
|
||||
$builder = $this
|
||||
->formFactoryInterface
|
||||
->createNamedBuilder(
|
||||
null,
|
||||
'',
|
||||
FormType::class,
|
||||
null,
|
||||
[
|
||||
|
Reference in New Issue
Block a user