@@ -44,14 +44,14 @@ discard block |
||
44 | 44 | |
45 | 45 | public function start(callable $callback) |
46 | 46 | { |
47 | - while(true) { |
|
47 | + while (true) { |
|
48 | 48 | $this->processOne($callback); |
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
52 | 52 | public function processOne(callable $callback) |
53 | 53 | { |
54 | - if(!isset($this->subscriptors[0])) { |
|
54 | + if (!isset($this->subscriptors[0])) { |
|
55 | 55 | throw new DomainEventException('You must add at least 1 EventSubscriptor in order to publish start reading from queue.'); |
56 | 56 | } |
57 | 57 | $this->queueReader->read($callback); |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | public function notify(DomainEvent $domainEvent) |
64 | 64 | { |
65 | 65 | $this->logger->info('Domain Event received, notifying subscribers'); |
66 | - foreach($this->subscriptors as $subscriptor) { |
|
67 | - if($subscriptor->isSubscribed($domainEvent)) { |
|
66 | + foreach ($this->subscriptors as $subscriptor) { |
|
67 | + if ($subscriptor->isSubscribed($domainEvent)) { |
|
68 | 68 | $subscriptor->notify($domainEvent); |
69 | 69 | } |
70 | 70 | } |