mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -33,9 +33,8 @@ class WorkflowApiController
|
||||
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
*
|
||||
* @Route("/api/1.0/main/workflow/my", methods={"GET"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/workflow/my', methods: ['GET'])]
|
||||
public function myWorkflow(Request $request): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {
|
||||
@@ -72,9 +71,8 @@ class WorkflowApiController
|
||||
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
*
|
||||
* @Route("/api/1.0/main/workflow/my-cc", methods={"GET"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/workflow/my-cc', methods: ['GET'])]
|
||||
public function myWorkflowCc(Request $request): JsonResponse
|
||||
{
|
||||
if (!$this->security->isGranted('ROLE_USER') || !$this->security->getUser() instanceof User) {
|
||||
@@ -109,17 +107,13 @@ class WorkflowApiController
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/workflow/{id}/subscribe", methods={"POST"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/workflow/{id}/subscribe', methods: ['POST'])]
|
||||
public function subscribe(EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
return $this->handleSubscription($entityWorkflow, $request, 'subscribe');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/workflow/{id}/unsubscribe", methods={"POST"})
|
||||
*/
|
||||
#[Route(path: '/api/1.0/main/workflow/{id}/unsubscribe', methods: ['POST'])]
|
||||
public function unsubscribe(EntityWorkflow $entityWorkflow, Request $request): Response
|
||||
{
|
||||
return $this->handleSubscription($entityWorkflow, $request, 'unsubscribe');
|
||||
|
Reference in New Issue
Block a user