@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $config = new ApplicationConfig(); |
| 45 | 45 | $config->setCatchExceptions(false); |
| 46 | 46 | $config->setTerminateAfterRun(false); |
| 47 | - $config->setIOFactory(function ($application, $args, $inputStream, $outputStream, $errorStream) { |
|
| 47 | + $config->setIOFactory(function($application, $args, $inputStream, $outputStream, $errorStream) { |
|
| 48 | 48 | return new IO(new Input($inputStream), new Output($outputStream), new Output($errorStream)); |
| 49 | 49 | }); |
| 50 | 50 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | ->boolean(file_exists($this->getMigratorFileName(\BlogEventSourced::class, $version))) |
| 62 | 62 | ->isTrue() |
| 63 | 63 | ->and() |
| 64 | - ->exception(function () use ($migrator, $version) { |
|
| 64 | + ->exception(function() use ($migrator, $version) { |
|
| 65 | 65 | $migrator->generate($version); |
| 66 | 66 | })->isInstanceOf(\RuntimeException::class) |
| 67 | 67 | ; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | ->boolean($result) |
| 217 | 217 | ->isTrue() |
| 218 | 218 | ->and() |
| 219 | - ->exception(function () use ($migrator) { |
|
| 219 | + ->exception(function() use ($migrator) { |
|
| 220 | 220 | // because the V1_0_0\BlogEventSourcedMigration class return an invalid stream |
| 221 | 221 | $migrator->migrate(); |
| 222 | 222 | })->isInstanceOf(\RuntimeException::class) |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | ) |
| 57 | 57 | ) |
| 58 | 58 | ->then() |
| 59 | - ->exception(function () use ($post) { |
|
| 59 | + ->exception(function() use ($post) { |
|
| 60 | 60 | $post->publish(); |
| 61 | 61 | })->isInstanceOf(\BadMethodCallException::class) |
| 62 | 62 | ; |
@@ -174,16 +174,16 @@ discard block |
||
| 174 | 174 | ->array($post->recordedEvents()) |
| 175 | 175 | ->hasSize(2) |
| 176 | 176 | ->and() |
| 177 | - ->exception(function () use ($post) { |
|
| 177 | + ->exception(function() use ($post) { |
|
| 178 | 178 | $post->changeTitle(''); |
| 179 | 179 | })->isInstanceOf(ValidationException::class) |
| 180 | - ->exception(function () use ($post) { |
|
| 180 | + ->exception(function() use ($post) { |
|
| 181 | 181 | $post->changeTitle(10); |
| 182 | 182 | })->isInstanceOf(ValidationException::class) |
| 183 | 183 | ; |
| 184 | 184 | |
| 185 | 185 | $this |
| 186 | - ->exception(function () { |
|
| 186 | + ->exception(function() { |
|
| 187 | 187 | PostEventSourcedFactory::create('', $this->faker->paragraph); |
| 188 | 188 | })->isInstanceOf(ValidationException::class) |
| 189 | 189 | ; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $this |
| 74 | 74 | ->given($postId = PostId::fromNative(md5(rand()))) |
| 75 | 75 | ->then() |
| 76 | - ->exception(function () use ($postId) { |
|
| 76 | + ->exception(function() use ($postId) { |
|
| 77 | 77 | new EventStream('posts', $postId, ['bar']); |
| 78 | 78 | })->isInstanceOf(\InvalidArgumentException::class) |
| 79 | 79 | ; |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $this |
| 82 | 82 | ->given($postId = PostId::fromNative(md5(rand()))) |
| 83 | 83 | ->then() |
| 84 | - ->exception(function () use ($postId) { |
|
| 84 | + ->exception(function() use ($postId) { |
|
| 85 | 85 | new EventStream( |
| 86 | 86 | 'posts', |
| 87 | 87 | $postId, |
@@ -92,19 +92,19 @@ discard block |
||
| 92 | 92 | ->and($applicationVersion = new Version()) |
| 93 | 93 | ->when($store->persist($eventStream, $aggregateVersion, $applicationVersion)) |
| 94 | 94 | ->then() |
| 95 | - ->exception(function () use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 95 | + ->exception(function() use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 96 | 96 | $store->load('blogs', $postId, $aggregateVersion, $applicationVersion); |
| 97 | 97 | })->isInstanceOf(\RuntimeException::class) |
| 98 | - ->exception(function () use ($store, $postId, $applicationVersion) { |
|
| 98 | + ->exception(function() use ($store, $postId, $applicationVersion) { |
|
| 99 | 99 | $store->load('posts', $postId, new Version(0, 10, 456), $applicationVersion); |
| 100 | 100 | })->isInstanceOf(\RuntimeException::class) |
| 101 | - ->exception(function () use ($store, $aggregateVersion, $applicationVersion) { |
|
| 101 | + ->exception(function() use ($store, $aggregateVersion, $applicationVersion) { |
|
| 102 | 102 | $store->load('posts', PostId::fromNative(md5(rand())), $aggregateVersion, $applicationVersion); |
| 103 | 103 | })->isInstanceOf(\RuntimeException::class) |
| 104 | 104 | ->and() |
| 105 | 105 | ->when($applicationVersion = Version::fromString('2.1.0')) |
| 106 | 106 | ->then() |
| 107 | - ->exception(function () use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 107 | + ->exception(function() use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 108 | 108 | $store->load('posts', $postId, $aggregateVersion, $applicationVersion); |
| 109 | 109 | })->isInstanceOf(\RuntimeException::class) |
| 110 | 110 | ; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | ->and($aggregateVersion = new Version()) |
| 122 | 122 | ->and($applicationVersion = new Version()) |
| 123 | 123 | ->then() |
| 124 | - ->exception(function () use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 124 | + ->exception(function() use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 125 | 125 | $store->remove('posts', $postId, $aggregateVersion, $applicationVersion); |
| 126 | 126 | })->isInstanceOf(\RuntimeException::class) |
| 127 | 127 | ; |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | ->when($store->persist($eventStream, $aggregateVersion, $applicationVersion)) |
| 136 | 136 | ->and($store->remove('posts', $postId, $aggregateVersion, $applicationVersion)) |
| 137 | 137 | ->then() |
| 138 | - ->exception(function () use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 138 | + ->exception(function() use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 139 | 139 | $store->load('posts', $postId, $aggregateVersion, $applicationVersion); |
| 140 | 140 | })->isInstanceOf(\RuntimeException::class) |
| 141 | - ->exception(function () use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 141 | + ->exception(function() use ($store, $postId, $aggregateVersion, $applicationVersion) { |
|
| 142 | 142 | $store->remove('blogs', $postId, $aggregateVersion, $applicationVersion); |
| 143 | 143 | })->isInstanceOf(\RuntimeException::class) |
| 144 | - ->exception(function () use ($store, $postId, $applicationVersion) { |
|
| 144 | + ->exception(function() use ($store, $postId, $applicationVersion) { |
|
| 145 | 145 | $store->remove('posts', $postId, new Version(0, 10, 456), $applicationVersion); |
| 146 | 146 | })->isInstanceOf(\RuntimeException::class) |
| 147 | 147 | ; |
@@ -163,10 +163,10 @@ discard block |
||
| 163 | 163 | ->when($store->persist($eventStream, $aggregateVersion, $applicationVersion)) |
| 164 | 164 | ->and($store->persist($eventStream1, $aggregateVersion, $applicationVersion)) |
| 165 | 165 | ->then() |
| 166 | - ->exception(function () use ($store, $aggregateVersion, $applicationVersion) { |
|
| 166 | + ->exception(function() use ($store, $aggregateVersion, $applicationVersion) { |
|
| 167 | 167 | $store->loadAll('blogs', $aggregateVersion, $applicationVersion); |
| 168 | 168 | })->isInstanceOf(\RuntimeException::class) |
| 169 | - ->exception(function () use ($store, $applicationVersion) { |
|
| 169 | + ->exception(function() use ($store, $applicationVersion) { |
|
| 170 | 170 | $store->loadAll('posts', new Version(0, 10, 456), $applicationVersion); |
| 171 | 171 | })->isInstanceOf(\RuntimeException::class) |
| 172 | 172 | ->array($store->loadAll('posts', $aggregateVersion, $applicationVersion)) |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | ->and() |
| 175 | 175 | ->when($applicationVersion = Version::fromString('2.1.0')) |
| 176 | 176 | ->then() |
| 177 | - ->exception(function () use ($store, $aggregateVersion, $applicationVersion) { |
|
| 177 | + ->exception(function() use ($store, $aggregateVersion, $applicationVersion) { |
|
| 178 | 178 | $store->loadAll('posts', $aggregateVersion, $applicationVersion); |
| 179 | 179 | })->isInstanceOf(\RuntimeException::class) |
| 180 | 180 | ; |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | ->and($aggregateVersion = new Version()) |
| 192 | 192 | ->and($applicationVersion = new Version()) |
| 193 | 193 | ->then() |
| 194 | - ->exception(function () use ($store, $aggregateVersion, $applicationVersion) { |
|
| 194 | + ->exception(function() use ($store, $aggregateVersion, $applicationVersion) { |
|
| 195 | 195 | $store->removeAll('posts', $aggregateVersion, $applicationVersion); |
| 196 | 196 | })->isInstanceOf(\RuntimeException::class) |
| 197 | 197 | ; |
@@ -212,14 +212,14 @@ discard block |
||
| 212 | 212 | ->and() |
| 213 | 213 | ->when($store->removeAll('posts', $aggregateVersion, $applicationVersion)) |
| 214 | 214 | ->then() |
| 215 | - ->exception(function () use ($store, $aggregateVersion, $applicationVersion) { |
|
| 215 | + ->exception(function() use ($store, $aggregateVersion, $applicationVersion) { |
|
| 216 | 216 | // because there is no stream entry in the current application store |
| 217 | 217 | $store->loadAll('posts', $aggregateVersion, $applicationVersion); |
| 218 | 218 | })->isInstanceOf(\RuntimeException::class) |
| 219 | 219 | ->and() |
| 220 | 220 | ->when($applicationVersion = Version::fromString('2.1.0')) |
| 221 | 221 | ->then() |
| 222 | - ->exception(function () use ($store, $aggregateVersion, $applicationVersion) { |
|
| 222 | + ->exception(function() use ($store, $aggregateVersion, $applicationVersion) { |
|
| 223 | 223 | // because there is application entry in the store |
| 224 | 224 | $store->removeAll('posts', $aggregateVersion, $applicationVersion); |
| 225 | 225 | })->isInstanceOf(\RuntimeException::class) |
@@ -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 | ); |