44 lines
738 B
PHP
44 lines
738 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use Kwaadpepper\Enum\BaseEnum;
|
|
|
|
/**
|
|
* @method static self easy()
|
|
* Facile
|
|
* @method static self medium()
|
|
* Moyenne
|
|
* @method static self hard()
|
|
* Difficile
|
|
*/
|
|
final class DifficultyEnum extends BaseEnum
|
|
{
|
|
/**
|
|
* Enum values
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function values(): array
|
|
{
|
|
return [
|
|
'easy' => 0,
|
|
'medium' => 1,
|
|
'hard' => 2
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Enum labels
|
|
*
|
|
* @return array
|
|
*/
|
|
protected static function labels(): array
|
|
{
|
|
return [
|
|
'easy' => trans('Facile'),
|
|
'medium' => trans('Moyen'),
|
|
'hard' => trans('Difficile')
|
|
];
|
|
}
|
|
}
|