From 86e659edd44b735cf090df7e01919c08b04ef1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 13 Nov 2023 15:28:29 +0100 Subject: [PATCH] DX: replace some string by constants --- .../ChillMainBundle/Controller/ExportController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index 190d5f1bf..d318fcc58 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -304,7 +304,7 @@ class ExportController extends AbstractController FormType::class, $defaultFormData, [ - 'method' => $isGenerate ? 'GET' : 'POST', + 'method' => $isGenerate ? Request::METHOD_GET : Request::METHOD_POST, 'csrf_protection' => !$isGenerate, ] ); @@ -352,7 +352,7 @@ class ExportController extends AbstractController $form = $this->createCreateFormExport($alias, 'export', $data, $savedExport); - if ('POST' === $request->getMethod()) { + if (Request::METHOD_POST === $request->getMethod()) { $form->handleRequest($request); if ($form->isValid()) { @@ -406,7 +406,7 @@ class ExportController extends AbstractController $form = $this->createCreateFormExport($alias, 'formatter', $data, $savedExport); - if ('POST' === $request->getMethod()) { + if (Request::METHOD_POST === $request->getMethod()) { $form->handleRequest($request); if ($form->isValid()) { @@ -536,7 +536,7 @@ class ExportController extends AbstractController $form = $this->createCreateFormExport($alias, 'centers', [], $savedExport); - if ('POST' === $request->getMethod()) { + if (Request::METHOD_POST === $request->getMethod()) { $form->handleRequest($request); if ($form->isValid()) {