TenantAtlas/apps/platform/app/Support/TenantConfiguration/CaptureOutcome.php
ahmido ca0f54614d feat: add generic content-backed coverage capture (#482)
Automated PR provided by Codex via Gitea API.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #482
2026-06-25 19:55:52 +00: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);
}
}