@@ -115,8 +115,7 @@ |
||
| 115 | 115 | $this->send($content); |
| 116 | 116 | try { |
| 117 | 117 | $res = $this->receive(); |
| 118 | - } |
|
| 119 | - catch(\Exception $e){ |
|
| 118 | + } catch(\Exception $e){ |
|
| 120 | 119 | return NULL; |
| 121 | 120 | } |
| 122 | 121 | return $res; |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | if($this->hasService($key)){ |
| 120 | 120 | $service = $this->getService($key); |
| 121 | - }else{ |
|
| 121 | + } else{ |
|
| 122 | 122 | $service = $this->createService($key); |
| 123 | 123 | } |
| 124 | 124 | |
@@ -150,11 +150,11 @@ discard block |
||
| 150 | 150 | )); |
| 151 | 151 | |
| 152 | 152 | return $node; |
| 153 | - }else{ |
|
| 153 | + } else{ |
|
| 154 | 154 | $errorMessage = 'COULD NOT BUILD NODE FOR KEY: '.$key; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - }else{ |
|
| 157 | + } else{ |
|
| 158 | 158 | $errorMessage = 'NO CONFIG FOR KEY: '.$key; |
| 159 | 159 | } |
| 160 | 160 | $this->doFireEvent(self::EVENT_CREATE_SERVICE_ERROR, array( |
@@ -198,10 +198,10 @@ discard block |
||
| 198 | 198 | self::HEADER_NODE => $nodeInstance |
| 199 | 199 | )); |
| 200 | 200 | return $nodeInstance; |
| 201 | - }else{ |
|
| 201 | + } else{ |
|
| 202 | 202 | $errorMessage = 'BUILDER RETURNED NO OBJECT FOR NODE-TYPE: '.$nodeName; |
| 203 | 203 | } |
| 204 | - }else{ |
|
| 204 | + } else{ |
|
| 205 | 205 | $errorMessage = 'NO BUILDER FOUND FOR NODE-TYPE: '.$nodeName; |
| 206 | 206 | } |
| 207 | 207 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public function callService(\PEIP\INF\Message\Message $message){ |
| 37 | 37 | if(is_callable($this->serviceCallable)){ |
| 38 | 38 | $res = call_user_func_array($this->serviceCallable, $message->getContent()); |
| 39 | - }elseif(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){ |
|
| 39 | + } elseif(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){ |
|
| 40 | 40 | $res = call_user_func_array(array($this->serviceCallable, 'handle'), $message->getContent()); |
| 41 | 41 | } |
| 42 | 42 | return $res; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $res = NULL; |
| 43 | 43 | if(is_callable($this->serviceCallable)){ |
| 44 | 44 | $res = call_user_func($this->serviceCallable, $message->getHeader($this->headerName)); |
| 45 | - }else{ |
|
| 45 | + } else{ |
|
| 46 | 46 | if(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){ |
| 47 | 47 | $res = $this->serviceCallable->handle($message->getHeader($this->headerName)); |
| 48 | 48 | } |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | ), |
| 36 | 36 | $object->getContent() |
| 37 | 37 | ); |
| 38 | - }else{ |
|
| 38 | + } else{ |
|
| 39 | 39 | throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject'); |
| 40 | 40 | } |
| 41 | - }else{ |
|
| 41 | + } else{ |
|
| 42 | 42 | throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event'); |
| 43 | 43 | } |
| 44 | 44 | } //put your code here |
@@ -69,10 +69,10 @@ |
||
| 69 | 69 | ), |
| 70 | 70 | $object |
| 71 | 71 | ); |
| 72 | - }else{ |
|
| 72 | + } else{ |
|
| 73 | 73 | throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject'); |
| 74 | 74 | } |
| 75 | - }else{ |
|
| 75 | + } else{ |
|
| 76 | 76 | throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event'); |
| 77 | 77 | } |
| 78 | 78 | } //put your code here |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $listners = $this->doGetListeners(); |
| 105 | 105 | if (!$this->hadListeners($name, $object)){ |
| 106 | 106 | $res = false; |
| 107 | - }else{ |
|
| 107 | + } else{ |
|
| 108 | 108 | $listners = $this->doGetListeners(); |
| 109 | 109 | $res = (boolean) count($listners[$object][$name]); |
| 110 | 110 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | foreach($listeners as $listener){ |
| 212 | 212 | if($listener instanceof \PEIP\INF\Handler\Handler){ |
| 213 | 213 | $listener->handle($subject); |
| 214 | - }elseif(is_callable($listener)){ |
|
| 214 | + } elseif(is_callable($listener)){ |
|
| 215 | 215 | call_user_func($listener, $subject); |
| 216 | 216 | } |
| 217 | 217 | } |
@@ -46,10 +46,10 @@ |
||
| 46 | 46 | if($this->hasListeners($name, $object->getContent())){ |
| 47 | 47 | return self::doNotify($this->getListeners($name, $object->getContent()), $object); |
| 48 | 48 | } |
| 49 | - }else{ |
|
| 49 | + } else{ |
|
| 50 | 50 | throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject'); |
| 51 | 51 | } |
| 52 | - }else{ |
|
| 52 | + } else{ |
|
| 53 | 53 | throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event'); |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $name = is_object($name) ? get_class($name) : (string)$name; |
| 23 | 23 | if(Test::assertClassOrInterfaceExists($name)){ |
| 24 | 24 | parent::connect($name, $listener); |
| 25 | - }else{ |
|
| 25 | + } else{ |
|
| 26 | 26 | throw new \InvalidArgumentException($name." is not an Class nor Interface"); |
| 27 | 27 | } |
| 28 | 28 | } |