@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ORDER BY `order` ASC |
| 80 | 80 | LIMIT $limit |
| 81 | 81 | OFFSET $offset |
| 82 | -SQL; |
|
| 82 | +sql; |
|
| 83 | 83 | |
| 84 | 84 | $storedEventRows = $this->pdo->query($sql, ['occurredOn' => $since]); |
| 85 | 85 | $storedEvents = $this->buildStoredEvents($storedEventRows); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | `stream_version` INT NOT NULL, |
| 165 | 165 | PRIMARY KEY (`order`) |
| 166 | 166 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 167 | -SQL; |
|
| 167 | +sql; |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | public static function removeSchema() : string |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | return; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - $this->pdo->insert(self::TABLE_NAME, array_map(function (StoredEvent $event) { |
|
| 44 | + $this->pdo->insert(self::TABLE_NAME, array_map(function(StoredEvent $event) { |
|
| 45 | 45 | return $event->normalizeToAppend(); |
| 46 | 46 | }, $events)); |
| 47 | 47 | } |
@@ -65,6 +65,9 @@ |
||
| 65 | 65 | return (string) $this->phone(); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @param null|string $region |
|
| 70 | + */ |
|
| 68 | 71 | private function setPhone($phone, ?string $region) : void |
| 69 | 72 | { |
| 70 | 73 | try { |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | ); |
| 41 | 41 | $publishableEvents = $collectDomainEventsSubscriber->events(); |
| 42 | 42 | |
| 43 | - $domainEvents = array_map(function (PublishableDomainEvent $publishableDomainEvent) { |
|
| 43 | + $domainEvents = array_map(function(PublishableDomainEvent $publishableDomainEvent) { |
|
| 44 | 44 | return $publishableDomainEvent->event(); |
| 45 | 45 | }, $publishableEvents); |
| 46 | 46 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | public function execute($command, callable $next) |
| 32 | 32 | { |
| 33 | - $nextOperation = function () use ($next, $command) { |
|
| 33 | + $nextOperation = function() use ($next, $command) { |
|
| 34 | 34 | return $next($command); |
| 35 | 35 | }; |
| 36 | 36 | |
@@ -57,6 +57,6 @@ |
||
| 57 | 57 | |
| 58 | 58 | private function streamVersion() : StreamVersion |
| 59 | 59 | { |
| 60 | - return new StreamVersion(1); // TODO: This value is hardcoded for now. |
|
| 60 | + return new StreamVersion(1); // TODO: This value is hardcoded for now. |
|
| 61 | 61 | } |
| 62 | 62 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | |
| 93 | 93 | $this->pdo->commit(); |
| 94 | 94 | |
| 95 | - return $return ?: true; |
|
| 95 | + return $return ? : true; |
|
| 96 | 96 | } catch (\Exception | \Throwable $exception) { |
| 97 | 97 | $this->pdo->rollback(); |
| 98 | 98 | |