feat: add FuelType backed enum
This commit is contained in:
18
app/Enums/FuelType.php
Normal file
18
app/Enums/FuelType.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum FuelType: string
|
||||
{
|
||||
case E10 = 'e10';
|
||||
case E5 = 'e5';
|
||||
case B7Standard = 'b7_standard';
|
||||
case B7Premium = 'b7_premium';
|
||||
case B10 = 'b10';
|
||||
case Hvo = 'hvo';
|
||||
|
||||
public static function fromApiValue(string $value): self
|
||||
{
|
||||
return self::from(strtolower($value));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user