@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | if($static && !$reflectionFunc->isStatic()){
|
| 57 | 57 | throw new \InvalidArgumentException('Argument 1 passed to CallableMessageHandler::__construct is not an Callable: Method "'.$method.'" of class '.$class.' is not static.');
|
| 58 | 58 | } |
| 59 | - }else{
|
|
| 59 | + } else{
|
|
| 60 | 60 | $reflectionFunc = new \ReflectionFunction($this->callable); |
| 61 | 61 | } |
| 62 | 62 | $this->requiredParameters = $reflectionFunc->getNumberOfRequiredParameters(); |
| 63 | - }else{
|
|
| 63 | + } else{
|
|
| 64 | 64 | throw new \InvalidArgumentException('Argument 1 passed to CallableMessageHandler::__construct is not a Callable');
|
| 65 | 65 | } |
| 66 | 66 | } |
@@ -79,8 +79,7 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | try {
|
| 81 | 81 | return call_user_func_array($this->callable, array($message, $channel, $sent)); |
| 82 | - } |
|
| 83 | - catch(\Exception $e){
|
|
| 82 | + } catch(\Exception $e){
|
|
| 84 | 83 | throw new \RuntimeException('Unable to call Callable: '.$e->getMessage());
|
| 85 | 84 | } |
| 86 | 85 | } |
@@ -134,12 +134,10 @@ |
||
| 134 | 134 | $res = false; |
| 135 | 135 | try {
|
| 136 | 136 | $res = (string)$this->getContent(); |
| 137 | - } |
|
| 138 | - catch(\Exception $e){
|
|
| 137 | + } catch(\Exception $e){
|
|
| 139 | 138 | try {
|
| 140 | 139 | $res = get_class($this->getContent()); |
| 141 | - } |
|
| 142 | - catch(\Exception $e){
|
|
| 140 | + } catch(\Exception $e){
|
|
| 143 | 141 | |
| 144 | 142 | } |
| 145 | 143 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $store = $this->factory->build(); |
| 51 | 51 | if($store instanceof \PEIP\INF\Data\ParameterHolder){
|
| 52 | 52 | $this->stores[$namespace] = $store; |
| 53 | - }else{
|
|
| 53 | + } else{
|
|
| 54 | 54 | throw new \Exception('Could not build Instance of \PEIP\INF\Data\ParameterHolder from factory.');
|
| 55 | 55 | } |
| 56 | 56 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $store = $this->factory->build(); |
| 55 | 55 | if($store instanceof \PEIP\INF\Data\Store){
|
| 56 | 56 | $this->setPrivateValue($namespace, $store); |
| 57 | - }else{
|
|
| 57 | + } else{
|
|
| 58 | 58 | throw new \Exception('Could not build Instance of \PEIP\INF\Data\Store from factory.');
|
| 59 | 59 | } |
| 60 | 60 | } |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | $a = $b->getName(); |
| 42 | 42 | if(!$b->children()){
|
| 43 | 43 | $arr[$a] = trim($b[0]); |
| 44 | - } |
|
| 45 | - else{
|
|
| 44 | + } else{
|
|
| 46 | 45 | $arr[$a][$iter] = array(); |
| 47 | 46 | $arr[$a][$iter] = xml2phpArray($b,$arr[$a][$iter]); |
| 48 | 47 | } |