Lines
100.00%
2 / 2
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| getLateness | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 10 | final readonly class ScheduledRun | |
| 11 | { | |
| 12 | public function __construct( | |
| 13 | public ScheduledTask $task, | |
| 14 | public Instant $scheduledFor, | |
| 15 | public Instant $firedAt, | |
| 16 | public int $missedOccurrences, | |
| 17 | ) {} | |
| 18 | ||
| 19 | public function getLateness(): Duration | |
| 20 | { | |
| 21 | return $this->firedAt->elapsedSince($this->scheduledFor); | |
| 22 | } | |
| 23 | } |