Lines
66.66%
2 / 3
Methods
66.66%
2 / 3
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| fromException | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| getOutboxDelivery | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| 13 | final readonly class RequestFailed implements BrokerMessage | |
| 14 | { | |
| 15 | public function __construct( | |
| 16 | public CorrelationId $correlationId, | |
| 17 | public string $message, | |
| 18 | public ExceptionDetails $details, | |
| 19 | ) {} | |
| 20 | ||
| 21 | /** @param StewartException<ExceptionReason> $failure */ | |
| 22 | public static function fromException(CorrelationId $correlationId, StewartException $failure): self | |
| 23 | { | |
| 24 | return new self($correlationId, $failure->getMessage(), ExceptionDetails::fromException($failure)); | |
| 25 | } | |
| 26 | ||
| 27 | public function getOutboxDelivery(): OutboxDelivery | |
| 28 | { | |
| 29 | return OutboxDelivery::Plain; | |
| 30 | } | |
| 31 | } |