Completed
Branch v1.ns (3cce68)
by Timo
03:38
created
src/ABS/Handler/MessageHandler.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Data/StoreCollection.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Translator/XMLArrayTranslator.php 1 patch
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@  discard block
 block discarded – undo
30 30
                 throw new \Exception('loading XML failed');  
31 31
             }
32 32
             
33
-        }
34
-        catch (\Exception $e) {
33
+        } catch (\Exception $e) {
35 34
             return false;
36 35
         }     
37 36
         
@@ -65,7 +64,7 @@  discard block
 block discarded – undo
65 64
                         )
66 65
                     );
67 66
                 }
68
-            }else {
67
+            } else {
69 68
                 $array[$name] = array();
70 69
             }
71 70
             $array[$name][] = $res;
Please login to merge, or discard this patch.
src/Channel/PollableChannel.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@
 block discarded – undo
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
                 
Please login to merge, or discard this patch.
src/Channel/PriorityChannel.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     protected function doSend(\PEIP\INF\Message\Message $message) {
55 55
         if ($this->capacity < 1 || $this->getMessageCount() <= $this->getCapacity()) {
56 56
             $this->queue->insert($message, $message->getHeader($this->priorityHeader));
57
-        }else {
57
+        } else {
58 58
             throw new \Exception('Not implemented yet.');
59 59
         }            
60 60
     }       
Please login to merge, or discard this patch.
src/Event/Observable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Gateway/SimpleMessagingGateway.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,8 +114,7 @@
 block discarded – undo
114 114
         $this->send($content);
115 115
         try {
116 116
             $res = $this->receive();
117
-        }
118
-        catch (\Exception $e) {
117
+        } catch (\Exception $e) {
119 118
             return NULL;
120 119
         }
121 120
         return $res;
Please login to merge, or discard this patch.
src/Pipe/FixedEventPipe.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     protected function doSend(\PEIP\INF\Message\Message $message) {
55 55
         if ($this->capacity < 1 || $this->getMessageCount() <= $this->getCapacity()) {
56 56
             $this->queue->insert($message, $message->getHeader($this->priorityHeader));
57
-        }else {
57
+        } else {
58 58
             throw new \Exception('Not implemented yet.');
59 59
         }            
60 60
     }       
Please login to merge, or discard this patch.
src/Data/ParameterHolderCollection.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.