Passed
Push — master ( 3112ca...a45803 )
by Blixit
02:01
created
src/Stream/Stream.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $this->queue = new SplQueue();
45 45
 
46 46
         if (empty($beforeEnqueue)) {
47
-            $beforeEnqueue = static function (EventInterface $event) : void {}; // phpcs:ignore
47
+            $beforeEnqueue = static function(EventInterface $event) : void {}; // phpcs:ignore
48 48
         }
49 49
 
50 50
         foreach ($events as $event) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function enqueue(EventInterface $event) : void
78 78
     {
79
-        if (! isset($this->lastEnqueuedSequenceNumber)) {
79
+        if (!isset($this->lastEnqueuedSequenceNumber)) {
80 80
             $this->lastEnqueuedSequenceNumber = $event->getSequence();
81 81
         }
82 82
 
Please login to merge, or discard this patch.
src/Utils/Accessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     protected function readProperty($object, string $property)
27 27
     {
28
-        return (function ($property) {
28
+        return (function($property) {
29 29
             return $this->$property;
30 30
         })->bindTo($object)->call($object, $property);
31 31
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected function writeProperty(&$object, string $property, $value) : void
38 38
     {
39
-        (function ($property, $value) : void {
39
+        (function($property, $value) : void {
40 40
             $this->$property = $value;
41 41
         })->bindTo($object)->call($object, $property, $value);
42 42
     }
Please login to merge, or discard this patch.
src/Store/EventStore.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $stream = new ReadableStream(
88 88
             $streamName,
89 89
             $events,
90
-            static function (EventInterface $event) use ($beforeRead, $aggregate) : void {
90
+            static function(EventInterface $event) use ($beforeRead, $aggregate) : void {
91 91
                 $beforeRead($aggregate, $event);
92 92
             }
93 93
         );
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $stream = new StorableStream(
144 144
             $streamName,
145 145
             $aggregateRoot->getRecordedEvents(),
146
-            static function (EventInterface $event) use ($beforeWrite, $aggregateRoot) : void {
146
+            static function(EventInterface $event) use ($beforeWrite, $aggregateRoot) : void {
147 147
                 $beforeWrite($aggregateRoot, $event);
148 148
             }
149 149
         );
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
                 $event->getAggregateId()
208 208
             ));
209 209
         }
210
-        if (! empty($event->getSequence())) {
210
+        if (!empty($event->getSequence())) {
211 211
             throw new NonWritableEvent('Sequence number should be empty. Found: ' . $event->getSequence());
212 212
         }
213
-        if (! empty($event->getStreamName())) {
213
+        if (!empty($event->getStreamName())) {
214 214
             throw new NonWritableEvent('Stream name should be empty. Found: ' . $event->getStreamName());
215 215
         }
216 216
     }
Please login to merge, or discard this patch.
src/Store/InMemory/InMemoryEventPersister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function getByStream(StreamName $streamName, ?int $fromSequence = 0) : array
21 21
     {
22
-        return array_filter($this->events, static function (EventInterface $event) use (
22
+        return array_filter($this->events, static function(EventInterface $event) use (
23 23
             $streamName,
24 24
             $fromSequence
25 25
         ) {
Please login to merge, or discard this patch.
src/Aggregate/AggregateAccessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         /** @var AggregateRoot $aggregateRoot */
32 32
         $events = $aggregateRoot->getRecordedEvents();
33 33
         $event  = array_shift($events);
34
-        if (! empty($event)) {
34
+        if (!empty($event)) {
35 35
             $this->writeProperty($aggregateRoot, 'recordedEvents', $events);
36 36
         }
37 37
         return $event;
Please login to merge, or discard this patch.
src/Messaging/MessagingMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public function handle(MessageInterface $message) : void
28 28
     {
29 29
         $class = get_class($message);
30
-        if (! $this->supports($class)) {
30
+        if (!$this->supports($class)) {
31 31
             return;
32 32
         }
33 33
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
                 $locatedHandler($message);
40 40
                 continue;
41 41
             }
42
-            if (! is_array($locatedHandler)) {
42
+            if (!is_array($locatedHandler)) {
43 43
                 continue;
44 44
             }
45 45
             foreach ($locatedHandler as $handler) {
46
-                if (! is_callable($handler)) {
46
+                if (!is_callable($handler)) {
47 47
                     continue;
48 48
                 }
49 49
                 $handler($message);
Please login to merge, or discard this patch.