@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param object $message the message to handle |
| 43 | 43 | * @return |
| 44 | 44 | */ |
| 45 | - public function handle($message){ |
|
| 45 | + public function handle($message) { |
|
| 46 | 46 | $this->doHandle($this->getMessageFromObject($message)); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -73,24 +73,24 @@ discard block |
||
| 73 | 73 | * @param \PEIP\INF\Channel\Channel $inputChannel the input-channel to connect the handler to |
| 74 | 74 | * @return |
| 75 | 75 | */ |
| 76 | - protected function doSetInputChannel(\PEIP\INF\Channel\Channel $inputChannel){ |
|
| 76 | + protected function doSetInputChannel(\PEIP\INF\Channel\Channel $inputChannel) { |
|
| 77 | 77 | $this->inputChannel = $inputChannel; |
| 78 | - if($this->inputChannel instanceof \PEIP\INF\Channel\SubscribableChannel){ |
|
| 78 | + if ($this->inputChannel instanceof \PEIP\INF\Channel\SubscribableChannel) { |
|
| 79 | 79 | $this->inputChannel->subscribe($this); |
| 80 | - } else{ |
|
| 80 | + }else { |
|
| 81 | 81 | $this->unwrapEvents = true; |
| 82 | 82 | $this->inputChannel->connect('postSend', $this); |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - protected function getMessageFromObject($object){ |
|
| 86 | + protected function getMessageFromObject($object) { |
|
| 87 | 87 | $content = $object->getContent(); |
| 88 | - if($this->unwrapEvents |
|
| 88 | + if ($this->unwrapEvents |
|
| 89 | 89 | && $object instanceof \PEIP\INF\Event\Event |
| 90 | 90 | && $object->getName() == 'postSend' |
| 91 | 91 | && $object->hasHeader(Pipe::HEADER_MESSAGE) |
| 92 | 92 | && $content instanceof \PEIP\INF\Channel\PollableChannel |
| 93 | - ){ |
|
| 93 | + ) { |
|
| 94 | 94 | $object = $content->receive(); |
| 95 | 95 | } |
| 96 | 96 | if (!($object instanceof \PEIP\INF\Message\Message)) { |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @param string $nodeName the name of the node |
| 127 | 127 | * @param callable $callable a callable which creates instances for node-name |
| 128 | 128 | */ |
| 129 | - public function registerNodeBuilder($nodeName, $callable){ |
|
| 129 | + public function registerNodeBuilder($nodeName, $callable) { |
|
| 130 | 130 | return $this->getServiceProvider()->registerNodeBuilder($nodeName, $callable); |
| 131 | 131 | } |
| 132 | 132 | |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | * @param array $arguments arguments for the constructor |
| 798 | 798 | * @return object build and modified srvice instance |
| 799 | 799 | */ |
| 800 | - protected static function build($className, $arguments){ |
|
| 800 | + protected static function build($className, $arguments) { |
|
| 801 | 801 | return GenericBuilder::getInstance($className)->build($arguments); |
| 802 | 802 | } |
| 803 | 803 | |
@@ -805,9 +805,9 @@ discard block |
||
| 805 | 805 | * @param string $type |
| 806 | 806 | * @param string $name |
| 807 | 807 | */ |
| 808 | - protected static function hasPublicProperty($service, $type, $name){ |
|
| 808 | + protected static function hasPublicProperty($service, $type, $name) { |
|
| 809 | 809 | $reflection = GenericBuilder::getInstance(get_class($service))->getReflectionClass(); |
| 810 | - if($reflection->{'has'.$type}($name) && $reflection->{'get'.$type}($name)->isPublic()){ |
|
| 810 | + if ($reflection->{'has'.$type}($name) && $reflection->{'get'.$type}($name)->isPublic()) { |
|
| 811 | 811 | return true; |
| 812 | 812 | } |
| 813 | 813 | return false; |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | * @param $observer |
| 54 | 54 | * @return |
| 55 | 55 | */ |
| 56 | - public function addObserver(\PEIP\INF\Event\Observer $observer){ |
|
| 56 | + public function addObserver(\PEIP\INF\Event\Observer $observer) { |
|
| 57 | 57 | $this->observers[] = $observer; |
| 58 | 58 | } |
| 59 | 59 | |