Passed
Push — master ( 63efc4...ad3f5d )
by Blixit
01:59
created
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
         ) {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Stream/Stream.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.