@@ -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', |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | ->and($post->clearEvents()) |
69 | 69 | ->when($repository->persist($post)) |
70 | 70 | ->then() |
71 | - ->exception(function () use ($repository, $post) { |
|
71 | + ->exception(function() use ($repository, $post) { |
|
72 | 72 | $repository->get($post->id()); |
73 | 73 | }) |
74 | 74 | ->isInstanceOf(\RuntimeException::class) |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ) |
85 | 85 | ) |
86 | 86 | ->then() |
87 | - ->exception(function () use ($repository, $post) { |
|
87 | + ->exception(function() use ($repository, $post) { |
|
88 | 88 | $repository->persist($post); |
89 | 89 | }) |
90 | 90 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | ->and() |
163 | 163 | ->when($repository->remove($post)) |
164 | 164 | ->then() |
165 | - ->exception(function () use ($repository, $post) { |
|
165 | + ->exception(function() use ($repository, $post) { |
|
166 | 166 | $repository->get($post->id()); |
167 | 167 | })->isInstanceOf(\RuntimeException::class) |
168 | 168 | ; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | ) |
178 | 178 | ) |
179 | 179 | ->then() |
180 | - ->exception(function () use ($repository, $post) { |
|
180 | + ->exception(function() use ($repository, $post) { |
|
181 | 181 | $repository->remove($post); |
182 | 182 | }) |
183 | 183 | ->isInstanceOf(\InvalidArgumentException::class) |
@@ -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() |