Skip to content

Commit

Permalink
- cs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
unixslayer committed Nov 29, 2021
1 parent b350a9e commit 2711066
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AggregateRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public function saveAggregateRoot(AggregateRoot $aggregateRoot): void
$streamEvents = new \ArrayIterator($events);

$streamName = new StreamName($this->streamName());

try {
$this->eventStore->appendTo($streamName, $streamEvents);
} catch (StreamNotFound $e) {
Expand All @@ -73,7 +74,7 @@ public function getAggregateRoot(UuidInterface $aggregateId): ?AggregateRoot
$metadataMatcher = new MetadataMatcher();
$aggregateType = $this->aggregateType();
$metadataMatcher = $metadataMatcher->withMetadataMatch('_aggregateType', Operator::EQUALS(), $aggregateType);
$metadataMatcher = $metadataMatcher->withMetadataMatch('_aggregateId', Operator::EQUALS(), (string) $aggregateId);
$metadataMatcher = $metadataMatcher->withMetadataMatch('_aggregateId', Operator::EQUALS(), (string)$aggregateId);

try {
$streamEvents = $this->eventStore->load($streamName, 1, null, $metadataMatcher);
Expand Down

0 comments on commit 2711066

Please sign in to comment.