Completed
Push — v1.ns ( ab319d...410f3f )
by Timo
04:00
created
src/Data/ParameterHolderCollection.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function setParameters($namespace, array $parameters){
76 76
         $this->getParameterHolderOrCreate($namespace)->setParameters($parameters);
77
-   }
77
+    }
78 78
   
79 79
   
80 80
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function addParameters($namespace, array $parameters){
87 87
         $this->getParameterHolderOrCreate($namespace)->addParameters($parameters);
88
-   }
88
+    }
89 89
   
90 90
   
91 91
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function getParameters($namespace){
104 104
         $this->getParameterHolderOrCreate($namespace)->getParameters();
105
-   }
105
+    }
106 106
   
107 107
   
108 108
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function getParameter($namespace, $name){
115 115
         $this->getParameterHolderOrCreate($namespace)->getParameter($name);
116
-   }
116
+    }
117 117
   
118 118
   
119 119
     /**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function setParameter($namespace, $name, $value){
127 127
         $this->getParameterHolderOrCreate($namespace)->setParameters($parameters);
128
-   }
128
+    }
129 129
   
130 130
   
131 131
     /**
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function hasParameter($namespace, $name){
138 138
         $this->getParameterHolderOrCreate($namespace)->hasParameter($name);
139
-   }
139
+    }
140 140
 
141 141
   
142 142
     /**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function deleteParameter($namespace, $name){
149 149
         $this->getParameterHolderOrCreate($namespace)->setParameters($parameters);
150
-   }
150
+    }
151 151
 
152 152
   
153 153
     /**
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder){
168 168
     $this->stores[$namespace] = $holder;
169
-  } 
169
+    } 
170 170
 
171 171
   
172 172
     /**
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      */
184 184
     public function getParameterHolder($namespace){
185 185
     return $this->stores[$namespace];
186
-  }
186
+    }
187 187
 
188 188
   
189 189
     /**
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      */
201 201
     public function hasParameterHolder($namespace){
202 202
     return array_key_exists($namespace, $this->stores);
203
-  }
203
+    }
204 204
 
205 205
   
206 206
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function deleteParameterHolder($namespace){
219 219
     unset($this->stores[$namespace]);
220
-  } 
220
+    } 
221 221
     
222 222
     
223 223
 
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      * @param $factory 
36 36
      * @return 
37 37
      */
38
-    public function __construct(\PEIP\INF\Factory\DedicatedFactory $factory){
38
+    public function __construct(\PEIP\INF\Factory\DedicatedFactory $factory) {
39 39
         $this->factory = $factory;
40 40
     }
41 41
 
@@ -45,12 +45,12 @@  discard block
 block discarded – undo
45 45
      * @param $namespace 
46 46
      * @return 
47 47
      */
48
-    protected function getParameterHolderOrCreate($namespace){
49
-        if(!$this->hasParameterHolder($namespace)){
48
+    protected function getParameterHolderOrCreate($namespace) {
49
+        if (!$this->hasParameterHolder($namespace)) {
50 50
             $store = $this->factory->build();
51
-            if($store instanceof \PEIP\INF\Data\ParameterHolder){
51
+            if ($store instanceof \PEIP\INF\Data\ParameterHolder) {
52 52
                 $this->stores[$namespace] = $store;
53
-            }else{
53
+            }else {
54 54
                 throw new \Exception('Could not build Instance of \PEIP\INF\Data\ParameterHolder from factory.');
55 55
             }
56 56
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @param $value 
73 73
      * @return 
74 74
      */
75
-    public function setParameters($namespace, array $parameters){
75
+    public function setParameters($namespace, array $parameters) {
76 76
         $this->getParameterHolderOrCreate($namespace)->setParameters($parameters);
77 77
    }
78 78
   
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @param $parameters 
84 84
      * @return 
85 85
      */
86
-    public function addParameters($namespace, array $parameters){
86
+    public function addParameters($namespace, array $parameters) {
87 87
         $this->getParameterHolderOrCreate($namespace)->addParameters($parameters);
88 88
    }
89 89
   
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @param $name 
101 101
      * @return 
102 102
      */
103
-    public function getParameters($namespace){
103
+    public function getParameters($namespace) {
104 104
         $this->getParameterHolderOrCreate($namespace)->getParameters();
105 105
    }
106 106
   
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param $name 
112 112
      * @return 
113 113
      */
114
-    public function getParameter($namespace, $name){
114
+    public function getParameter($namespace, $name) {
115 115
         $this->getParameterHolderOrCreate($namespace)->getParameter($name);
116 116
    }
117 117
   
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @param $value 
124 124
      * @return 
125 125
      */
126
-    public function setParameter($namespace, $name, $value){
126
+    public function setParameter($namespace, $name, $value) {
127 127
         $this->getParameterHolderOrCreate($namespace)->setParameters($parameters);
128 128
    }
129 129
   
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param $name 
135 135
      * @return 
136 136
      */
137
-    public function hasParameter($namespace, $name){
137
+    public function hasParameter($namespace, $name) {
138 138
         $this->getParameterHolderOrCreate($namespace)->hasParameter($name);
139 139
    }
140 140
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @param $name 
146 146
      * @return 
147 147
      */
148
-    public function deleteParameter($namespace, $name){
148
+    public function deleteParameter($namespace, $name) {
149 149
         $this->getParameterHolderOrCreate($namespace)->setParameters($parameters);
150 150
    }
151 151
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * @param $holder 
165 165
      * @return 
166 166
      */
167
-    public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder){
167
+    public function setParameterHolder($namespace, \PEIP\INF\Data\ParameterHolder $holder) {
168 168
     $this->stores[$namespace] = $holder;
169 169
   } 
170 170
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      * @param $namespace 
182 182
      * @return 
183 183
      */
184
-    public function getParameterHolder($namespace){
184
+    public function getParameterHolder($namespace) {
185 185
     return $this->stores[$namespace];
186 186
   }
187 187
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      * @param $namespace 
199 199
      * @return 
200 200
      */
201
-    public function hasParameterHolder($namespace){
201
+    public function hasParameterHolder($namespace) {
202 202
     return array_key_exists($namespace, $this->stores);
203 203
   }
204 204
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      * @param $namespace 
216 216
      * @return 
217 217
      */
218
-    public function deleteParameterHolder($namespace){
218
+    public function deleteParameterHolder($namespace) {
219 219
     unset($this->stores[$namespace]);
220 220
   } 
221 221
     
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             $store = $this->factory->build();
51 51
             if($store instanceof \PEIP\INF\Data\ParameterHolder){
52 52
                 $this->stores[$namespace] = $store;
53
-            }else{
53
+            } else{
54 54
                 throw new \Exception('Could not build Instance of \PEIP\INF\Data\ParameterHolder from factory.');
55 55
             }
56 56
         }
Please login to merge, or discard this patch.
src/ABS/Context/ContextPlugin.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,18 +47,18 @@
 block discarded – undo
47 47
         }   
48 48
     }
49 49
 
50
-     /**
51
-     * Builds and modifies an arbitrary service/object instance from a config-obect.
52
-     *
53
-     * @see XMLContext::doBuild
54
-     * @see XMLContext::modifyService
55
-     * @implements \PEIP\INF\Context\Context
56
-     * @access public
57
-     * @param object $config configuration object to build a service instance from.
58
-     * @param array $arguments arguments for the service constructor
59
-     * @param string $defaultClass class to create instance for if none is set in config
60
-     * @return object build and modified srvice instance
61
-     */
50
+        /**
51
+         * Builds and modifies an arbitrary service/object instance from a config-obect.
52
+         *
53
+         * @see XMLContext::doBuild
54
+         * @see XMLContext::modifyService
55
+         * @implements \PEIP\INF\Context\Context
56
+         * @access public
57
+         * @param object $config configuration object to build a service instance from.
58
+         * @param array $arguments arguments for the service constructor
59
+         * @param string $defaultClass class to create instance for if none is set in config
60
+         * @return object build and modified srvice instance
61
+         */
62 62
     public function buildAndModify($config, $arguments, $defaultClass = false){
63 63
         return ServiceFactory::buildAndModify($config, $arguments, $defaultClass);
64 64
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
      * @param \PEIP\INF\Context\Context $context context instance to register the plugin with
41 41
      * @return 
42 42
      */
43
-    public function init(\PEIP\INF\Context\Context $context){
43
+    public function init(\PEIP\INF\Context\Context $context) {
44 44
         $this->context = $context;
45
-        foreach($this->builders as $node=>$method){
45
+        foreach ($this->builders as $node=>$method) {
46 46
             $context->registerNodeBuilder($node, array($this, $method));        
47 47
         }   
48 48
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      * @param string $defaultClass class to create instance for if none is set in config
60 60
      * @return object build and modified srvice instance
61 61
      */
62
-    public function buildAndModify($config, $arguments, $defaultClass = false){
62
+    public function buildAndModify($config, $arguments, $defaultClass = false) {
63 63
         return ServiceFactory::buildAndModify($config, $arguments, $defaultClass);
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
src/ABS/Channel/SubscribableChannel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 abstract class SubscribableChannel 
31 31
     extends \PEIP\ABS\Channel\Channel
32
-    implements \PEIP\INF\Channel\SubscribableChannel{
32
+    implements \PEIP\INF\Channel\SubscribableChannel {
33 33
 
34 34
     protected $messageDispatcher;   
35 35
        
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @param Callable|PEIP\INF\Handler\Handler  $handler the listener to subscribe
42 42
      * @return 
43 43
      */
44
-    public function subscribe($handler){ 
44
+    public function subscribe($handler) { 
45 45
         Test::ensureHandler($handler);
46 46
         $this->getMessageDispatcher()->connect($handler);
47 47
         $this->doFireEvent('subscribe', array('SUBSCRIBER'=>$handler));
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @param Callable|PEIP\INF\Handler\Handler  $handler the listener to unsubscribe
56 56
      * @return 
57 57
      */
58
-    public function unsubscribe($handler){
58
+    public function unsubscribe($handler) {
59 59
         Test::ensureHandler($handler);
60 60
         $this->getMessageDispatcher()->disconnect($handler);
61 61
         $this->doFireEvent('unsubscribe', array('SUBSCRIBER'=>$handler));       
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
      * @param boolean $transferListeners wether to transfer listeners of old dispatcher (if set) to new one. default: true 
70 70
      * @return 
71 71
      */
72
-    public function setMessageDispatcher(\PEIP\INF\Dispatcher\Dispatcher $dispatcher, $transferListeners = true){
73
-        if(isset($this->dispatcher) && $transferListeners){
74
-            foreach($this->dispatcher->getListeners() as $listener){
72
+    public function setMessageDispatcher(\PEIP\INF\Dispatcher\Dispatcher $dispatcher, $transferListeners = true) {
73
+        if (isset($this->dispatcher) && $transferListeners) {
74
+            foreach ($this->dispatcher->getListeners() as $listener) {
75 75
                 $dispatcher->connect($listener);
76 76
                 $this->dispatcher->disconnect($listener);       
77 77
             }   
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @access public
86 86
      * @return 
87 87
      */
88
-    public function getMessageDispatcher(){
88
+    public function getMessageDispatcher() {
89 89
         return isset($this->dispatcher) ? $this->dispatcher : $this->dispatcher = new Dispatcher;
90 90
     }   
91 91
     
Please login to merge, or discard this patch.
src/ABS/Channel/PollableChannel.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  */
22 22
 
23 23
 
24
- class PollableChannel     
24
+    class PollableChannel     
25 25
     extends \PEIP\ABS\Channel\Channel
26 26
     implements \PEIP\INF\Channel\PollableChannel {
27 27
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param $message 
35 35
      * @return 
36 36
      */
37
-    protected function doSend(\PEIP\INF\Message\Message $message){
37
+    protected function doSend(\PEIP\INF\Message\Message $message) {
38 38
         $this->messages[] = $message;        
39 39
     }
40 40
     
@@ -44,17 +44,17 @@  discard block
 block discarded – undo
44 44
      * @param $timeout 
45 45
      * @return 
46 46
      */
47
-    public function receive($timeout = -1){
47
+    public function receive($timeout = -1) {
48 48
         $message = NULL;
49
-        if($timeout == 0){
49
+        if ($timeout == 0) {
50 50
             $message = $this->getMessage(); 
51
-        }elseif($timeout < 0){
52
-            while(!$message = $this->getMessage()){
51
+        }elseif ($timeout < 0) {
52
+            while (!$message = $this->getMessage()) {
53 53
                                 
54 54
             }
55
-        }else{
55
+        }else {
56 56
             $time = time() + $timeout;
57
-            while(($time > time()) && !$message = $this->getMessage()){
57
+            while (($time > time()) && !$message = $this->getMessage()) {
58 58
                 
59 59
             }       
60 60
         }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @access protected
67 67
      * @return 
68 68
      */
69
-    protected function getMessage(){
69
+    protected function getMessage() {
70 70
         return array_shift($this->messages);
71 71
     }
72 72
     
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @access public
76 76
      * @return 
77 77
      */
78
-    public function clear(){
78
+    public function clear() {
79 79
         $this->messages = array();
80 80
     }
81 81
     
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
      * @param $selector 
86 86
      * @return 
87 87
      */
88
-    public function purge(\PEIP\INF\Selector\MessageSelector $selector){
89
-        foreach($this->messages as $key=>$message){
90
-            if(!$selector->acceptMessage($message)){
88
+    public function purge(\PEIP\INF\Selector\MessageSelector $selector) {
89
+        foreach ($this->messages as $key=>$message) {
90
+            if (!$selector->acceptMessage($message)) {
91 91
                 unset($this->messages[$key]);   
92 92
             }
93 93
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
         $message = NULL;
49 49
         if($timeout == 0){
50 50
             $message = $this->getMessage(); 
51
-        }elseif($timeout < 0){
51
+        } elseif($timeout < 0){
52 52
             while(!$message = $this->getMessage()){
53 53
                                 
54 54
             }
55
-        }else{
55
+        } else{
56 56
             $time = time() + $timeout;
57 57
             while(($time > time()) && !$message = $this->getMessage()){
58 58
                 
Please login to merge, or discard this patch.
src/ABS/Channel/Channel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param $name
35 35
      * @return
36 36
      */
37
-    public function __construct($name){
37
+    public function __construct($name) {
38 38
         $this->name = $name;
39 39
     }
40 40
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * @access public
43 43
      * @return string the channel�s name
44 44
      */
45
-    public function getName(){
45
+    public function getName() {
46 46
         return $this->name;
47 47
     }
48 48
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @param integer $timeout
53 53
      * @return
54 54
      */
55
-    public function send(\PEIP\INF\Message\Message $message, $timeout = -1){
55
+    public function send(\PEIP\INF\Message\Message $message, $timeout = -1) {
56 56
         $this->doFireEvent('preSend', array('MESSAGE'=>$message));
57 57
         $sent = $this->doSend($message);
58 58
         $this->doFireEvent('postSend', array(
Please login to merge, or discard this patch.
src/ABS/Pipe/EventPipe.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
      * @param string $eventName name of the event to listen to 
39 39
      * @param \PEIP\INF\Event\Connectable $connectable instance of \PEIP\INF\Event\Connectable to listen to 
40 40
      */
41
-    protected function doListen($eventName, \PEIP\INF\Event\Connectable $connectable){
42
-        if(!$connectable->hasListener($eventName, $this)){
41
+    protected function doListen($eventName, \PEIP\INF\Event\Connectable $connectable) {
42
+        if (!$connectable->hasListener($eventName, $this)) {
43 43
             $connectable->connect($eventName, $this);
44 44
             $this->connections[spl_object_hash($connectable)] = $connectable;   
45 45
         }   
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
      * @param string $eventName name of the event to unlisten 
53 53
      * @param \PEIP\INF\Event\Connectable $connectable instance of \PEIP\INF\Event\Connectable to unlisten to 
54 54
      */
55
-    protected function doUnlisten($eventName, \PEIP\INF\Event\Connectable $connectable){
56
-        if(!$connectable->hasListener($eventName, $this)){
55
+    protected function doUnlisten($eventName, \PEIP\INF\Event\Connectable $connectable) {
56
+        if (!$connectable->hasListener($eventName, $this)) {
57 57
             $connectable->disconnect($eventName, $this);
58 58
             unset($this->connections[spl_object_hash($connectable)]);   
59 59
         }   
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @access public
66 66
      * @return array array of \PEIP\INF\Event\Connectable instances
67 67
      */
68
-    public function doGetConnected(){
68
+    public function doGetConnected() {
69 69
         return array_values($this->connections);
70 70
     }
71 71
     
Please login to merge, or discard this patch.
src/ABS/Base/MutableContainer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      * @access public
33 33
      * @return mixed content
34 34
      */
35
-    public function getContent(){
35
+    public function getContent() {
36 36
         return parent::getContent();
37 37
     } 
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
src/ABS/Base/Container.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 
24 24
 abstract class Container 
25
-    implements \PEIP\INF\Base\Container{
25
+    implements \PEIP\INF\Base\Container {
26 26
 
27 27
     protected $content;
28 28
        
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @access public
34 34
      * @return 
35 35
      */
36
-    public function getContent(){
36
+    public function getContent() {
37 37
         return $this->content;
38 38
     }
39 39
     
Please login to merge, or discard this patch.
src/ABS/Request/Request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      * @param $connection 
38 38
      * @return 
39 39
      */
40
-    public function setConnection($connection){
40
+    public function setConnection($connection) {
41 41
         $this->connection = $connection;
42 42
     }
43 43
     
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @access public
48 48
      * @return 
49 49
      */
50
-    public function execute(){
50
+    public function execute() {
51 51
         return $this->send();   
52 52
     }
53 53
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @access public
57 57
      * @return 
58 58
      */
59
-    public function send(){
59
+    public function send() {
60 60
         return $this->connection->sendRequest($this);
61 61
     }
62 62
     
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @access public
66 66
      * @return 
67 67
      */
68
-    public function getRequestData(){
68
+    public function getRequestData() {
69 69
         return $this->doGetRequestData();   
70 70
     }
71 71
     
Please login to merge, or discard this patch.