mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -62,12 +62,7 @@ final class SingleTaskController extends AbstractController
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/{id}/delete",
|
||||
* name="chill_task_single_task_delete"
|
||||
* )
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/{id}/delete', name: 'chill_task_single_task_delete')]
|
||||
public function deleteAction(Request $request, mixed $id)
|
||||
{
|
||||
$course = null;
|
||||
@@ -163,12 +158,7 @@ final class SingleTaskController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/{id}/edit",
|
||||
* name="chill_task_single_task_edit"
|
||||
* )
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/{id}/edit', name: 'chill_task_single_task_edit')]
|
||||
public function editAction(
|
||||
SingleTask $task,
|
||||
Request $request
|
||||
@@ -258,12 +248,8 @@ final class SingleTaskController extends AbstractController
|
||||
* - person_id
|
||||
* - hide_form (hide the form to filter the tasks)
|
||||
* - status: date state, amongst SingleTaskRepository::DATE_STATUSES, or 'closed'.
|
||||
*
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/list",
|
||||
* name="chill_task_singletask_list"
|
||||
* )
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/list', name: 'chill_task_singletask_list')]
|
||||
public function listAction(
|
||||
Request $request
|
||||
) {
|
||||
@@ -316,11 +302,7 @@ final class SingleTaskController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/by-course/{id}",
|
||||
* name="chill_task_singletask_by-course_list")
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/by-course/{id}', name: 'chill_task_singletask_by-course_list')]
|
||||
public function listCourseTasks(
|
||||
AccompanyingPeriod $course,
|
||||
FormFactoryInterface $formFactory,
|
||||
@@ -367,11 +349,7 @@ final class SingleTaskController extends AbstractController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/by-person/{id}",
|
||||
* name="chill_task_singletask_by-person_list")
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/by-person/{id}', name: 'chill_task_singletask_by-person_list')]
|
||||
public function listPersonTasks(
|
||||
Person $person
|
||||
): Response {
|
||||
@@ -418,17 +396,9 @@ final class SingleTaskController extends AbstractController
|
||||
|
||||
/**
|
||||
* @return Response
|
||||
*
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/list/my",
|
||||
* name="chill_task_singletask_my_tasks",
|
||||
* defaults={"_format": "html"}
|
||||
* )
|
||||
* @Route(
|
||||
* "/api/1.0/task/single-task/list/my",
|
||||
* defaults={"_format": "json"}
|
||||
* )
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/list/my', name: 'chill_task_singletask_my_tasks', defaults: ['_format' => 'html'])]
|
||||
#[Route(path: '/api/1.0/task/single-task/list/my', defaults: ['_format' => 'json'])]
|
||||
public function myTasksAction(string $_format, Request $request)
|
||||
{
|
||||
$this->denyAccessUnlessGranted('ROLE_USER');
|
||||
@@ -484,12 +454,7 @@ final class SingleTaskController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/new",
|
||||
* name="chill_task_single_task_new"
|
||||
* )
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/new', name: 'chill_task_single_task_new')]
|
||||
public function newAction(Request $request)
|
||||
{
|
||||
$user = $this->security->getUser();
|
||||
@@ -600,12 +565,7 @@ final class SingleTaskController extends AbstractController
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/task/single-task/{id}/show",
|
||||
* name="chill_task_single_task_show"
|
||||
* )
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/single-task/{id}/show', name: 'chill_task_single_task_show')]
|
||||
public function showAction(SingleTask $task, Request $request)
|
||||
{
|
||||
$this->denyAccessUnlessGranted(TaskVoter::SHOW, $task);
|
||||
|
@@ -36,17 +36,13 @@ class TaskController extends AbstractController
|
||||
/**
|
||||
* Apply a transition to a task.
|
||||
*
|
||||
* @Route(
|
||||
* "/{_locale}/task/transition/{kind}/{taskId}/{transition}",
|
||||
* name="chill_task_task_transition"
|
||||
* )
|
||||
*
|
||||
* @param string $kind
|
||||
* @param int $taskId
|
||||
* @param string $transition
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/{_locale}/task/transition/{kind}/{taskId}/{transition}', name: 'chill_task_task_transition')]
|
||||
public function applyTransitionAction(
|
||||
$kind,
|
||||
$taskId,
|
||||
|
Reference in New Issue
Block a user