Completed
Push — v1.ns ( 6f2676...0f96a8 )
by Timo
03:42
created
src/Service/ServiceActivator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,12 +33,12 @@
 block discarded – undo
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
     }       
Please login to merge, or discard this patch.
src/Service/SplittingServiceActivator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Service/ServiceContainerBuilder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 use \PEIP\Data\InternalStoreAbstract;
26 26
 use PEIP\Factory\DedicatedFactory;
27 27
 
28
-class ServiceContainerBuilder extends \PEIP\Data\InternalStoreAbstract{
28
+class ServiceContainerBuilder extends \PEIP\Data\InternalStoreAbstract {
29 29
     
30 30
     
31 31
     
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param $factory 
36 36
      * @return 
37 37
      */
38
-    public function setFactory($key, DedicatedFactory $factory){
38
+    public function setFactory($key, DedicatedFactory $factory) {
39 39
             $this->setInternalValue($key, $factory);
40 40
     }
41 41
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param $key 
46 46
      * @return 
47 47
      */
48
-    public function getFactory($key){
48
+    public function getFactory($key) {
49 49
             $this->getInternalValue($key);
50 50
     }
51 51
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @param $key 
56 56
      * @return 
57 57
      */
58
-    public function hasFactory($key){
58
+    public function hasFactory($key) {
59 59
             $this->hasInternalValue($key);
60 60
     }
61 61
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param $key 
66 66
      * @return 
67 67
      */
68
-    public function deleteFactory($key){
68
+    public function deleteFactory($key) {
69 69
             $this->deleteInternalValue($key);
70 70
     }
71 71
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param $key 
76 76
      * @return 
77 77
      */
78
-    public function getService($key){
78
+    public function getService($key) {
79 79
         return isset($this->services[$key]) ? $this->services[$key] : $this->services[$key] = $this->getFactory($key)->build();
80 80
     }
81 81
     
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * @param $key 
87 87
      * @return 
88 88
      */
89
-    public function buildService($key){
89
+    public function buildService($key) {
90 90
         return $this->getFactory($key)->build();
91 91
     }   
92 92
     
Please login to merge, or discard this patch.
src/Service/ServiceContainer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 class ServiceContainer
28 28
     extends \PEIP\ABS\Base\Connectable
29 29
     implements 
30
-        \PEIP\INF\Service\ServiceContainer{
30
+        \PEIP\INF\Service\ServiceContainer {
31 31
 
32 32
     protected $services = array();
33 33
     
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param $service 
46 46
      * @return 
47 47
      */
48
-    public function setService($key, $service){
48
+    public function setService($key, $service) {
49 49
         $this->services[$key] = $service;
50 50
     }
51 51
     
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @param $key 
56 56
      * @return 
57 57
      */
58
-    public function getService($key){
58
+    public function getService($key) {
59 59
         return $this->services[$key];
60 60
     }
61 61
     
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param $key 
66 66
      * @return 
67 67
      */
68
-    public function hasService($key){
68
+    public function hasService($key) {
69 69
         return array_key_exists($key, $this->services); 
70 70
     }   
71 71
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param $key 
76 76
      * @return 
77 77
      */
78
-    public function deleteService($key){
78
+    public function deleteService($key) {
79 79
         unset($this->services[$key]);
80 80
     }
81 81
     
Please login to merge, or discard this patch.
src/Service/HeaderServiceActivator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @author timo
13 13
  */
14 14
 
15
-class HeaderServiceActivator extends \PEIP\Service\ServiceActivator{
15
+class HeaderServiceActivator extends \PEIP\Service\ServiceActivator {
16 16
    
17 17
     protected $headerName;
18 18
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * @param $outputChannel
25 25
      * @return
26 26
      */
27
-    public function __construct($serviceCallable, $headerName, \PEIP\INF\Channel\Channel $inputChannel = NULL, \PEIP\INF\Channel\Channel $outputChannel = NULL){
27
+    public function __construct($serviceCallable, $headerName, \PEIP\INF\Channel\Channel $inputChannel = NULL, \PEIP\INF\Channel\Channel $outputChannel = NULL) {
28 28
         $this->headerName = $headerName;
29 29
         parent::__construct($serviceCallable, $inputChannel, $outputChannel);
30 30
     }
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
      * @param \PEIP\INF\Message\Message $message message to call the service with it�s content/payload
39 39
      * @return mixed result of calling the registered service callable with message content/payload
40 40
      */
41
-    protected function callService(\PEIP\INF\Message\Message $message){
41
+    protected function callService(\PEIP\INF\Message\Message $message) {
42 42
         $res = NULL; 
43
-        if(is_callable($this->serviceCallable)){
43
+        if (is_callable($this->serviceCallable)) {
44 44
             $res = call_user_func($this->serviceCallable, $message->getHeader($this->headerName));
45
-        }else{
46
-            if(is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')){
45
+        }else {
46
+            if (is_object($this->serviceCallable) && method_exists($this->serviceCallable, 'handle')) {
47 47
                 $res = $this->serviceCallable->handle($message->getHeader($this->headerName));
48 48
             }
49 49
         }
Please login to merge, or discard this patch.
src/INF/Message/MessageDispatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 
27 27
   public function disconnect($name, \PEIP\INF\Message\MessageHandler $handler);
28 28
 
29
-  public function notify( $event);
29
+  public function notify($event);
30 30
 
31
-  public function notifyUntil( $event);
31
+  public function notifyUntil($event);
32 32
 
33
-  public function filter( $event, $value);
33
+  public function filter($event, $value);
34 34
 
35 35
   public function hasListeners($name);
36 36
 
Please login to merge, or discard this patch.
src/INF/Dispatcher/ListDispatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 
25 25
 interface ListDispatcher extends \PEIP\INF\Dispatcher\Dispatcher {
26 26
 
27
-  public function connect( $handler);
27
+  public function connect($handler);
28 28
 
29
-  public function disconnect( $handler);
29
+  public function disconnect($handler);
30 30
 
31 31
   public function hasListeners();
32 32
 
Please login to merge, or discard this patch.
src/Listener/Wiretap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
      * @param $outputChannel 
34 34
      * @return 
35 35
      */
36
-    public function __construct(\PEIP\INF\Channel\Channel $inputChannel, \PEIP\INF\Channel\Channel $outputChannel = NULL){
36
+    public function __construct(\PEIP\INF\Channel\Channel $inputChannel, \PEIP\INF\Channel\Channel $outputChannel = NULL) {
37 37
         $this->setEventName('preSend');
38 38
         $this->setInputChannel($inputChannel);
39
-        if(is_object($outputChannel)){
39
+        if (is_object($outputChannel)) {
40 40
             $this->setOutputChannel($outputChannel);
41 41
         }           
42 42
     }           
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param $message 
48 48
      * @return 
49 49
      */
50
-    protected function doReply(\PEIP\INF\Message\Message $message){
50
+    protected function doReply(\PEIP\INF\Message\Message $message) {
51 51
         $this->replyMessage($message->getHeader('MESSAGE'));
52 52
     }
53 53
     
Please login to merge, or discard this patch.
src/Handler/CallableHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @param callable $callable the callable to wrap with the handler 
34 34
      * @return 
35 35
      */
36
-    public function __construct($callable){
36
+    public function __construct($callable) {
37 37
         $this->callable = $callable;    
38 38
     }
39 39
         
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param mixed $subject the subject to handle
46 46
      * @return mixed result of calling the registered callable with given subject
47 47
      */
48
-    public function handle($subject){
48
+    public function handle($subject) {
49 49
         return call_user_func($this->callable, $subject);
50 50
     }
51 51
     
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @return mixed result of calling the registered callable with given subject
59 59
      * @see CallableHandler::handle 
60 60
      */
61
-    public function __invoke($subject){
61
+    public function __invoke($subject) {
62 62
         return $this->handle($subject); 
63 63
     }
64 64
     
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @access public
69 69
      * @return callable callable wrapped by the handler
70 70
      */
71
-    public function getCallable(){
71
+    public function getCallable() {
72 72
         return $this->callable;
73 73
     }
74 74
     
Please login to merge, or discard this patch.