@@ -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 | } |
@@ -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 |
@@ -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 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace SmoothPhp\LaravelAdapter\CommandBus; |
4 | 4 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace SmoothPhp\LaravelAdapter\CommandBus; |
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 SmoothPhp\LaravelAdapter\EventStore; |
4 | 4 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function append($id, DomainEventStream $eventStream) : void |
83 | 83 | { |
84 | - $id = (string)$id; //Used to thrown errors if ID will not cast to string |
|
84 | + $id = (string) $id; //Used to thrown errors if ID will not cast to string |
|
85 | 85 | |
86 | 86 | $this->db->reconnect(); |
87 | 87 | $this->db->beginTransaction(); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | try { |
111 | 111 | $this->db->table($this->eventStoreTableName)->insert($eventRow); |
112 | 112 | } catch (\PDOException $ex) { |
113 | - if ((string)$ex->getCode() === '23000') { |
|
113 | + if ((string) $ex->getCode() === '23000') { |
|
114 | 114 | throw new DuplicateAggregatePlayhead($eventRow['uuid'], $eventRow['playhead'], $ex); |
115 | 115 | } |
116 | 116 | throw $ex; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | private function domainMessageToArray(DomainMessage $domainMessage) : array |
177 | 177 | { |
178 | 178 | return [ |
179 | - 'uuid' => (string)$domainMessage->getId(), |
|
179 | + 'uuid' => (string) $domainMessage->getId(), |
|
180 | 180 | 'playhead' => $domainMessage->getPlayHead(), |
181 | 181 | 'metadata' => json_encode($this->serializer->serialize($domainMessage->getMetadata())), |
182 | 182 | '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 | |
4 | 4 | namespace SmoothPhp\LaravelAdapter\QueuedEventDispatcher; |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | |
4 | 4 | namespace SmoothPhp\LaravelAdapter\QueuedEventDispatcher; |