diff --git a/app/Enums/WorkerStatuses.php b/app/Enums/WorkerStatuses.php index 529e85c..a215908 100644 --- a/app/Enums/WorkerStatuses.php +++ b/app/Enums/WorkerStatuses.php @@ -25,11 +25,11 @@ enum WorkerStatuses: int } public static function getWorkerStatuses(): array { - $statuses_names = self::names(); + $statuses = self::cases(); $result = []; - foreach ($statuses_names as $status_name){ - $result[self::{$status_name}->value] = self::{$status_name}->label(); + foreach ($statuses as $status) { + $result[$status->value] = $status->label(); } return $result; }