@@ -74,7 +74,7 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | protected function doReply(\PEIP\INF\Message\Message $message) |
| 76 | 76 | { |
| 77 | - $channels = (array) $this->selectChannels($message); |
|
| 77 | + $channels = (array)$this->selectChannels($message); |
|
| 78 | 78 | foreach ($channels as $channel) { |
| 79 | 79 | $this->setOutputChannel($this->resolveChannel($channel)); |
| 80 | 80 | $this->replyMessage($message); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function doReply(\PEIP\INF\Message\Message $message) |
| 39 | 39 | { |
| 40 | 40 | $res = $this->callService($message); |
| 41 | - $out = (bool) $message->hasHeader('REPLY_CHANNEL') |
|
| 41 | + $out = (bool)$message->hasHeader('REPLY_CHANNEL') |
|
| 42 | 42 | ? $message->getHeader('REPLY_CHANNEL') |
| 43 | 43 | : $this->outputChannel; |
| 44 | 44 | if ($out) { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $res = null; |
| 60 | 60 | if (is_callable($this->serviceCallable)) { |
| 61 | 61 | $res = call_user_func($this->serviceCallable, $message->getContent()); |
| 62 | - } else { |
|
| 62 | + }else { |
|
| 63 | 63 | if (is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')) { |
| 64 | 64 | $res = $this->serviceCallable->handle($message->getContent()); |
| 65 | 65 | } |
@@ -104,7 +104,7 @@ |
||
| 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 | } |
@@ -104,7 +104,7 @@ |
||
| 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 | } |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | return false; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - return (bool) count($this->listeners[$name]); |
|
| 107 | + return (bool)count($this->listeners[$name]); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | */ |
| 97 | 97 | public function hasListeners() |
| 98 | 98 | { |
| 99 | - return (bool) $this->listeners->count(); |
|
| 99 | + return (bool)$this->listeners->count(); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -17,10 +17,10 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function connect($name, $listener) |
| 19 | 19 | { |
| 20 | - $name = is_object($name) ? get_class($name) : (string) $name; |
|
| 20 | + $name = is_object($name) ? get_class($name) : (string)$name; |
|
| 21 | 21 | if (Test::assertClassOrInterfaceExists($name)) { |
| 22 | 22 | parent::connect($name, $listener); |
| 23 | - } else { |
|
| 23 | + }else { |
|
| 24 | 24 | throw new \InvalidArgumentException($name.' is not an Class nor Interface'); |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -108,9 +108,9 @@ |
||
| 108 | 108 | $listners = $this->doGetListeners(); |
| 109 | 109 | if (!$this->hadListeners($name, $object)) { |
| 110 | 110 | $res = false; |
| 111 | - } else { |
|
| 111 | + }else { |
|
| 112 | 112 | $listners = $this->doGetListeners(); |
| 113 | - $res = (bool) count($listners[$object][$name]); |
|
| 113 | + $res = (bool)count($listners[$object][$name]); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | return $res; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - //put your code here |
|
| 47 | + //put your code here |
|
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | 50 | * Creates an event-object with given object as content/subject and notifies |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | ), |
| 37 | 37 | $object->getContent() |
| 38 | 38 | ); |
| 39 | - } else { |
|
| 39 | + }else { |
|
| 40 | 40 | throw new \InvalidArgumentException('instance of \PEIP\INF\Event\Event must contain subject'); |
| 41 | 41 | } |
| 42 | - } else { |
|
| 42 | + }else { |
|
| 43 | 43 | throw new \InvalidArgumentException('object must be instance of \PEIP\INF\Event\Event'); |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $object, |
| 70 | 70 | $name, |
| 71 | 71 | $headers, |
| 72 | - (string) $type |
|
| 72 | + (string)$type |
|
| 73 | 73 | ) |
| 74 | 74 | ); |
| 75 | 75 | } |