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

@@ -35,16 +35,12 @@ use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;
use function in_array;
/**
* @Route("/{_locale}/notification")
*/
#[Route(path: '/{_locale}/notification')]
class NotificationController extends AbstractController
{
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly ChillSecurity $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository, private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry) {}
/**
* @Route("/create", name="chill_main_notification_create")
*/
#[Route(path: '/create', name: 'chill_main_notification_create')]
public function createAction(Request $request): Response
{
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
@@ -102,9 +98,7 @@ class NotificationController extends AbstractController
]);
}
/**
* @Route("/{id}/edit", name="chill_main_notification_edit")
*/
#[Route(path: '/{id}/edit', name: 'chill_main_notification_edit')]
public function editAction(Notification $notification, Request $request): Response
{
$this->denyAccessUnlessGranted(NotificationVoter::NOTIFICATION_UPDATE, $notification);
@@ -132,9 +126,7 @@ class NotificationController extends AbstractController
]);
}
/**
* @Route("/{id}/access_key", name="chill_main_notification_grant_access_by_access_key")
*/
#[Route(path: '/{id}/access_key', name: 'chill_main_notification_grant_access_by_access_key')]
public function getAccessByAccessKey(Notification $notification, Request $request): Response
{
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
@@ -174,9 +166,7 @@ class NotificationController extends AbstractController
return $this->redirectToRoute('chill_main_notification_show', ['id' => $notification->getId()]);
}
/**
* @Route("/inbox", name="chill_main_notification_my")
*/
#[Route(path: '/inbox', name: 'chill_main_notification_my')]
public function inboxAction(): Response
{
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
@@ -200,9 +190,7 @@ class NotificationController extends AbstractController
]);
}
/**
* @Route("/sent", name="chill_main_notification_sent")
*/
#[Route(path: '/sent', name: 'chill_main_notification_sent')]
public function sentAction(): Response
{
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');
@@ -226,9 +214,7 @@ class NotificationController extends AbstractController
]);
}
/**
* @Route("/{id}/show", name="chill_main_notification_show")
*/
#[Route(path: '/{id}/show', name: 'chill_main_notification_show')]
public function showAction(Notification $notification, Request $request): Response
{
$this->denyAccessUnlessGranted(NotificationVoter::NOTIFICATION_SEE, $notification);