@@ -77,7 +77,7 @@ |
||
| 77 | 77 | // of recording. |
| 78 | 78 | $aggregateRootVersion = $aggregateRootVersion - count($events); |
| 79 | 79 | $metadata = [Header::AGGREGATE_ROOT_ID => $aggregateRootId]; |
| 80 | - $messages = array_map(function (object $event) use ($metadata, &$aggregateRootVersion) { |
|
| 80 | + $messages = array_map(function(object $event) use ($metadata, &$aggregateRootVersion) { |
|
| 81 | 81 | return $this->decorator->decorate(new Message( |
| 82 | 82 | $event, |
| 83 | 83 | $metadata + [Header::AGGREGATE_ROOT_VERSION => ++$aggregateRootVersion] |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | */ |
| 104 | 104 | private function ensureEventsAreMessages(array $events): array |
| 105 | 105 | { |
| 106 | - return array_map(function (object $event) { |
|
| 106 | + return array_map(function(object $event) { |
|
| 107 | 107 | return $event instanceof Message ? $event : new Message($event); |
| 108 | 108 | }, $events); |
| 109 | 109 | } |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public function dispatch(Message ...$messages): void |
| 26 | 26 | { |
| 27 | 27 | $messages = array_map( |
| 28 | - function ($message) { |
|
| 28 | + function($message) { |
|
| 29 | 29 | return $this->decorator->decorate($message); |
| 30 | 30 | }, |
| 31 | 31 | $messages |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | { |
| 60 | 60 | $snapshot = $this->snapshotRepository->retrieve($aggregateRootId); |
| 61 | 61 | |
| 62 | - if (!$snapshot instanceof Snapshot) { |
|
| 62 | + if ( ! $snapshot instanceof Snapshot) { |
|
| 63 | 63 | return $this->retrieve($aggregateRootId); |
| 64 | 64 | } |
| 65 | 65 | |