@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types=1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Tests\EventDispatcher\Helpers; |
4 | 4 |
@@ -20,6 +20,6 @@ |
||
20 | 20 | $name = explode('.', $domainMessage->getType()); |
21 | 21 | |
22 | 22 | $name = preg_replace('/(?!^)[A-Z]{2,}(?=[A-Z][a-z])|[A-Z][a-z]/', ' $0', end($name)); |
23 | - logger()->debug(trim(ucwords($name)) . " ({$domainMessage->getType()})"); |
|
23 | + logger()->debug(trim(ucwords($name))." ({$domainMessage->getType()})"); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $projectionRequest = collect(explode(',', $this->argument('projections'))); |
76 | 76 | |
77 | 77 | $projectionsServiceProviders = $projectionRequest->each( |
78 | - function ($projectionName) { |
|
78 | + function($projectionName) { |
|
79 | 79 | if (!isset($this->config->get('cqrses.projections_service_providers')[$projectionName])) { |
80 | 80 | $this->error("{$projectionName} Does not exist, check cqrses config"); |
81 | 81 | |
@@ -83,26 +83,26 @@ discard block |
||
83 | 83 | } |
84 | 84 | } |
85 | 85 | )->map( |
86 | - function ($projectionName) { |
|
86 | + function($projectionName) { |
|
87 | 87 | return $this->application->make( |
88 | 88 | $this->config->get('cqrses.projections_service_providers')[$projectionName] |
89 | 89 | ); |
90 | 90 | } |
91 | 91 | )->each( |
92 | - function (ProjectionServiceProvider $projectionClass) { |
|
92 | + function(ProjectionServiceProvider $projectionClass) { |
|
93 | 93 | $this->downMigration($projectionClass); |
94 | 94 | } |
95 | 95 | )->each( |
96 | - function (ProjectionServiceProvider $projectionClass) { |
|
96 | + function(ProjectionServiceProvider $projectionClass) { |
|
97 | 97 | $this->upMigration($projectionClass); |
98 | 98 | } |
99 | 99 | ); |
100 | 100 | |
101 | 101 | /** @var Collection|Subscriber[] $projections */ |
102 | 102 | $projections = $projectionsServiceProviders->map( |
103 | - function (ProjectionServiceProvider $projectServiceProvider) { |
|
103 | + function(ProjectionServiceProvider $projectServiceProvider) { |
|
104 | 104 | return collect($projectServiceProvider->getProjections())->map( |
105 | - function ($projection) { |
|
105 | + function($projection) { |
|
106 | 106 | return $this->application->make($projection); |
107 | 107 | } |
108 | 108 | ); |
@@ -110,11 +110,11 @@ discard block |
||
110 | 110 | )->collapse(); |
111 | 111 | |
112 | 112 | $events = $projections->map( |
113 | - function (Subscriber $subscriber) { |
|
113 | + function(Subscriber $subscriber) { |
|
114 | 114 | return array_keys($subscriber->getSubscribedEvents()); |
115 | 115 | } |
116 | 116 | )->collapse()->map( |
117 | - function ($eventClassName) { |
|
117 | + function($eventClassName) { |
|
118 | 118 | return str_replace('\\', '.', $eventClassName); |
119 | 119 | } |
120 | 120 | ); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | protected function replayEvents($projections, $events) |
146 | 146 | { |
147 | 147 | $eventCount = $this->eventStore->getEventCountByTypes($events); |
148 | - $take = (int)$this->config->get('cqrses.rebuild_transaction_size', 1000); |
|
148 | + $take = (int) $this->config->get('cqrses.rebuild_transaction_size', 1000); |
|
149 | 149 | |
150 | 150 | $this->output->progressStart($eventCount); |
151 | 151 | $dispatcher = $this->buildAndRegisterDispatcher($projections); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | $this->output->progressFinish(); |
168 | - $this->line((memory_get_peak_usage(true) / 1024 / 1024) . "mb Peak Usage", false); |
|
168 | + $this->line((memory_get_peak_usage(true) / 1024 / 1024)."mb Peak Usage", false); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | ); |
199 | 199 | |
200 | 200 | $projections->each( |
201 | - function ($projection) use ($dispatcher) { |
|
201 | + function($projection) use ($dispatcher) { |
|
202 | 202 | $dispatcher->addSubscriber($projection); |
203 | 203 | } |
204 | 204 | ); |