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

@@ -41,10 +41,9 @@ class AccompanyingCourseCommentController extends AbstractController
/**
* Page of comments in Accompanying Course section.
*
* @Route("/{_locale}/parcours/{accompanying_period_id}/comments", name="chill_person_accompanying_period_comment_list")
*
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
#[Route(path: '/{_locale}/parcours/{accompanying_period_id}/comments', name: 'chill_person_accompanying_period_comment_list')]
public function commentAction(AccompanyingPeriod $accompanyingCourse, Request $request): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::SEE_DETAILS, $accompanyingCourse);
@@ -118,12 +117,8 @@ class AccompanyingCourseCommentController extends AbstractController
/**
* Delete an existing comment.
*
* @Route(
* "/{_locale}/parcours/comment/{id}/delete",
* name="chill_person_accompanying_period_comment_delete"
* )
*/
#[Route(path: '/{_locale}/parcours/comment/{id}/delete', name: 'chill_person_accompanying_period_comment_delete')]
public function deleteAction(AccompanyingPeriod\Comment $comment, Request $request): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodCommentVoter::DELETE, $comment);
@@ -159,9 +154,7 @@ class AccompanyingCourseCommentController extends AbstractController
]);
}
/**
* @Route("/{_locale}/parcours/comment/{id}/pin", name="chill_person_accompanying_period_comment_pin")
*/
#[Route(path: '/{_locale}/parcours/comment/{id}/pin', name: 'chill_person_accompanying_period_comment_pin')]
public function pinComment(AccompanyingPeriod\Comment $comment): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $comment->getAccompanyingPeriod());
@@ -177,9 +170,7 @@ class AccompanyingCourseCommentController extends AbstractController
]);
}
/**
* @Route("/{_locale}/parcours/comment/{id}/unpin", name="chill_person_accompanying_period_comment_unpin")
*/
#[Route(path: '/{_locale}/parcours/comment/{id}/unpin', name: 'chill_person_accompanying_period_comment_unpin')]
public function unpinComment(AccompanyingPeriod\Comment $comment): Response
{
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::EDIT, $comment->getAccompanyingPeriod());