diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-07 16:37:42 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-07 16:37:42 +0900 |
| commit | eba0cbf820973c59e098c40f3bc0732cd5b0ade9 (patch) | |
| tree | 99645f8db3d8f16d9ad02e92dd423d6dfd49b79c /services | |
| parent | b1f6ee58b3c8a61cd39431ef38dce20c68b68a40 (diff) | |
| download | phperkaigi-2024-albatross-eba0cbf820973c59e098c40f3bc0732cd5b0ade9.tar.gz phperkaigi-2024-albatross-eba0cbf820973c59e098c40f3bc0732cd5b0ade9.tar.zst phperkaigi-2024-albatross-eba0cbf820973c59e098c40f3bc0732cd5b0ade9.zip | |
rename variables to camel case
Diffstat (limited to 'services')
| -rw-r--r-- | services/app/src/JobWorker.php | 12 |
1 files 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); |
