Skip to content

Commit

Permalink
Merge pull request #37 from PcComponentes/feature/improve_return_types
Browse files Browse the repository at this point in the history
refactor: improve return types
  • Loading branch information
calmohallag authored Sep 20, 2022
2 parents 544f5fc + 126e85d commit 9b64f2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Domain/Model/AggregateRoot.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final protected function __construct(Uuid $aggregateId, int $aggregateVersion =
$this->aggregateVersion = $aggregateVersion;
}

final public static function reconstitute(Uuid $id, DomainEvent ...$events): self
final public static function reconstitute(Uuid $id, DomainEvent ...$events): static
{
if (0 === \count($events)) {
throw new \InvalidArgumentException('Can`t reconstitute without events');
Expand Down
2 changes: 1 addition & 1 deletion src/Util/Message/AggregateMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final public static function fromPayload(
DateTimeValueObject $occurredOn,
array $payload,
int $aggregateVersion = 0
): self {
): static {
$message = new static($messageId, $aggregateId, $aggregateVersion, $occurredOn, $payload);
$message->assertPayload();

Expand Down

0 comments on commit 9b64f2a

Please sign in to comment.