From 649e9da58ab574d528ad1b6fe874df5b331a6457 Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Fri, 19 Jun 2020 22:46:32 +0200 Subject: [PATCH] Use constant instead of magic number for response status code (#16) --- EventListener/RequestTransformerListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EventListener/RequestTransformerListener.php b/EventListener/RequestTransformerListener.php index af4cedc..ae297a2 100644 --- a/EventListener/RequestTransformerListener.php +++ b/EventListener/RequestTransformerListener.php @@ -20,7 +20,7 @@ public function onKernelRequest(RequestEvent $event): void } if (false === $this->transform($request)) { - $response = new Response('Unable to parse request.', 400); + $response = new Response('Unable to parse request.', Response::HTTP_BAD_REQUEST); $event->setResponse($response); }