Total Complexity | 3 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | final class AggregateEvent |
||
21 | { |
||
22 | /** |
||
23 | * Event id. |
||
24 | */ |
||
25 | public string $id; |
||
26 | |||
27 | /** |
||
28 | * Playhead position. |
||
29 | */ |
||
30 | public int $playhead; |
||
31 | |||
32 | /** |
||
33 | * Received event. |
||
34 | */ |
||
35 | public object $event; |
||
36 | |||
37 | /** |
||
38 | * Occurred datetime. |
||
39 | */ |
||
40 | public \DateTimeImmutable$occuredAt; |
||
41 | |||
42 | /** |
||
43 | * Recorded datetime. |
||
44 | */ |
||
45 | public ?\DateTimeImmutable $recordedAt = null; |
||
46 | |||
47 | 10 | public static function create(string $id, object $event, int $playhead, \DateTimeImmutable $occuredAt): self |
|
48 | { |
||
49 | 10 | return new self($id, $event, $playhead, $occuredAt, null); |
|
50 | } |
||
51 | |||
52 | public static function restore( |
||
61 | } |
||
62 | |||
63 | 10 | private function __construct( |
|
76 | 10 | } |
|
77 | } |
||
78 |