Completed
Pull Request — master (#15)
by Alex
08:30
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.
src/Cmp/Queues/Infrastructure/AWS/v20121105/Queue/QueueReader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@
 block discarded – undo
55 55
      *
56 56
      * @throws ReaderException
57 57
      */
58
-    public function read(callable $callback, $timeout=0)
58
+    public function read(callable $callback, $timeout = 0)
59 59
     {
60 60
         $this->initialize();
61 61
         $this->messageHandler->setCallback($callback);
62 62
 
63 63
         try {
64 64
             $this->consume($timeout);
65
-        } catch(\Exception $e) {
65
+        } catch (\Exception $e) {
66 66
             throw new ReaderException("Error occurred while reading", 0, $e);
67 67
         }
68 68
     }
Please login to merge, or discard this patch.