@@ -60,11 +60,11 @@ |
||
60 | 60 | $message = NULL; |
61 | 61 | if ($timeout == 0) { |
62 | 62 | $message = $this->getMessage(); |
63 | - }elseif ($timeout < 0) { |
|
63 | + } elseif ($timeout < 0) { |
|
64 | 64 | while (!$message = $this->getMessage()) { |
65 | 65 | |
66 | 66 | } |
67 | - }else { |
|
67 | + } else { |
|
68 | 68 | $time = time() + $timeout; |
69 | 69 | while (($time > time()) && !$message = $this->getMessage()) { |
70 | 70 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | protected function getMessage($object) { |
18 | 18 | if ($this->channel instanceof \PEIP\INF\Channel\SubscribableChannel) { |
19 | 19 | return $object; |
20 | - }else { |
|
20 | + } else { |
|
21 | 21 | return $object->getContent()->receive(); |
22 | 22 | } |
23 | 23 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | protected function doSend(\PEIP\INF\Message\Message $message) { |
55 | 55 | if ($this->capacity < 1 || $this->getMessageCount() <= $this->getCapacity()) { |
56 | 56 | $this->queue->insert($message, $message->getHeader($this->priorityHeader)); |
57 | - }else { |
|
57 | + } else { |
|
58 | 58 | throw new \Exception('Not implemented yet.'); |
59 | 59 | } |
60 | 60 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * @param $observer |
54 | 54 | * @return |
55 | 55 | */ |
56 | - public function addObserver(\PEIP\INF\Event\Observer $observer){ |
|
56 | + public function addObserver(\PEIP\INF\Event\Observer $observer) { |
|
57 | 57 | $this->observers[] = $observer; |
58 | 58 | } |
59 | 59 |
@@ -114,8 +114,7 @@ |
||
114 | 114 | $this->send($content); |
115 | 115 | try { |
116 | 116 | $res = $this->receive(); |
117 | - } |
|
118 | - catch (\Exception $e) { |
|
117 | + } catch (\Exception $e) { |
|
119 | 118 | return NULL; |
120 | 119 | } |
121 | 120 | return $res; |