DismissalReasonType has six values; manually_resolved is intentionally absent because Resolve and Dismiss are separate workflows (RFC V2). Refs: RFC-WS-6.md §3 (Q4 partial-status separation), §4 (V2 dismiss enum) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
39 lines
886 B
PHP
39 lines
886 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Enums\FormBuilder;
|
|
|
|
/**
|
|
* RFC-WS-6 §3 (Q4) — apply-state of a FormSubmission's binding pipeline.
|
|
* Distinct from {@see \App\Models\FormBuilder\FormSubmission::$identity_match_status},
|
|
* which tracks identity resolution (RFC O1).
|
|
*/
|
|
enum ApplyStatus: string
|
|
{
|
|
case PENDING = 'pending';
|
|
case COMPLETED = 'completed';
|
|
case PARTIAL = 'partial';
|
|
case FAILED = 'failed';
|
|
|
|
public function isTerminal(): bool
|
|
{
|
|
return $this !== self::PENDING;
|
|
}
|
|
|
|
public function isOpen(): bool
|
|
{
|
|
return $this !== self::COMPLETED;
|
|
}
|
|
|
|
public function label(): string
|
|
{
|
|
return match ($this) {
|
|
self::PENDING => 'Wachtrij',
|
|
self::COMPLETED => 'Voltooid',
|
|
self::PARTIAL => 'Gedeeltelijk mislukt',
|
|
self::FAILED => 'Mislukt',
|
|
};
|
|
}
|
|
}
|