| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | final class PushRequest |
||
| 11 | { |
||
| 12 | 22 | public function __construct(private MessageInterface $message, private ?AdapterInterface $adapter) |
|
| 14 | 22 | } |
|
| 15 | |||
| 16 | 19 | public function getMessage(): MessageInterface |
|
| 17 | { |
||
| 18 | 19 | return $this->message; |
|
| 19 | } |
||
| 20 | |||
| 21 | 11 | public function getAdapter(): ?AdapterInterface |
|
| 22 | { |
||
| 23 | 11 | return $this->adapter; |
|
| 24 | } |
||
| 25 | |||
| 26 | 19 | public function withMessage(MessageInterface $message): self |
|
| 27 | { |
||
| 28 | 19 | $instance = clone $this; |
|
| 29 | 19 | $instance->message = $message; |
|
| 30 | |||
| 31 | 19 | return $instance; |
|
| 32 | } |
||
| 33 | |||
| 34 | 3 | public function withAdapter(AdapterInterface $adapter): self |
|
| 40 | } |
||
| 41 | } |
||
| 42 |