@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * @param string $className name of the class to return ReflectionClass for |
| 33 | 33 | * @return ReflectionClass the ReflectionClass instance for given class |
| 34 | 34 | */ |
| 35 | - protected static function getReflectionClass($className){ |
|
| 35 | + protected static function getReflectionClass($className) { |
|
| 36 | 36 | return array_key_exists($className, self::$reflectionClasses) |
| 37 | 37 | ? self::$reflectionClasses[$className] |
| 38 | 38 | : (self::$reflectionClasses[$className] = new \ReflectionClass($className)); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * @param string $className name of the class to return ReflectionClass for |
| 48 | 48 | * @return ReflectionClass the ReflectionClass instance for given class |
| 49 | 49 | */ |
| 50 | - public static function getInstance($className){ |
|
| 50 | + public static function getInstance($className) { |
|
| 51 | 51 | return self::getReflectionClass($className); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -20,4 +20,4 @@ |
||
| 20 | 20 | |
| 21 | 21 | |
| 22 | 22 | class ObjectStorage |
| 23 | - extends \SplObjectStorage{} |
|
| 23 | + extends \SplObjectStorage {} |
|
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @param $subject |
| 37 | 37 | * @return |
| 38 | 38 | */ |
| 39 | - public function __construct(\ArrayAccess $methodMap, $subject){ |
|
| 39 | + public function __construct(\ArrayAccess $methodMap, $subject) { |
|
| 40 | 40 | $this->methodMap = $methodMap; |
| 41 | 41 | $this->subject = $subject; |
| 42 | 42 | } |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | * @param $arguments |
| 49 | 49 | * @return |
| 50 | 50 | */ |
| 51 | - public function __call($method, array $arguments){ |
|
| 52 | - if(array_key_exists($method, $this->methodMap)){ |
|
| 51 | + public function __call($method, array $arguments) { |
|
| 52 | + if (array_key_exists($method, $this->methodMap)) { |
|
| 53 | 53 | return call_user_func_array(array($this->subject, $this->methodMap[$method]), $arguments); |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param $methodMap |
| 31 | 31 | * @return |
| 32 | 32 | */ |
| 33 | - public function __construct(ArrayAccess $methodMap){ |
|
| 33 | + public function __construct(ArrayAccess $methodMap) { |
|
| 34 | 34 | $this->methodMap = $methodMap; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * @param $subject |
| 41 | 41 | * @return |
| 42 | 42 | */ |
| 43 | - public function setSubject($subject){ |
|
| 43 | + public function setSubject($subject) { |
|
| 44 | 44 | $this->subject = $subject; |
| 45 | 45 | return $this; |
| 46 | 46 | } |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | * @param $arguments |
| 53 | 53 | * @return |
| 54 | 54 | */ |
| 55 | - public function __call($method, $arguments){ |
|
| 56 | - if(array_key_exists($method, $this->methodMap)){ |
|
| 55 | + public function __call($method, $arguments) { |
|
| 56 | + if (array_key_exists($method, $this->methodMap)) { |
|
| 57 | 57 | return call_user_func_array(array($this->subject, $this->methodMap[$method]), $arguments); |
| 58 | 58 | } |
| 59 | 59 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param $className |
| 34 | 34 | * @return |
| 35 | 35 | */ |
| 36 | - public function __construct($className){ |
|
| 36 | + public function __construct($className) { |
|
| 37 | 37 | $this->className = $className; |
| 38 | 38 | } |
| 39 | 39 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @param $message |
| 44 | 44 | * @return |
| 45 | 45 | */ |
| 46 | - public function acceptMessage(\PEIP\INF\Message\Message $message){ |
|
| 46 | + public function acceptMessage(\PEIP\INF\Message\Message $message) { |
|
| 47 | 47 | return $message->getContent() instanceof $className; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * @param $type |
| 48 | 48 | * @return |
| 49 | 49 | */ |
| 50 | - public function __construct($type){ |
|
| 50 | + public function __construct($type) { |
|
| 51 | 51 | $this->type = $type; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @param $message |
| 58 | 58 | * @return |
| 59 | 59 | */ |
| 60 | - public function acceptMessage(\PEIP\INF\Message\Message $message){ |
|
| 60 | + public function acceptMessage(\PEIP\INF\Message\Message $message) { |
|
| 61 | 61 | return call_user_func(self::$types[$this->type], $message->getContent()); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @param $params |
| 35 | 35 | * @return |
| 36 | 36 | */ |
| 37 | - public function __construct($callable, array $params = array()){ |
|
| 37 | + public function __construct($callable, array $params = array()) { |
|
| 38 | 38 | $this->callable = $callable; |
| 39 | 39 | $this->setParameters($params); |
| 40 | 40 | } |
@@ -33,12 +33,12 @@ |
||
| 33 | 33 | * @param $outputChannel |
| 34 | 34 | * @return |
| 35 | 35 | */ |
| 36 | - public function __construct($serviceCallable, \PEIP\INF\Channel\Channel $inputChannel = NULL, \PEIP\INF\Channel\Channel $outputChannel = NULL){ |
|
| 36 | + public function __construct($serviceCallable, \PEIP\INF\Channel\Channel $inputChannel = NULL, \PEIP\INF\Channel\Channel $outputChannel = NULL) { |
|
| 37 | 37 | $this->serviceCallable = $serviceCallable; |
| 38 | - if(is_object($inputChannel)){ |
|
| 38 | + if (is_object($inputChannel)) { |
|
| 39 | 39 | $this->setInputChannel($inputChannel); |
| 40 | 40 | } |
| 41 | - if(is_object($outputChannel)){ |
|
| 41 | + if (is_object($outputChannel)) { |
|
| 42 | 42 | $this->setOutputChannel($outputChannel); |
| 43 | 43 | } |
| 44 | 44 | } |
@@ -33,10 +33,10 @@ |
||
| 33 | 33 | * @param \PEIP\INF\Message\Message $message message to call the service with it�s content/payload |
| 34 | 34 | * @return mixed result of calling the registered service callable with message content/payload |
| 35 | 35 | */ |
| 36 | - public function callService(\PEIP\INF\Message\Message $message){ |
|
| 37 | - if(is_callable($this->serviceCallable)){ |
|
| 36 | + public function callService(\PEIP\INF\Message\Message $message) { |
|
| 37 | + if (is_callable($this->serviceCallable)) { |
|
| 38 | 38 | $res = call_user_func_array($this->serviceCallable, $message->getContent()); |
| 39 | - }elseif(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){ |
|
| 39 | + }elseif (is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')) { |
|
| 40 | 40 | $res = call_user_func_array(array($this->serviceCallable, 'handle'), $message->getContent()); |
| 41 | 41 | } |
| 42 | 42 | return $res; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public function callService(\PEIP\INF\Message\Message $message){ |
| 37 | 37 | if(is_callable($this->serviceCallable)){ |
| 38 | 38 | $res = call_user_func_array($this->serviceCallable, $message->getContent()); |
| 39 | - }elseif(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){ |
|
| 39 | + } elseif(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){ |
|
| 40 | 40 | $res = call_user_func_array(array($this->serviceCallable, 'handle'), $message->getContent()); |
| 41 | 41 | } |
| 42 | 42 | return $res; |