TenantAtlas/apps/platform/app/Support/EnvironmentReviewStatus.php
Ahmed Darrazi 5443dba269
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 7m2s
refactor: consolidate internal tenant model naming
2026-05-14 13:09:36 +02:00

39 lines
821 B
PHP

<?php
declare(strict_types=1);
namespace App\Support;
enum EnvironmentReviewStatus: string
{
case Draft = 'draft';
case Ready = 'ready';
case Published = 'published';
case Archived = 'archived';
case Superseded = 'superseded';
case Failed = 'failed';
/**
* @return list<string>
*/
public static function values(): array
{
return array_map(static fn (self $case): string => $case->value, self::cases());
}
public function isMutable(): bool
{
return in_array($this, [self::Draft, self::Ready, self::Failed], true);
}
public function isTerminal(): bool
{
return in_array($this, [self::Archived, self::Superseded], true);
}
public function isPublished(): bool
{
return $this === self::Published;
}
}