@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function setInputChannel(\PEIP\INF\Channel\Channel $inputChannel){
|
| 35 | 35 | if(isset($this->eventName)){
|
| 36 | 36 | $this->connectChannel($inputChannel); |
| 37 | - }else{
|
|
| 37 | + } else{
|
|
| 38 | 38 | $this->inputChannel = $inputChannel; |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -116,8 +116,7 @@ |
||
| 116 | 116 | $this->send($content); |
| 117 | 117 | try {
|
| 118 | 118 | $res = $this->receive(); |
| 119 | - } |
|
| 120 | - catch(\Exception $e){
|
|
| 119 | + } catch(\Exception $e){
|
|
| 121 | 120 | return NULL; |
| 122 | 121 | } |
| 123 | 122 | return $res; |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | class_exists($className); |
| 44 | 44 | $res = ReflectionPool::getInstance($className) |
| 45 | 45 | ->implementsInterface($interfaceName); |
| 46 | - } catch (\Exception $e){ |
|
| 46 | + } catch (\Exception $e){ |
|
| 47 | 47 | $res = false; |
| 48 | 48 | } |
| 49 | 49 | return $res;; |
@@ -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; |
@@ -48,11 +48,11 @@ |
||
| 48 | 48 | $message = NULL; |
| 49 | 49 | if($timeout == 0){
|
| 50 | 50 | $message = $this->getMessage(); |
| 51 | - }elseif($timeout < 0){
|
|
| 51 | + } elseif($timeout < 0){
|
|
| 52 | 52 | while(!$message = $this->getMessage()){
|
| 53 | 53 | |
| 54 | 54 | } |
| 55 | - }else{
|
|
| 55 | + } else{
|
|
| 56 | 56 | $time = time() + $timeout; |
| 57 | 57 | while(($time > time()) && !$message = $this->getMessage()){
|
| 58 | 58 | |
@@ -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 | } |
@@ -273,7 +273,7 @@ |
||
| 273 | 273 | $channel = $this->services[trim((string)$channelName)]; |
| 274 | 274 | if($channel instanceof \PEIP\INF\Channel\Channel){
|
| 275 | 275 | return $channel; |
| 276 | - }else{
|
|
| 276 | + } else{
|
|
| 277 | 277 | return NULL; |
| 278 | 278 | } |
| 279 | 279 | } |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | while($iterator->valid()){
|
| 108 | 108 | if($iterator->isDir() && !$iterator->isDot()){
|
| 109 | 109 | $paths = self::findPaths($baseDir, $iterator->getChildren(), $paths); |
| 110 | - }elseif($iterator->isFile() && strrchr($iterator->getFilename(), '.') == '.php'){
|
|
| 110 | + } elseif($iterator->isFile() && strrchr($iterator->getFilename(), '.') == '.php'){
|
|
| 111 | 111 | $class = $iterator->getBasename('.php');
|
| 112 | 112 | $paths[$class] = str_replace($baseDir, '', $iterator->getPathName()); |
| 113 | 113 | } |