Lines
80.00%
4 / 5
Methods
80.00%
4 / 5
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| getId | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| cancel | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| isActive | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| getNextRunAt | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 10 | final readonly class ScheduledTaskHandle implements ScheduledTask | |
| 11 | { | |
| 12 | public function __construct(private ScheduleEntry $entry) {} | |
| 13 | ||
| 14 | public function getId(): string | |
| 15 | { | |
| 16 | return $this->entry->origin->taskId; | |
| 17 | } | |
| 18 | ||
| 19 | public function cancel(): void | |
| 20 | { | |
| 21 | $this->entry->cancel(); | |
| 22 | } | |
| 23 | ||
| 24 | public function isActive(): bool | |
| 25 | { | |
| 26 | return $this->entry->active; | |
| 27 | } | |
| 28 | ||
| 29 | public function getNextRunAt(): ?Instant | |
| 30 | { | |
| 31 | return $this->entry->getNextRunAt(); | |
| 32 | } | |
| 33 | } |