Passed
Push — master ( 927e42...56a221 )
by Blixit
02:05
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/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.
src/Store/Matcher/Matcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function addSearchField(FilterObject $filterObject) : void
52 52
     {
53
-        if (! in_array($filterObject->getField(), $this->allowedFields)) {
53
+        if (!in_array($filterObject->getField(), $this->allowedFields)) {
54 54
             throw new MatcherException(
55 55
                 sprintf(
56 56
                     'Field "%s" is not allowed. Allowed: %s',
Please login to merge, or discard this patch.
src/Store/InMemory/InMemoryEventPersister.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
         ) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $streamName     = $eventMatcher->getStreamName();
47 47
         $timestamp      = $eventMatcher->getTimestamp();
48 48
 
49
-        return array_filter($this->events, static function (EventInterface $event) use (
49
+        return array_filter($this->events, static function(EventInterface $event) use (
50 50
             $aggregateId,
51 51
             $aggregateClass,
52 52
             $fromSequence,
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
             $timestamp
55 55
         ) {
56 56
             $condition = true;
57
-            if (! empty($aggregateId)) {
57
+            if (!empty($aggregateId)) {
58 58
                 $condition = $condition && ($event->getAggregateId() === (string) $aggregateId);
59 59
             }
60
-            if (! empty($aggregateClass)) {
60
+            if (!empty($aggregateClass)) {
61 61
                 $condition = $condition && ($event->getAggregateClass() === (string) $aggregateClass);
62 62
             }
63
-            if (! empty($fromSequence)) {
63
+            if (!empty($fromSequence)) {
64 64
                 $condition = $condition && ($event->getSequence() > $fromSequence);
65 65
             }
66
-            if (! empty($streamName)) {
66
+            if (!empty($streamName)) {
67 67
                 $condition = $condition && ($event->getStreamName() === (string) $streamName);
68 68
             }
69
-            if (! empty($timestamp)) {
69
+            if (!empty($timestamp)) {
70 70
                 $condition = $condition && ($event->getStreamName() > $timestamp);
71 71
             }
72 72
             return $condition;
Please login to merge, or discard this patch.