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
17final readonly class HistoryRequest implements WorkerMessage, RefusableHaCallRequest
18{
19    public function __construct(
20        public CorrelationId $correlationId,
21        public ResourceScope $scope,
22        public EntityId $entityId,
23        public HistoryWindow $window,
24        public HistoryDetail $detail,
25    ) {}
26
27    public function createUnreachableFailure(string $detail, ?Throwable $previous = null): HistoryException
28    {
29        return HistoryException::unreachable($this->entityId, $detail, $previous);
30    }
31
32    public function createOverloadedFailure(string $detail): HistoryException
33    {
34        return HistoryException::createForReason(HistoryError::Overloaded, entityId: $this->entityId->value, detail: $detail);
35    }
36}