From 336b79f91816c8a9fdc6006464f6332e372b11f2 Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Sat, 6 Jun 2020 14:31:58 +0200 Subject: [PATCH] Use constant instead of magic number for response status code --- src/JsonRequestTransformerListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonRequestTransformerListener.php b/src/JsonRequestTransformerListener.php index 489d37d..ee2b83e 100755 --- a/src/JsonRequestTransformerListener.php +++ b/src/JsonRequestTransformerListener.php @@ -37,7 +37,7 @@ public function onKernelRequest(RequestEvent $event): void } if (!$this->transformJsonBody($request)) { - $response = Response::create('Unable to parse request.', 400); + $response = Response::create('Unable to parse request.', Response::HTTP_BAD_REQUEST); $event->setResponse($response); } }