@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $res = NULL; |
| 61 | 61 | if(is_callable($this->serviceCallable)){ |
| 62 | 62 | $res = call_user_func($this->serviceCallable, $message->getContent()); |
| 63 | - }else{ |
|
| 63 | + } else{ |
|
| 64 | 64 | if(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){ |
| 65 | 65 | $res = $this->serviceCallable->handle($message->getContent()); |
| 66 | 66 | } |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $this->inputChannel = $inputChannel; |
| 78 | 78 | if($this->inputChannel instanceof \PEIP\INF\Channel\SubscribableChannel){ |
| 79 | 79 | $this->inputChannel->subscribe($this); |
| 80 | - }else{ |
|
| 80 | + } else{ |
|
| 81 | 81 | $this->unwrapEvents = true; |
| 82 | 82 | $this->inputChannel->connect('postSend', $this); |
| 83 | 83 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | foreach($res as $msg){ |
| 56 | 56 | $this->replyMessage($msg); |
| 57 | 57 | } |
| 58 | - }else{ |
|
| 58 | + } else{ |
|
| 59 | 59 | $this->replyMessage($res); |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | protected static function doNotifyOne($listener, $subject){ |
| 43 | 43 | if(is_callable($listener)){ |
| 44 | 44 | $res = call_user_func($listener, $subject); |
| 45 | - }else{ |
|
| 45 | + } else{ |
|
| 46 | 46 | $res = $listener->handle($subject); |
| 47 | 47 | } |
| 48 | 48 | return $res; |
@@ -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 | } |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | protected function doSend(\PEIP\INF\Message\Message $message){ |
| 80 | 80 | if($this->capacity < 1 || $this->getMessageCount() <= $this->getCapacity()){ |
| 81 | 81 | $this->queue->enqueque($message); |
| 82 | - }else{ |
|
| 82 | + } else{ |
|
| 83 | 83 | throw new \Exception('Not implemented yet.'); |
| 84 | 84 | } |
| 85 | 85 | } |
@@ -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 | |
@@ -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 | } |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | //if(\PEIP\Util\Test::assertMessage($message)){ |
| 109 | 109 | if($this->getOutputChannel()){ |
| 110 | 110 | $this->getOutputChannel()->send($message); |
| 111 | - }else{ |
|
| 111 | + } else{ |
|
| 112 | 112 | $this->doSend($message); |
| 113 | 113 | } |
| 114 | 114 | //} |