use enum for saving

This commit is contained in:
2025-04-22 14:58:02 +03:30
parent ef373a9f5b
commit 16c143fa4c
2 changed files with 10 additions and 11 deletions

View File

@@ -8,9 +8,7 @@ enum SafetyAndPrivacySteps: int
case MOSTANADAT_GAZAEI = 2;
case BARKHORD = 3;
public static function name(int $state): string
public static function name(int $step): string
{
$mapArray = [
1 => 'گام اول (شناسایی)',
@@ -18,6 +16,6 @@ enum SafetyAndPrivacySteps: int
3 => 'گام سوم (برخورد)',
];
return $mapArray[$state];
return $mapArray[$step];
}
}