@@ -64,7 +64,7 @@ |
||
| 64 | 64 | ; |
| 65 | 65 | |
| 66 | 66 | $this |
| 67 | - ->exception(function () { |
|
| 67 | + ->exception(function() { |
|
| 68 | 68 | new CompositeSnapshottingPolicy( |
| 69 | 69 | [new AllwaysSnapshottingPolicy(), 'foo'] |
| 70 | 70 | ); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ) |
| 58 | 58 | ) |
| 59 | 59 | ->then() |
| 60 | - ->exception(function () use ($post) { |
|
| 60 | + ->exception(function() use ($post) { |
|
| 61 | 61 | $post->remove(); |
| 62 | 62 | })->isInstanceOf(\BadMethodCallException::class) |
| 63 | 63 | ; |
@@ -175,16 +175,16 @@ discard block |
||
| 175 | 175 | ->array($post->recordedEvents()) |
| 176 | 176 | ->hasSize(2) |
| 177 | 177 | ->and() |
| 178 | - ->exception(function () use ($post) { |
|
| 178 | + ->exception(function() use ($post) { |
|
| 179 | 179 | $post->changeTitle(''); |
| 180 | 180 | })->isInstanceOf(ValidationException::class) |
| 181 | - ->exception(function () use ($post) { |
|
| 181 | + ->exception(function() use ($post) { |
|
| 182 | 182 | $post->changeTitle(10); |
| 183 | 183 | })->isInstanceOf(ValidationException::class) |
| 184 | 184 | ; |
| 185 | 185 | |
| 186 | 186 | $this |
| 187 | - ->exception(function () { |
|
| 187 | + ->exception(function() { |
|
| 188 | 188 | PostEventSourcedFactory::create('', $this->faker->paragraph); |
| 189 | 189 | })->isInstanceOf(ValidationException::class) |
| 190 | 190 | ; |
@@ -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. |
@@ -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 | |
@@ -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) |