apply rector rules: symfony **UP TO** 44

This commit is contained in:
2023-07-28 01:52:53 +02:00
parent b6a094aeee
commit c20f65eebb
88 changed files with 211 additions and 320 deletions

View File

@@ -83,10 +83,7 @@ final class PermissionsGroupController extends AbstractController
$this->translator->trans('The permissions have been added')
);
return $this->redirect($this->generateUrl(
'admin_permissionsgroup_edit',
['id' => $id]
));
return $this->redirectToRoute('admin_permissionsgroup_edit', ['id' => $id]);
}
foreach ($violations as $error) {
@@ -146,10 +143,7 @@ final class PermissionsGroupController extends AbstractController
$this->em->persist($permissionsGroup);
$this->em->flush();
return $this->redirect($this->generateUrl(
'admin_permissionsgroup_edit',
['id' => $permissionsGroup->getId()]
));
return $this->redirectToRoute('admin_permissionsgroup_edit', ['id' => $permissionsGroup->getId()]);
}
return $this->render('@ChillMain/PermissionsGroup/new.html.twig', [
@@ -187,10 +181,7 @@ final class PermissionsGroupController extends AbstractController
])
);
return $this->redirect($this->generateUrl(
'admin_permissionsgroup_edit',
['id' => $pgid]
));
return $this->redirectToRoute('admin_permissionsgroup_edit', ['id' => $pgid]);
}
$this->em->flush();
@@ -214,10 +205,7 @@ final class PermissionsGroupController extends AbstractController
);
}
return $this->redirect($this->generateUrl(
'admin_permissionsgroup_edit',
['id' => $pgid]
));
return $this->redirectToRoute('admin_permissionsgroup_edit', ['id' => $pgid]);
}
/**
@@ -362,7 +350,7 @@ final class PermissionsGroupController extends AbstractController
if ($editForm->isValid()) {
$this->em->flush();
return $this->redirect($this->generateUrl('admin_permissionsgroup_edit', ['id' => $id]));
return $this->redirectToRoute('admin_permissionsgroup_edit', ['id' => $id]);
}
$deleteRoleScopesForm = [];