ran pint
This commit is contained in:
@@ -7,20 +7,22 @@ use App\Enums\Concerns\Arrayable;
|
||||
enum ServiceCategory: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
|
||||
case DATABASE = 'database';
|
||||
case APPLICATION = 'application';
|
||||
case GATEWAY = 'gateway';
|
||||
case STORAGE = 'storage';
|
||||
case CACHE = 'cache';
|
||||
|
||||
public static function getDescription(ServiceCategory|string $category) {
|
||||
public static function getDescription(ServiceCategory|string $category)
|
||||
{
|
||||
if (is_string($category)) {
|
||||
$category = ServiceCategory::from($category);
|
||||
}
|
||||
if (! $category instanceof ServiceCategory) {
|
||||
throw new \InvalidArgumentException('Invalid category provided');
|
||||
}
|
||||
|
||||
return match ($category) {
|
||||
self::APPLICATION => 'The base container image for your application',
|
||||
self::DATABASE => 'Postgres or MySQL',
|
||||
@@ -29,4 +31,4 @@ enum ServiceCategory: string
|
||||
self::CACHE => 'Redis, Memcached or similar',
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user