@@ -39,7 +39,7 @@ |
||
| 39 | 39 | if($cold){ |
| 40 | 40 | $type = 'cold'; |
| 41 | 41 | $count = $this->coldDrinkCounter; |
| 42 | - }else{ |
|
| 42 | + } else{ |
|
| 43 | 43 | $type = 'hot'; |
| 44 | 44 | $count = $this->hotDrinkCounter; |
| 45 | 45 | } |
@@ -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 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | if($this->hasService($key)){
|
| 121 | 121 | $service = $this->getService($key); |
| 122 | - }else{
|
|
| 122 | + } else{
|
|
| 123 | 123 | $service = $this->createService($key); |
| 124 | 124 | } |
| 125 | 125 | |
@@ -151,11 +151,11 @@ discard block |
||
| 151 | 151 | )); |
| 152 | 152 | |
| 153 | 153 | return $node; |
| 154 | - }else{
|
|
| 154 | + } else{
|
|
| 155 | 155 | $errorMessage = 'COULD NOT BUILD NODE FOR KEY: '.$key; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | - }else{
|
|
| 158 | + } else{
|
|
| 159 | 159 | $errorMessage = 'NO CONFIG FOR KEY: '.$key; |
| 160 | 160 | } |
| 161 | 161 | $this->doFireEvent(self::EVENT_CREATE_SERVICE_ERROR, array( |
@@ -199,10 +199,10 @@ discard block |
||
| 199 | 199 | self::HEADER_NODE => $nodeInstance |
| 200 | 200 | )); |
| 201 | 201 | return $nodeInstance; |
| 202 | - }else{
|
|
| 202 | + } else{
|
|
| 203 | 203 | $errorMessage = 'BUILDER RETURNED NO OBJECT FOR NODE-TYPE: '.$nodeName; |
| 204 | 204 | } |
| 205 | - }else{
|
|
| 205 | + } else{
|
|
| 206 | 206 | $errorMessage = 'NO BUILDER FOUND FOR NODE-TYPE: '.$nodeName; |
| 207 | 207 | } |
| 208 | 208 | |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | $array = array(); |
| 27 | 27 | try {
|
| 28 | 28 | $node = simplexml_load_string($content); |
| 29 | - } |
|
| 30 | - catch(\Exception $e){
|
|
| 29 | + } catch(\Exception $e){
|
|
| 31 | 30 | return false; |
| 32 | 31 | } |
| 33 | 32 | |
@@ -61,7 +60,7 @@ discard block |
||
| 61 | 60 | ) |
| 62 | 61 | ); |
| 63 | 62 | } |
| 64 | - }else{
|
|
| 63 | + } else{
|
|
| 65 | 64 | $array[$name] = array(); |
| 66 | 65 | } |
| 67 | 66 | $array[$name][] = $res; |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 |
@@ -70,10 +70,10 @@ |
||
| 70 | 70 | ), |
| 71 | 71 | $object |
| 72 | 72 | ); |
| 73 | - }else{
|
|
| 73 | + } else{
|
|
| 74 | 74 | throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject');
|
| 75 | 75 | } |
| 76 | - }else{
|
|
| 76 | + } else{
|
|
| 77 | 77 | throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event');
|
| 78 | 78 | } |
| 79 | 79 | } //put your code here |