@@ -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 | } |
@@ -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 | } |
@@ -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 | $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 | } |
@@ -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 | } |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | //if(\PEIP\Util\Test::assertMessage($message)){
|
| 113 | 113 | if($this->getOutputChannel()){
|
| 114 | 114 | $this->getOutputChannel()->send($message); |
| 115 | - }else{
|
|
| 115 | + } else{
|
|
| 116 | 116 | $this->doSend($message); |
| 117 | 117 | } |
| 118 | 118 | //} |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | $constructor = isset($config["constructor"])?(string)$config["constructor"]:""; |
| 52 | 52 | if($constructor != '' && Test::assertMethod($cls, $constructor)){
|
| 53 | 53 | $service = call_user_func_array(array($cls, $constructor), $arguments); |
| 54 | - }else{
|
|
| 54 | + } else{
|
|
| 55 | 55 | $service = self::build($cls, $arguments); |
| 56 | 56 | } |
| 57 | - }catch(\Exception $e){
|
|
| 57 | + } catch(\Exception $e){
|
|
| 58 | 58 | throw new \RuntimeException('Could not create Service "'.$cls.'" -> '.$e->getMessage());
|
| 59 | 59 | } |
| 60 | 60 | } |
@@ -89,26 +89,26 @@ discard block |
||
| 89 | 89 | protected static function buildArg($config){
|
| 90 | 90 | if(trim((string)$config['value']) != ''){
|
| 91 | 91 | $arg = (string)$config['value']; |
| 92 | - }elseif($config->getName() == 'value'){
|
|
| 92 | + } elseif($config->getName() == 'value'){
|
|
| 93 | 93 | $arg = (string)$config; |
| 94 | - }elseif($config->getName() == 'list'){
|
|
| 94 | + } elseif($config->getName() == 'list'){
|
|
| 95 | 95 | $arg = array(); |
| 96 | 96 | foreach($config->children() as $entry){
|
| 97 | 97 | if($entry->getName() == 'value'){
|
| 98 | 98 | if($entry['key']){
|
| 99 | 99 | $arg[(string)$entry['key']] = (string)$entry; |
| 100 | - }else{
|
|
| 100 | + } else{
|
|
| 101 | 101 | $arg[] = (string)$entry; |
| 102 | 102 | } |
| 103 | - }elseif($entry->getName() == 'service'){
|
|
| 103 | + } elseif($entry->getName() == 'service'){
|
|
| 104 | 104 | $arg[] = $this->provideService($entry); |
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | - }elseif($config->getName() == 'service'){
|
|
| 107 | + } elseif($config->getName() == 'service'){
|
|
| 108 | 108 | $arg = self::provideService($config); |
| 109 | - }elseif($config->list){
|
|
| 109 | + } elseif($config->list){
|
|
| 110 | 110 | $arg = self::buildArg($config->list); |
| 111 | - }elseif($config->service){
|
|
| 111 | + } elseif($config->service){
|
|
| 112 | 112 | $arg = self::buildArg($config->service); |
| 113 | 113 | } |
| 114 | 114 | return $arg; |
@@ -129,12 +129,12 @@ discard block |
||
| 129 | 129 | public static function buildAndModify($config, $arguments, $defaultClass = ""){
|
| 130 | 130 | if((isset($config["class"]) && "" != (string)$config["class"]) || $defaultClass !== ""){
|
| 131 | 131 | $service = ServiceFactory::doBuild($config, $arguments, $defaultClass); |
| 132 | - }else{
|
|
| 132 | + } else{
|
|
| 133 | 133 | throw new \RuntimeException('Could not create Service. no class or reference given.');
|
| 134 | 134 | } |
| 135 | 135 | if(isset($config["ref_property"])){
|
| 136 | 136 | $service = $service->{(string)$config["ref_property"]};
|
| 137 | - }elseif(isset($config["ref_method"])){
|
|
| 137 | + } elseif(isset($config["ref_method"])){
|
|
| 138 | 138 | $args = array(); |
| 139 | 139 | if($config->argument){
|
| 140 | 140 | foreach($config->argument as $arg){
|
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $setter = self::getSetter($property); |
| 178 | 178 | if($setter && self::hasPublicProperty($service, 'Method', $setter)){
|
| 179 | 179 | $service->{$setter}($arg);
|
| 180 | - }elseif(in_array($property, self::hasPublicProperty($service, 'Property', $setter))){
|
|
| 180 | + } elseif(in_array($property, self::hasPublicProperty($service, 'Property', $setter))){
|
|
| 181 | 181 | $service->$setter = $arg; |
| 182 | 182 | } |
| 183 | 183 | } |
@@ -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;; |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | var_dump($drinks); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | -}else{
|
|
| 60 | +} else{
|
|
| 61 | 61 | throw new RuntimeException('Could not get CafeGateway');
|
| 62 | 62 | } |
| 63 | 63 | |