Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
6 | final class Cancel |
||
7 | { |
||
8 | private $consumerTag; |
||
9 | private $wait = true; |
||
10 | |||
11 | 28 | public function __construct(string $consumerTag) |
|
12 | { |
||
13 | 28 | $this->consumerTag = $consumerTag; |
|
14 | 28 | } |
|
15 | |||
16 | 6 | public function dontWait(): self |
|
17 | { |
||
18 | 6 | $self = clone $this; |
|
19 | 6 | $self->wait = false; |
|
20 | |||
21 | 6 | return $self; |
|
22 | } |
||
23 | |||
24 | 2 | public function wait(): self |
|
25 | { |
||
26 | 2 | $self = clone $this; |
|
27 | 2 | $self->wait = true; |
|
28 | |||
29 | 2 | return $self; |
|
30 | } |
||
31 | |||
32 | 24 | public function consumerTag(): string |
|
33 | { |
||
34 | 24 | return $this->consumerTag; |
|
35 | } |
||
36 | |||
37 | 24 | public function shouldWait(): bool |
|
40 | } |
||
41 | } |
||
42 |