From 4efe56f0f13e2712ddc5a13527e296990132cc55 Mon Sep 17 00:00:00 2001 From: mandan2 Date: Wed, 8 Nov 2023 17:15:31 +0200 Subject: [PATCH] phpstan --- controllers/front/webhook.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/controllers/front/webhook.php b/controllers/front/webhook.php index f6a032926..c74166277 100644 --- a/controllers/front/webhook.php +++ b/controllers/front/webhook.php @@ -59,10 +59,14 @@ public function initContent(): void if (!$transactionId) { $this->respond('failed', HttpStatusCode::HTTP_UNPROCESSABLE_ENTITY, 'Missing transaction id'); + + exit; } if (!$this->module->getApiClient()) { $this->respond('failed', HttpStatusCode::HTTP_UNAUTHORIZED, 'API key is missing or incorrect'); + + exit; } /** @var Lock $lock */ @@ -85,10 +89,14 @@ public function initContent(): void $errorHandler->handle($exception, $exception->getCode(), false); $this->respond('failed', HttpStatusCode::HTTP_BAD_REQUEST, 'Failed to lock process'); + + exit; } if (!$acquired) { $this->respond('failed', HttpStatusCode::HTTP_BAD_REQUEST, 'Another process is locked'); + + exit; } try { @@ -106,6 +114,8 @@ public function initContent(): void $errorHandler->handle($exception, $exception->getCode(), false); $this->respond('failed', HttpStatusCode::HTTP_BAD_REQUEST, 'Failed to process webhook'); + + exit; } $this->respond('success', HttpStatusCode::HTTP_OK, $result);