Skip to content

Commit

Permalink
Fix order of args for sprintf, code style
Browse files Browse the repository at this point in the history
  • Loading branch information
ditsuke committed Apr 22, 2022
1 parent 3c48f28 commit 43a2e35
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/task/requests/requests.php
Expand Up @@ -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));

Expand Down

0 comments on commit 43a2e35

Please sign in to comment.