| Total Complexity | 6 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class Unbinding |
||
| 12 | { |
||
| 13 | private $exchange; |
||
| 14 | private $queue; |
||
| 15 | private $routingKey; |
||
| 16 | private $arguments; |
||
| 17 | |||
| 18 | 10 | public function __construct(string $exchange, string $queue, string $routingKey = '') |
|
| 19 | { |
||
| 20 | 10 | $this->exchange = $exchange; |
|
| 21 | 10 | $this->queue = $queue; |
|
| 22 | 10 | $this->routingKey = $routingKey; |
|
| 23 | 10 | $this->arguments = new Map('string', 'mixed'); |
|
| 24 | 10 | } |
|
| 25 | |||
| 26 | 4 | public function withArgument(string $key, $value): self |
|
| 27 | { |
||
| 28 | 4 | $self = clone $this; |
|
| 29 | 4 | $self->arguments = $self->arguments->put($key, $value); |
|
| 30 | |||
| 31 | 4 | return $self; |
|
| 32 | } |
||
| 33 | |||
| 34 | 6 | public function exchange(): string |
|
| 37 | } |
||
| 38 | |||
| 39 | 6 | public function queue(): string |
|
| 40 | { |
||
| 41 | 6 | return $this->queue; |
|
| 42 | } |
||
| 43 | |||
| 44 | 6 | public function routingKey(): string |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return MapInterface<string, mixed> |
||
| 51 | */ |
||
| 52 | 8 | public function arguments(): MapInterface |
|
| 55 | } |
||
| 56 | } |
||
| 57 |