From eba0cbf820973c59e098c40f3bc0732cd5b0ade9 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 7 Mar 2024 16:37:42 +0900 Subject: rename variables to camel case --- services/app/src/JobWorker.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/app/src/JobWorker.php b/services/app/src/JobWorker.php index 18e09ac..0b4e7cf 100644 --- a/services/app/src/JobWorker.php +++ b/services/app/src/JobWorker.php @@ -91,19 +91,19 @@ final class JobWorker $statuses[$updatedExId] = $newStatus; } - $pending_or_running_count = 0; - $ac_count = 0; + $pendingOrRunningCount = 0; + $acCount = 0; foreach ($statuses as $ex_id => $status) { match ($status) { - ExecutionStatus::AC => $ac_count++, - ExecutionStatus::Pending, ExecutionStatus::Running => $pending_or_running_count++, + ExecutionStatus::AC => $acCount++, + ExecutionStatus::Pending, ExecutionStatus::Running => $pendingOrRunningCount++, default => null, }; } $aggregatedStatus = match (true) { - $ac_count === count($statuses) => AggregatedExecutionStatus::OK, - $pending_or_running_count !== 0 => AggregatedExecutionStatus::Pending, + $acCount === count($statuses) => AggregatedExecutionStatus::OK, + $pendingOrRunningCount !== 0 => AggregatedExecutionStatus::Pending, default => AggregatedExecutionStatus::Failed, }; $this->answerRepo->updateExecutionStatus($answer->answer_id, $aggregatedStatus); -- cgit v1.2.3-70-g09d2