TenantAtlas/app/Support/TenantReviewStatus.php
2026-03-21 23:02:02 +01:00

39 lines
816 B
PHP

<?php
declare(strict_types=1);
namespace App\Support;
enum TenantReviewStatus: 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;
}
}