Lines
100.00%
4 / 4
Methods
100.00%
3 / 3
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| describe | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| play | 100.00% | 2 / 2 | 100.00% | 1 / 1 | 1 | ||
| 14 | final readonly class Wait implements Action | |
| 15 | { | |
| 16 | public function __construct( | |
| 17 | public Duration $time, | |
| 18 | ) {} | |
| 19 | ||
| 20 | #[Override] | |
| 21 | public function describe(): string | |
| 22 | { | |
| 23 | return 'Wait ' . (int) $this->time->getTotalSeconds() . 's'; | |
| 24 | } | |
| 25 | ||
| 26 | #[Override] | |
| 27 | public function play(StepScript $bot): Generator | |
| 28 | { | |
| 29 | yield new Pause($this->time); | |
| 30 | ||
| 31 | return null; | |
| 32 | } | |
| 33 | } |