ran pint
This commit is contained in:
@@ -11,4 +11,4 @@ trait Arrayable
|
||||
|
||||
return array_combine($names, $values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@ use App\Enums\Concerns\Arrayable;
|
||||
enum DeploymentStatus: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
|
||||
case PENDING = 'pending';
|
||||
case IN_PROGRESS = 'in-progress';
|
||||
case COMPLETED = 'completed';
|
||||
case CANCELLED = 'canceled';
|
||||
case FAILED = 'failed';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ enum FirewallRuleStatus: string
|
||||
case INSTALLED = 'installed';
|
||||
case FAILED = 'failed';
|
||||
case REMOVED = 'removed';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@ enum FirewallRuleType: string
|
||||
{
|
||||
case ALLOW = 'allow';
|
||||
case DENY = 'deny';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use App\Enums\Concerns\Arrayable;
|
||||
enum NetworkType: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
|
||||
case EXTERNAL = 'external'; // managed by provider
|
||||
case INTERNAL = 'internal'; // managed by keystone
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@ enum RepositoryType: string
|
||||
use Arrayable;
|
||||
|
||||
case GIT = 'git';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use App\Enums\Concerns\Arrayable;
|
||||
enum ServerStatus: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
|
||||
case WAITING_FOR_PROVIDER = 'waiting-for-provider';
|
||||
case PROVIDER_TIMEOUT = 'provider-timeout';
|
||||
case UNPROVISIONED = 'unprovisioned';
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ use App\Enums\Concerns\Arrayable;
|
||||
enum ServiceStatus: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
|
||||
case NOT_INSTALLED = 'not-installed';
|
||||
case INSTALLING = 'installing';
|
||||
case RUNNING = 'running';
|
||||
case STOPPED = 'stopped';
|
||||
case ERROR = 'error';
|
||||
case UNKNOWN = 'unknown';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ namespace App\Enums;
|
||||
|
||||
use App\Enums\Concerns\Arrayable;
|
||||
|
||||
enum ServiceType: string {
|
||||
enum ServiceType: string
|
||||
{
|
||||
use Arrayable;
|
||||
|
||||
case FRANKENPHP = 'frankenphp';
|
||||
|
||||
Reference in New Issue
Block a user