| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | final class Purge |
||
| 7 | { |
||
| 8 | private $name; |
||
| 9 | private $wait = true; |
||
| 10 | |||
| 11 | 16 | public function __construct(string $name) |
|
| 12 | { |
||
| 13 | 16 | $this->name = $name; |
|
| 14 | 16 | } |
|
| 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 | 10 | public function name(): string |
|
| 35 | } |
||
| 36 | |||
| 37 | 10 | public function shouldWait(): bool |
|
| 40 | } |
||
| 41 | } |
||
| 42 |