Skip to content

Commit

Permalink
improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBadura committed Nov 19, 2020
1 parent 4023d2d commit 22aa901
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Repository/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ final class Repository
*/
private array $instances = [];


public function __construct(
Store $store,
EventStream $eventStream,
Expand Down Expand Up @@ -80,7 +79,7 @@ public function save(AggregateRoot $aggregate): void
return;
}

$this->store->save($this->aggregateClass, $aggregate->aggregateRootId(), $eventStream);
$this->store->saveBatch($this->aggregateClass, $aggregate->aggregateRootId(), $eventStream);

foreach ($eventStream as $event) {
$this->eventStream->dispatch($event);
Expand Down
2 changes: 1 addition & 1 deletion src/Store/MysqlSingleTableStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function count(): int
* @param class-string $aggregate
* @param AggregateChanged[] $events
*/
public function save(string $aggregate, string $id, array $events): void
public function saveBatch(string $aggregate, string $id, array $events): void
{
$this->connection->transactional(
static function (Connection $connection) use ($aggregate, $id, $events): void {
Expand Down
2 changes: 1 addition & 1 deletion src/Store/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function count(): int;
* @param class-string $aggregate
* @param AggregateChanged[] $events
*/
public function save(string $aggregate, string $id, array $events): void;
public function saveBatch(string $aggregate, string $id, array $events): void;

public function prepare(): void;

Expand Down

0 comments on commit 22aa901

Please sign in to comment.