@@ -102,7 +102,7 @@ |
||
102 | 102 | /** |
103 | 103 | * @param EventStream $history |
104 | 104 | * |
105 | - * @return AggregateRootInterface |
|
105 | + * @return EventSourcedAggregateRootInterface |
|
106 | 106 | */ |
107 | 107 | public static function loadFromHistory(EventStream $history) |
108 | 108 | { |
@@ -13,7 +13,6 @@ |
||
13 | 13 | |
14 | 14 | use Cubiche\Core\Validator\Validator; |
15 | 15 | use Cubiche\Domain\EventPublisher\DomainEventPublisher; |
16 | -use Cubiche\Domain\EventSourcing\Versioning\Version; |
|
17 | 16 | use Cubiche\Domain\EventSourcing\Versioning\VersionManager; |
18 | 17 | use Cubiche\Domain\EventSourcing\EventStore\EventStream; |
19 | 18 |
@@ -17,7 +17,6 @@ |
||
17 | 17 | use Cubiche\Domain\EventSourcing\Tests\Fixtures\Event\PostWasCreated; |
18 | 18 | use Cubiche\Domain\EventSourcing\Tests\Fixtures\PostEventSourced; |
19 | 19 | use Cubiche\Domain\EventSourcing\Tests\Fixtures\PostEventSourcedFactory; |
20 | -use Cubiche\Domain\EventSourcing\Versioning\Version; |
|
21 | 20 | |
22 | 21 | /** |
23 | 22 | * EventSourcedAggregateRootTests class. |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | ->and($eventId = $event->eventId()) |
104 | 104 | ->then() |
105 | 105 | ->array($event->toArray()) |
106 | - ->child['metadata'](function ($metadata) use ($postId, $eventId) { |
|
106 | + ->child['metadata'](function($metadata) use ($postId, $eventId) { |
|
107 | 107 | $metadata |
108 | 108 | ->hasKey('occurredOn') |
109 | 109 | ->object['aggregateId'] |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | ->isEqualTo(PostWasCreated::class) |
115 | 115 | ; |
116 | 116 | }) |
117 | - ->child['payload'](function ($payload) use ($title, $content) { |
|
117 | + ->child['payload'](function($payload) use ($title, $content) { |
|
118 | 118 | $payload |
119 | 119 | ->isEqualTo(array( |
120 | 120 | 'title' => $title, |
@@ -80,7 +80,7 @@ |
||
80 | 80 | ->given($postId = PostId::fromNative(md5(rand()))) |
81 | 81 | ->and($streamName = 'Posts-'.$postId) |
82 | 82 | ->then() |
83 | - ->exception(function () use ($streamName, $postId) { |
|
83 | + ->exception(function() use ($streamName, $postId) { |
|
84 | 84 | new EventStream($streamName, $postId, ['bar']); |
85 | 85 | })->isInstanceOf(\InvalidArgumentException::class) |
86 | 86 | ; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | ) |
84 | 84 | ) |
85 | 85 | ->then() |
86 | - ->exception(function () use ($repository, $post) { |
|
86 | + ->exception(function() use ($repository, $post) { |
|
87 | 87 | $repository->persist($post); |
88 | 88 | }) |
89 | 89 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | ) |
176 | 176 | ) |
177 | 177 | ->then() |
178 | - ->exception(function () use ($repository, $post) { |
|
178 | + ->exception(function() use ($repository, $post) { |
|
179 | 179 | $repository->remove($post); |
180 | 180 | }) |
181 | 181 | ->isInstanceOf(\InvalidArgumentException::class) |