major update
This commit is contained in:
30
lib/Domain/Taxonomy/SchedulerRuntimeResult.php
Normal file
30
lib/Domain/Taxonomy/SchedulerRuntimeResult.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Domain\Taxonomy;
|
||||
|
||||
enum SchedulerRuntimeResult: string
|
||||
{
|
||||
use SupportsStringTaxonomy;
|
||||
|
||||
case Ok = 'ok';
|
||||
case LockNotAcquired = 'lock_not_acquired';
|
||||
case UnexpectedError = 'unexpected_error';
|
||||
|
||||
public function labelToken(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Ok => 'OK',
|
||||
self::LockNotAcquired => 'Lock not acquired',
|
||||
self::UnexpectedError => 'Unexpected error',
|
||||
};
|
||||
}
|
||||
|
||||
public function badgeVariant(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Ok => 'success',
|
||||
self::LockNotAcquired => 'warning',
|
||||
self::UnexpectedError => 'danger',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user