@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function getByStream(StreamName $streamName, ?int $fromSequence = 0) : array |
| 22 | 22 | { |
| 23 | - return array_filter($this->events, static function (EventInterface $event) use ( |
|
| 23 | + return array_filter($this->events, static function(EventInterface $event) use ( |
|
| 24 | 24 | $streamName, |
| 25 | 25 | $fromSequence |
| 26 | 26 | ) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | public function find(EventMatcherInterface $eventMatcher) : array |
| 42 | 42 | { |
| 43 | - return array_filter($this->events, static function (EventInterface $event) use ($eventMatcher) { |
|
| 43 | + return array_filter($this->events, static function(EventInterface $event) use ($eventMatcher) { |
|
| 44 | 44 | $aggregateId = $eventMatcher->getAggregateId(); |
| 45 | 45 | $aggregateClass = $eventMatcher->getAggregateClass(); |
| 46 | 46 | $fromSequence = $eventMatcher->getSequence(); |
@@ -48,19 +48,19 @@ discard block |
||
| 48 | 48 | $timestamp = $eventMatcher->getTimestamp(); |
| 49 | 49 | |
| 50 | 50 | $condition = true; |
| 51 | - if (! empty($aggregateId)) { |
|
| 51 | + if (!empty($aggregateId)) { |
|
| 52 | 52 | $condition = $condition && ($event->getAggregateId() === $aggregateId); |
| 53 | 53 | } |
| 54 | - if (! empty($aggregateClass)) { |
|
| 54 | + if (!empty($aggregateClass)) { |
|
| 55 | 55 | $condition = $condition && ($event->getAggregateClass() === (string) $aggregateClass); |
| 56 | 56 | } |
| 57 | - if (! empty($fromSequence)) { |
|
| 57 | + if (!empty($fromSequence)) { |
|
| 58 | 58 | $condition = $condition && ($event->getSequence() > $fromSequence); |
| 59 | 59 | } |
| 60 | - if (! empty($streamName)) { |
|
| 60 | + if (!empty($streamName)) { |
|
| 61 | 61 | $condition = $condition && ($event->getStreamName() === (string) $streamName); |
| 62 | 62 | } |
| 63 | - if (! empty($timestamp)) { |
|
| 63 | + if (!empty($timestamp)) { |
|
| 64 | 64 | $condition = $condition && ($event->getTimestamp() > $timestamp); |
| 65 | 65 | } |
| 66 | 66 | return $condition; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | if (empty($beforeEnqueue)) { |
| 49 | - $beforeEnqueue = static function (EventInterface $event) : void {}; // phpcs:ignore |
|
| 49 | + $beforeEnqueue = static function(EventInterface $event) : void {}; // phpcs:ignore |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | $this->queue = new SplQueue(); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | call_user_func($this->beforeEnqueue, $event); |
| 82 | 82 | self::$eventAccessor->setStreamName($event, (string) $this->streamName); |
| 83 | 83 | |
| 84 | - if (! isset($this->lastEnqueuedSequenceNumber)) { |
|
| 84 | + if (!isset($this->lastEnqueuedSequenceNumber)) { |
|
| 85 | 85 | $this->lastEnqueuedSequenceNumber = $event->getSequence(); |
| 86 | 86 | } |
| 87 | 87 | |