28 lines
521 B
PHP
28 lines
521 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
enum AccidentWeatherConditions: int
|
|
{
|
|
case BARFI= 1;
|
|
case KOLAK = 2;
|
|
case AFTABI = 3;
|
|
|
|
case BARANI = 4;
|
|
case YAKHBANDAN = 5;
|
|
case MEH = 6;
|
|
|
|
public static function name(int $state): string
|
|
{
|
|
$mapArray = [
|
|
1 => 'برفی',
|
|
2 => 'کولاک',
|
|
3 => 'آفتابی',
|
|
4 => 'بارانی',
|
|
5 => 'یخبندان',
|
|
6 => 'مه آلود',
|
|
];
|
|
|
|
return $mapArray[$state];
|
|
}
|
|
} |