@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function fire($job, $data) |
37 | 37 | { |
38 | - $payload = (json_decode($data['payload'],true)); |
|
38 | + $payload = (json_decode($data['payload'], true)); |
|
39 | 39 | |
40 | 40 | $event = call_user_func([ |
41 | 41 | str_replace('.', '\\', $data['type']), |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function register() |
39 | 39 | { |
40 | 40 | |
41 | - $configPath = __DIR__ . '/../config/cqrses.php'; |
|
41 | + $configPath = __DIR__.'/../config/cqrses.php'; |
|
42 | 42 | $this->mergeConfigFrom($configPath, 'cqrses'); |
43 | 43 | |
44 | 44 | $app = $this->app; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function boot() |
68 | 68 | { |
69 | - $configPath = __DIR__ . '/../config/cqrses.php'; |
|
69 | + $configPath = __DIR__.'/../config/cqrses.php'; |
|
70 | 70 | $this->publishes([$configPath => $this->getConfigPath()], 'config'); |
71 | 71 | |
72 | 72 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | $this->app->singleton( |
114 | 114 | CommandBus::class, |
115 | - function () use ($middlewareChain) { |
|
115 | + function() use ($middlewareChain) { |
|
116 | 116 | return new \SmoothPhp\CommandBus\CommandBus($middlewareChain); |
117 | 117 | } |
118 | 118 | ); |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | if ($app['config']->get('cqrses.laravel_eventstore_enabled')) { |
136 | 136 | $app->bind( |
137 | 137 | EventStore::class, |
138 | - function (Application $application) { |
|
138 | + function(Application $application) { |
|
139 | 139 | return new LaravelEventStore( |
140 | 140 | $application->make(DatabaseManager::class), |
141 | 141 | $application->make(Serializer::class), |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | { |
155 | 155 | $app->singleton( |
156 | 156 | EventBus::class, |
157 | - function (Application $application) { |
|
157 | + function(Application $application) { |
|
158 | 158 | $eventBus = $application->make($application['config']->get('cqrses.event_bus')); |
159 | 159 | |
160 | 160 | foreach ($application['config']->get('cqrses.event_bus_listeners') as $listener) { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | { |
174 | 174 | $app->singleton( |
175 | 175 | EventDispatcher::class, |
176 | - function (Application $application) { |
|
176 | + function(Application $application) { |
|
177 | 177 | /** @var EventDispatcher $dispatcher */ |
178 | 178 | $dispatcher = $application->make($application['config']->get('cqrses.event_dispatcher')); |
179 | 179 | |
@@ -193,13 +193,13 @@ discard block |
||
193 | 193 | protected function getProjectionEventSubscribers(Application $app) |
194 | 194 | { |
195 | 195 | return collect($app['config']->get('cqrses.projections_service_providers'))->map( |
196 | - function ($projectionsServiceProvider) use ($app) { |
|
196 | + function($projectionsServiceProvider) use ($app) { |
|
197 | 197 | return $app->make($projectionsServiceProvider); |
198 | 198 | } |
199 | 199 | )->map( |
200 | - function (ProjectionServiceProvider $projectServiceProvider) use ($app) { |
|
200 | + function(ProjectionServiceProvider $projectServiceProvider) use ($app) { |
|
201 | 201 | return collect($projectServiceProvider->getProjections())->map( |
202 | - function ($projection) use ($app) { |
|
202 | + function($projection) use ($app) { |
|
203 | 203 | return $app->make($projection); |
204 | 204 | } |
205 | 205 | ); |
@@ -54,11 +54,11 @@ |
||
54 | 54 | $this->queue->push( |
55 | 55 | QueueToEventDispatcherWithCommandId::class, |
56 | 56 | [ |
57 | - 'uuid' => (string)$domainMessage->getId(), |
|
57 | + 'uuid' => (string) $domainMessage->getId(), |
|
58 | 58 | 'playhead' => $domainMessage->getPlayHead(), |
59 | 59 | 'metadata' => json_encode($this->serializer->serialize($domainMessage->getMetadata())), |
60 | 60 | 'payload' => json_encode($this->serializer->serialize($domainMessage->getPayload())), |
61 | - 'recorded_on' => (string)$domainMessage->getRecordedOn(), |
|
61 | + 'recorded_on' => (string) $domainMessage->getRecordedOn(), |
|
62 | 62 | 'type' => $domainMessage->getType(), |
63 | 63 | 'command_id' => $this->notificationsCommandBus->getLastCommandId(), |
64 | 64 | ], |
@@ -22,7 +22,7 @@ |
||
22 | 22 | */ |
23 | 23 | public function execute(Command $command, callable $next) |
24 | 24 | { |
25 | - $this->lastCommandId = (string)$command; |
|
25 | + $this->lastCommandId = (string) $command; |
|
26 | 26 | $next($command); |
27 | 27 | } |
28 | 28 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | $limit = time() + $timeout; |
19 | 19 | foreach ($commands as $command) { |
20 | - while (!Cache::has((string)$command)) { |
|
20 | + while (!Cache::has((string) $command)) { |
|
21 | 21 | usleep(1000); |
22 | 22 | |
23 | 23 | if (time() > $limit) { |
@@ -34,6 +34,6 @@ discard block |
||
34 | 34 | */ |
35 | 35 | function uuid() |
36 | 36 | { |
37 | - return (string)\Ramsey\Uuid\Uuid::uuid4(); |
|
37 | + return (string) \Ramsey\Uuid\Uuid::uuid4(); |
|
38 | 38 | } |
39 | 39 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $this->queue->push( |
45 | 45 | QueueToEventDispatcher::class, |
46 | 46 | [ |
47 | - 'uuid' => (string)$domainMessage->getId(), |
|
47 | + 'uuid' => (string) $domainMessage->getId(), |
|
48 | 48 | 'playhead' => $domainMessage->getPlayHead(), |
49 | 49 | 'metadata' => json_encode($this->serializer->serialize($domainMessage->getMetadata())), |
50 | 50 | 'payload' => json_encode($this->serializer->serialize($domainMessage->getPayload())), |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare (strict_types=1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Tests\EventDispatcher; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare (strict_types=1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Tests\EventDispatcher\Helpers; |
4 | 4 | |
@@ -28,6 +28,6 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function getSubscribedEvents() |
30 | 30 | { |
31 | - return [TestEvent::class => ['whenTestEvent'],]; |
|
31 | + return [TestEvent::class => ['whenTestEvent'], ]; |
|
32 | 32 | } |
33 | 33 | } |
@@ -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 |