From 43a2e3553e6140de7824fbd12200b139c8ae2244 Mon Sep 17 00:00:00 2001 From: ditsuke Date: Fri, 22 Apr 2022 21:20:37 +0530 Subject: [PATCH] Fix order of args for sprintf, code style --- plugins/task/requests/requests.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/task/requests/requests.php b/plugins/task/requests/requests.php index fa26a543b4b48..32ece2d9d437b 100644 --- a/plugins/task/requests/requests.php +++ b/plugins/task/requests/requests.php @@ -124,12 +124,13 @@ protected function makeGetRequest(ExecuteTaskEvent $event): int $responseSaved = true; } - $responseStatus = (function() use ($responseSaved, $saveResponse) { + $responseStatus = (function () use ($responseSaved, $saveResponse) { $status = $saveResponse && $responseSaved ? 'SAVED' : 'NOT_SAVED'; + return Text::_("PLG_TASK_REQUESTS_TASK_GET_REQUEST_${status}"); })(); - $this->snapshot['output'] = Text::sprintf('PLG_TASK_REQUESTS_TASK_GET_REQUEST_LOG_OUTPUT', $responseCode, $responseStatus, $url); + $this->snapshot['output'] = Text::sprintf('PLG_TASK_REQUESTS_TASK_GET_REQUEST_LOG_OUTPUT', $url, $responseCode, $responseStatus); $this->logTask(Text::sprintf('PLG_TASK_REQUESTS_TASK_GET_REQUEST_LOG_RESPONSE', $responseCode));