Total Complexity | 2 |
Total Lines | 11 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | final readonly class FailedEnvelope |
||
|
|||
24 | { |
||
25 | public DispatchException $exception; |
||
26 | |||
27 | public function __construct( |
||
28 | public Envelope $envelope, |
||
29 | \Throwable $exception, |
||
30 | public \DateTimeImmutable $whenFailed = new \DateTimeImmutable(), |
||
31 | ) { |
||
32 | $this->exception = $exception instanceof DispatchException ? $exception : DispatchException::fromThrowable($exception); |
||
33 | } |
||
34 | } |
||
35 |