diff --git a/src/Message.php b/src/Message.php index be527cff..7f71654e 100644 --- a/src/Message.php +++ b/src/Message.php @@ -7,6 +7,9 @@ use DateTimeImmutable; use RuntimeException; +/** + * @template TId of AggregateRootId + */ final class Message { public const TIME_OF_RECORDING_FORMAT = 'Y-m-d H:i:s.uO'; @@ -52,6 +55,9 @@ public function aggregateVersion(): int return (int) $version; } + /** + * @return TId|null + */ public function aggregateRootId(): ?AggregateRootId { return $this->headers[Header::AGGREGATE_ROOT_ID] ?? null;