@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace LIN3S\SharedKernel\Infrastructure\Persistence\Sql\Event; |
| 15 | 15 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | return new Stream($name, $domainEventsCollection); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - public function eventsSince(?\DateTimeInterface $since, int $offset = 0, int $limit = -1): array |
|
| 71 | + public function eventsSince(?\DateTimeInterface $since, int $offset = 0, int $limit = -1) : array |
|
| 72 | 72 | { |
| 73 | 73 | $since = null === $since ? 0 : $since->getTimestamp(); |
| 74 | 74 | $tableName = self::TABLE_NAME; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $storedEvent = new StoredEvent( |
| 95 | 95 | $this->buildDomainEvent($storedEventRow), |
| 96 | 96 | StreamName::fromName($storedEventRow['stream_name']), |
| 97 | - new StreamVersion((int)$storedEventRow['stream_version']) |
|
| 97 | + new StreamVersion((int) $storedEventRow['stream_version']) |
|
| 98 | 98 | ); |
| 99 | 99 | $orderProperty = new \ReflectionProperty(StoredEvent::class, 'order'); |
| 100 | 100 | $orderProperty->setAccessible(true); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if ('occurredOn' === $property->getName()) { |
| 120 | 120 | $occurredOn = new \DateTimeImmutable(); |
| 121 | - $occurredOn->setTimestamp((int)$storedEventRow['occurred_on']); |
|
| 121 | + $occurredOn->setTimestamp((int) $storedEventRow['occurred_on']); |
|
| 122 | 122 | $property->setValue($domainEvent, $occurredOn); |
| 123 | 123 | continue; |
| 124 | 124 | } |
@@ -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 |