From 4ed3bec1152cf07422d03ec41f0860b015126775 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 14 Jan 2025 13:31:29 +0100 Subject: [PATCH] Pipeline corrections --- .../Controller/CalendarController.php | 5 ----- .../ChillCalendarBundle/Form/CancelType.php | 17 +++++++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index 08471cd84..92db8efc6 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -37,7 +37,6 @@ use Psr\Log\LoggerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\Form\Form; -use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\Form\FormInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; @@ -116,12 +115,8 @@ class CalendarController extends AbstractController } #[Route(path: '/{_locale}/calendar/calendar/{id}/cancel', name: 'chill_calendar_calendar_cancel')] - public function cancelAction(Calendar $calendar, Request $request): Response { - // Deal with sms being sent or not - // Communicate cancellation with the remote calendar. - $this->denyAccessUnlessGranted(CalendarVoter::EDIT, $calendar); [$person, $accompanyingPeriod] = [$calendar->getPerson(), $calendar->getAccompanyingPeriod()]; diff --git a/src/Bundle/ChillCalendarBundle/Form/CancelType.php b/src/Bundle/ChillCalendarBundle/Form/CancelType.php index dc7c4d049..ad41a6105 100644 --- a/src/Bundle/ChillCalendarBundle/Form/CancelType.php +++ b/src/Bundle/ChillCalendarBundle/Form/CancelType.php @@ -1,5 +1,14 @@ add('cancelReason', EntityType::class, [ 'class' => CancelReason::class, 'required' => true, - 'choice_label' => function (CancelReason $cancelReason) { - return $this->translatableStringHelper->localize($cancelReason->getName()); - }, + 'choice_label' => fn (CancelReason $cancelReason) => $this->translatableStringHelper->localize($cancelReason->getName()), ]); }