Completed
Push — master ( 60c2d2...e01996 )
by Bartek
14s
created
src/Cmp/Queues/Domain/Event/Subscriber.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
         return $this;
44 44
     }
45 45
 
46
-    public function start($timeout=0)
46
+    public function start($timeout = 0)
47 47
     {
48
-        if(!isset($this->subscriptors[0])) {
48
+        if (!isset($this->subscriptors[0])) {
49 49
             throw new DomainEventException('You must add at least 1 EventSubscriptor in order to publish start reading from queue.');
50 50
         }
51 51
 
52
-        while(true) {
52
+        while (true) {
53 53
             try {
54 54
                 $this->queueReader->read(array($this, 'notify'), $timeout);
55
-            } catch(TimeoutReaderException $e) {
55
+            } catch (TimeoutReaderException $e) {
56 56
                 break;
57 57
             }
58 58
         }
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     public function notify(DomainEvent $domainEvent)
65 65
     {
66 66
         $this->logger->debug('Domain Event received, notifying subscribers');
67
-        foreach($this->subscriptors as $subscriptor) {
68
-            if($subscriptor->isSubscribed($domainEvent)) {
67
+        foreach ($this->subscriptors as $subscriptor) {
68
+            if ($subscriptor->isSubscribed($domainEvent)) {
69 69
                 $subscriptor->notify($domainEvent);
70 70
             }
71 71
         }
Please login to merge, or discard this patch.