Total Complexity | 7 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 0 |
1 | <?php |
||
11 | final class FailureHandlingRequest |
||
12 | { |
||
13 | 27 | public function __construct(private MessageInterface $message, private Throwable $exception, private QueueInterface $queue) |
|
14 | { |
||
15 | 27 | } |
|
16 | |||
17 | /** |
||
18 | * @return MessageInterface |
||
19 | */ |
||
20 | 24 | public function getMessage(): MessageInterface |
|
21 | { |
||
22 | 24 | return $this->message; |
|
23 | } |
||
24 | |||
25 | 4 | public function getException(): Throwable |
|
26 | { |
||
27 | 4 | return $this->exception; |
|
28 | } |
||
29 | |||
30 | 8 | public function getQueue(): QueueInterface |
|
31 | { |
||
32 | 8 | return $this->queue; |
|
33 | } |
||
34 | |||
35 | 20 | public function withMessage(MessageInterface $message): self |
|
41 | } |
||
42 | |||
43 | public function withException(Throwable $exception): self |
||
44 | { |
||
45 | $instance = clone $this; |
||
49 | } |
||
50 | |||
51 | 4 | public function withQueue(QueueInterface $queue): self |
|
59 |