TenantAtlas/apps/platform/app/Support/TenantConfiguration/CaptureOutcome.php
Ahmed Darrazi 736e61c73e
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 1m37s
feat: add generic content-backed coverage capture
2026-06-25 21:55:27 +02:00

44 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Support\TenantConfiguration;
enum CaptureOutcome: string
{
case Captured = 'captured';
case BlockedMissingContract = 'capture_blocked_missing_contract';
case BlockedPermission = 'capture_blocked_permission';
case BlockedBeta = 'capture_blocked_beta';
case BlockedUnsupported = 'capture_blocked_unsupported';
case Failed = 'capture_failed';
/**
* @return list<string>
*/
public static function values(): array
{
return array_map(static fn (self $case): string => $case->value, self::cases());
}
public function isCaptured(): bool
{
return $this === self::Captured;
}
public function isFailure(): bool
{
return $this === self::Failed;
}
public function isBlocked(): bool
{
return in_array($this, [
self::BlockedMissingContract,
self::BlockedPermission,
self::BlockedBeta,
self::BlockedUnsupported,
], true);
}
}