mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
apply rector rules: symfony **UP TO** 44
This commit is contained in:
@@ -31,12 +31,12 @@ class ScopeController extends AbstractController
|
||||
$form = $this->createCreateForm($scope);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($scope);
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('admin_scope'));
|
||||
return $this->redirectToRoute('admin_scope');
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Scope/new.html.twig', [
|
||||
@@ -128,10 +128,10 @@ class ScopeController extends AbstractController
|
||||
$editForm = $this->createEditForm($scope);
|
||||
$editForm->handleRequest($request);
|
||||
|
||||
if ($editForm->isValid()) {
|
||||
if ($editForm->isSubmitted() && $editForm->isValid()) {
|
||||
$em->flush();
|
||||
|
||||
return $this->redirect($this->generateUrl('admin_scope_edit', ['id' => $id]));
|
||||
return $this->redirectToRoute('admin_scope_edit', ['id' => $id]);
|
||||
}
|
||||
|
||||
return $this->render('@ChillMain/Scope/edit.html.twig', [
|
||||
|
Reference in New Issue
Block a user