@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $projectionRequest = collect(explode(',', $this->argument('projections'))); |
77 | 77 | |
78 | 78 | $projectionsServiceProviders = $projectionRequest->each( |
79 | - function ($projectionName) { |
|
79 | + function($projectionName) { |
|
80 | 80 | if (!isset($this->config->get('cqrses.projections_service_providers')[$projectionName])) { |
81 | 81 | $this->error("{$projectionName} Does not exist, check cqrses config"); |
82 | 82 | |
@@ -84,26 +84,26 @@ discard block |
||
84 | 84 | } |
85 | 85 | } |
86 | 86 | )->map( |
87 | - function ($projectionName) { |
|
87 | + function($projectionName) { |
|
88 | 88 | return $this->application->make( |
89 | 89 | $this->config->get('cqrses.projections_service_providers')[$projectionName] |
90 | 90 | ); |
91 | 91 | } |
92 | 92 | )->each( |
93 | - function (ProjectionServiceProvider $projectionClass) { |
|
93 | + function(ProjectionServiceProvider $projectionClass) { |
|
94 | 94 | $this->downMigration($projectionClass); |
95 | 95 | } |
96 | 96 | )->each( |
97 | - function (ProjectionServiceProvider $projectionClass) { |
|
97 | + function(ProjectionServiceProvider $projectionClass) { |
|
98 | 98 | $this->upMigration($projectionClass); |
99 | 99 | } |
100 | 100 | ); |
101 | 101 | |
102 | 102 | /** @var Collection|Subscriber[] $projections */ |
103 | 103 | $projections = $projectionsServiceProviders->map( |
104 | - function (ProjectionServiceProvider $projectServiceProvider) { |
|
104 | + function(ProjectionServiceProvider $projectServiceProvider) { |
|
105 | 105 | return collect($projectServiceProvider->getProjections())->map( |
106 | - function ($projection) { |
|
106 | + function($projection) { |
|
107 | 107 | return $this->application->make($projection); |
108 | 108 | } |
109 | 109 | ); |
@@ -111,11 +111,11 @@ discard block |
||
111 | 111 | )->collapse(); |
112 | 112 | |
113 | 113 | $events = $projections->map( |
114 | - function (Subscriber $subscriber) { |
|
114 | + function(Subscriber $subscriber) { |
|
115 | 115 | return array_keys($subscriber->getSubscribedEvents()); |
116 | 116 | } |
117 | 117 | )->collapse()->map( |
118 | - function ($eventClassName) { |
|
118 | + function($eventClassName) { |
|
119 | 119 | return str_replace('\\', '.', $eventClassName); |
120 | 120 | } |
121 | 121 | ); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | public function downMigration(ProjectionServiceProvider $projectionServiceProvider) |
130 | 130 | { |
131 | 131 | $response = $projectionServiceProvider->down(); |
132 | - $this->line($response ?? 'Migrated Down: ' . get_class($projectionServiceProvider)); |
|
132 | + $this->line($response ?? 'Migrated Down: '.get_class($projectionServiceProvider)); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function upMigration(ProjectionServiceProvider $projectionServiceProvider) |
139 | 139 | { |
140 | 140 | $response = $projectionServiceProvider->up(); |
141 | - $this->line($response ?? 'Migrated Up: ' . get_class($projectionServiceProvider)); |
|
141 | + $this->line($response ?? 'Migrated Up: '.get_class($projectionServiceProvider)); |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | protected function replayEvents($projections, $events) |
151 | 151 | { |
152 | 152 | $eventCount = $this->eventStore->getEventCountByTypes($events); |
153 | - $take = (int)$this->config->get('cqrses.rebuild_transaction_size', 1000); |
|
153 | + $take = (int) $this->config->get('cqrses.rebuild_transaction_size', 1000); |
|
154 | 154 | |
155 | 155 | $this->output->progressStart($eventCount); |
156 | 156 | $dispatcher = $this->buildAndRegisterDispatcher($projections); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } |
171 | 171 | |
172 | 172 | $this->output->progressFinish(); |
173 | - $this->line((memory_get_peak_usage(true) / 1024 / 1024) . "mb Peak Usage", false); |
|
173 | + $this->line((memory_get_peak_usage(true) / 1024 / 1024)."mb Peak Usage", false); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | /** |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | ); |
204 | 204 | |
205 | 205 | $projections->each( |
206 | - function ($projection) use ($dispatcher) { |
|
206 | + function($projection) use ($dispatcher) { |
|
207 | 207 | $dispatcher->addSubscriber($projection); |
208 | 208 | } |
209 | 209 | ); |