@@ -102,7 +102,7 @@ discard block |
||
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 | { |
@@ -128,6 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | /** |
130 | 130 | * {@inheritdoc} |
131 | + * @return Version |
|
131 | 132 | */ |
132 | 133 | public function version() |
133 | 134 | { |
@@ -31,7 +31,7 @@ |
||
31 | 31 | class MigratorWithSnapshotTests extends MigratorTests |
32 | 32 | { |
33 | 33 | /** |
34 | - * @return Migrator |
|
34 | + * @return MigratorWithSnapshot |
|
35 | 35 | */ |
36 | 36 | protected function createMigrator() |
37 | 37 | { |
@@ -163,7 +163,7 @@ |
||
163 | 163 | ) |
164 | 164 | )->isNotNull() |
165 | 165 | ->and() |
166 | - ->exception(function () use ($migrator) { |
|
166 | + ->exception(function() use ($migrator) { |
|
167 | 167 | // because the V1_0_0\BlogEventSourcedMigration class return an invalid stream |
168 | 168 | $migrator->migrate(); |
169 | 169 | })->isInstanceOf(\RuntimeException::class) |
@@ -54,7 +54,7 @@ |
||
54 | 54 | { |
55 | 55 | $this->migrationStore = $migrationStore; |
56 | 56 | $this->migrationsDirectory = $migrationsDirectory; |
57 | - $this->migrationsInFile = new SortedArrayHashMap([], Comparator::from(function ($v1, $v2) { |
|
57 | + $this->migrationsInFile = new SortedArrayHashMap([], Comparator::from(function($v1, $v2) { |
|
58 | 58 | return Version::fromString($v1)->compareTo(Version::fromString($v2)); |
59 | 59 | })); |
60 | 60 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function __construct() |
34 | 34 | { |
35 | - $this->store = new SortedArrayHashMap([], Comparator::from(function ($a, $b) { |
|
35 | + $this->store = new SortedArrayHashMap([], Comparator::from(function($a, $b) { |
|
36 | 36 | // order desc |
37 | 37 | return -1 * Version::fromString($a)->compareTo(Version::fromString($b)); |
38 | 38 | })); |
@@ -125,14 +125,12 @@ |
||
125 | 125 | array( |
126 | 126 | ' Latest Version', |
127 | 127 | $status->latestAvailableVersion() ? |
128 | - '<c2>'.$status->latestAvailableVersion()->__toString().'</c2>' : |
|
129 | - '<c2>none</c2>', |
|
128 | + '<c2>'.$status->latestAvailableVersion()->__toString().'</c2>' : '<c2>none</c2>', |
|
130 | 129 | ), |
131 | 130 | array( |
132 | 131 | ' Next Version', |
133 | 132 | $status->nextAvailableVersion() ? |
134 | - '<c2>'.$status->nextAvailableVersion()->__toString().'</c2>' : |
|
135 | - '<c2>none</c2>', |
|
133 | + '<c2>'.$status->nextAvailableVersion()->__toString().'</c2>' : '<c2>none</c2>', |
|
136 | 134 | ), |
137 | 135 | array( |
138 | 136 | ' Executed Migrations', |
@@ -130,7 +130,7 @@ |
||
130 | 130 | ->isEqualTo(-1) |
131 | 131 | ->integer($version6->compareTo($version5)) |
132 | 132 | ->isEqualTo(1) |
133 | - ->exception(function () use ($version1) { |
|
133 | + ->exception(function() use ($version1) { |
|
134 | 134 | $version1->compareTo($this); |
135 | 135 | }) |
136 | 136 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -46,7 +46,7 @@ |
||
46 | 46 | ->boolean(file_exists($this->getMigratorFileName($aggregateClass, $version))) |
47 | 47 | ->isTrue() |
48 | 48 | ->and() |
49 | - ->exception(function () use ($generator, $aggregateClass, $version) { |
|
49 | + ->exception(function() use ($generator, $aggregateClass, $version) { |
|
50 | 50 | $generator->generate($aggregateClass, $version); |
51 | 51 | })->isInstanceOf(\RuntimeException::class) |
52 | 52 | ; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | ->string($reflectionProperty->getValue($template)) |
48 | 48 | ->isEqualTo(file_get_contents(__DIR__.'/TemplateTests.php')) |
49 | 49 | ->and() |
50 | - ->exception(function () use ($template) { |
|
50 | + ->exception(function() use ($template) { |
|
51 | 51 | $template->setFile(__DIR__.'/Foo.php'); |
52 | 52 | })->isInstanceOf(\InvalidArgumentException::class) |
53 | 53 | ; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | ) |
95 | 95 | ->and($template->setVar($values)) |
96 | 96 | ->and( |
97 | - $keys = array_map(function ($key) { |
|
97 | + $keys = array_map(function($key) { |
|
98 | 98 | return '{'.$key.'}'; |
99 | 99 | }, array_keys($values)) |
100 | 100 | ) |
@@ -126,12 +126,12 @@ discard block |
||
126 | 126 | ) |
127 | 127 | ->and($template->setVar($values)) |
128 | 128 | ->and( |
129 | - $keys = array_map(function ($key) { |
|
129 | + $keys = array_map(function($key) { |
|
130 | 130 | return '{'.$key.'}'; |
131 | 131 | }, array_keys($values)) |
132 | 132 | ) |
133 | 133 | ->then() |
134 | - ->exception(function () use ($template, $target) { |
|
134 | + ->exception(function() use ($template, $target) { |
|
135 | 135 | $template->renderTo($target); |
136 | 136 | })->isInstanceOf(\RuntimeException::class) |
137 | 137 | ->and() |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $this |
191 | 191 | ->given($manager = $this->createManager()) |
192 | 192 | ->then() |
193 | - ->exception(function () use ($manager) { |
|
193 | + ->exception(function() use ($manager) { |
|
194 | 194 | $manager->registerMigration([], Version::fromString('0.2.0')); |
195 | 195 | }) |
196 | 196 | ->isInstanceOf(\RuntimeException::class) |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | ->isNull() |
215 | 215 | ->variable($manager->nextMigrationToExecute()) |
216 | 216 | ->isNull() |
217 | - ->exception(function () use ($manager) { |
|
217 | + ->exception(function() use ($manager) { |
|
218 | 218 | $manager->registerMigrationsFromDirectory(); |
219 | 219 | }) |
220 | 220 | ->isInstanceOf(\RuntimeException::class) |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | ) |
229 | 229 | ) |
230 | 230 | ->then() |
231 | - ->exception(function () use ($manager) { |
|
231 | + ->exception(function() use ($manager) { |
|
232 | 232 | $manager->registerMigrationsFromDirectory(); |
233 | 233 | }) |
234 | 234 | ->isInstanceOf(\UnexpectedValueException::class) |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | ) |
243 | 243 | ) |
244 | 244 | ->then() |
245 | - ->exception(function () use ($manager) { |
|
245 | + ->exception(function() use ($manager) { |
|
246 | 246 | $manager->registerMigrationsFromDirectory(); |
247 | 247 | }) |
248 | 248 | ->isInstanceOf(\RuntimeException::class) |