Lines 0.00% 0 / 3
Methods 0.00% 0 / 3
Classes 0.00% 0 / 1
Name Lines Methods CRAP
 __construct 0.00% 0 / 1 0.00% 0 / 1 2
 createUnreachableFailure 0.00% 0 / 1 0.00% 0 / 1 2
 createOverloadedFailure 0.00% 0 / 1 0.00% 0 / 1 2
14final readonly class EventFireRequest implements WorkerMessage, RefusableHaCallRequest
15{
16    /** @param array<string, mixed> $data */
17    public function __construct(
18        public CorrelationId $correlationId,
19        public ResourceScope $scope,
20        public string $eventType,
21        public array $data,
22    ) {}
23
24    public function createUnreachableFailure(string $detail, ?Throwable $previous = null): EventFireException
25    {
26        return EventFireException::unreachable($this->eventType, $detail, $previous);
27    }
28
29    public function createOverloadedFailure(string $detail): EventFireException
30    {
31        return EventFireException::createForReason(EventFireError::Overloaded, eventType: $this->eventType, detail: $detail);
32    }
33}