Completed
Pull Request — v1.ns (#6)
by Timo
03:13
created
src/Plugins/BasePlugin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function doCreateChannel($config, $defaultChannelClass, array $additionalArguments = [])
69 69
     {
70
-        $id = (string) $config['id'];
70
+        $id = (string)$config['id'];
71 71
         if ($id != '') {
72 72
             array_unshift($additionalArguments, $id);
73 73
             $channel = $this->buildAndModify($config, $additionalArguments, $defaultChannelClass);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         ];
96 96
         $defaultClass = $defaultClass ? $defaultClass : '\PEIP\Gateway\SimpleMessagingGateway';
97 97
         $gateway = $this->buildAndModify($config, $args, $defaultClass);
98
-        $id = (string) $config['id'];
98
+        $id = (string)$config['id'];
99 99
         $this->gateways[$id] = $gateway;
100 100
 
101 101
         return $gateway;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function createRouter($config, $defaultClass = false)
118 118
     {
119
-        $resolver = $config['channel_resolver'] ? (string) $config['channel_resolver'] : $this->channelRegistry;
119
+        $resolver = $config['channel_resolver'] ? (string)$config['channel_resolver'] : $this->channelRegistry;
120 120
 
121 121
         return $this->buildAndModify($config, [
122 122
             $resolver,
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function createServiceActivator($config, $defaultClass = false)
213 213
     {
214
-        $method = (string) $config['method'];
215
-        $service = $this->context->getServiceProvider()->provideService((string) $config['ref']);
214
+        $method = (string)$config['method'];
215
+        $service = $this->context->getServiceProvider()->provideService((string)$config['ref']);
216 216
         if ($method && $service) {
217 217
             $args = $this->getReplyHandlerArguments($config);
218 218
             array_unshift($args, [
@@ -287,6 +287,6 @@  discard block
 block discarded – undo
287 287
             ? $config[$type.'_channel']
288 288
             : $config['default_'.$type.'_channel'];
289 289
 
290
-        return $this->context->getServiceProvider()->provideService(trim((string) $channelName));
290
+        return $this->context->getServiceProvider()->provideService(trim((string)$channelName));
291 291
     }
292 292
 }
Please login to merge, or discard this patch.
src/Channel/ChannelAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         $listners = $this->doGetListeners();
105 105
         if (!$this->hadListeners($name, $object)) {
106 106
             $res = false;
107
-        } else {
107
+        }else {
108 108
             $listners = $this->doGetListeners();
109 109
             $res = (boolean)count($listners[$object][$name]);
110 110
         }
Please login to merge, or discard this patch.
src/Channel/PriorityChannel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function __construct($capacity = -1, $priorityHeader = null)
38 38
     {
39
-        $this->setCapacity((int) $capacity);
39
+        $this->setCapacity((int)$capacity);
40 40
         $this->queue = new SplPriorityQueue();
41 41
         if ($priorityHeader) {
42 42
             $this->priorityHeader = $priorityHeader;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         if ($this->capacity < 1 || $this->getMessageCount() <= $this->getCapacity()) {
54 54
             $this->queue->insert($message, $message->getHeader($this->priorityHeader));
55
-        } else {
55
+        }else {
56 56
             throw new \Exception('Not implemented yet.');
57 57
         }
58 58
     }
Please login to merge, or discard this patch.
src/Channel/QueueChannel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function __construct($capacity = -1)
33 33
     {
34
-        $this->setCapacity((int) $capacity);
34
+        $this->setCapacity((int)$capacity);
35 35
         $this->queue = new SplQueue();
36 36
     }
37 37
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         if ($this->capacity < 1 || $this->getMessageCount() <= $this->getCapacity()) {
72 72
             $this->queue->enqueque($message);
73
-        } else {
73
+        }else {
74 74
             throw new \Exception('Not implemented yet.');
75 75
         }
76 76
     }
Please login to merge, or discard this patch.
src/Channel/PollableChannel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         $listners = $this->doGetListeners();
105 105
         if (!$this->hadListeners($name, $object)) {
106 106
             $res = false;
107
-        } else {
107
+        }else {
108 108
             $listners = $this->doGetListeners();
109 109
             $res = (boolean)count($listners[$object][$name]);
110 110
         }
Please login to merge, or discard this patch.
src/Pipe/FixedEventPipe.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         $listners = $this->doGetListeners();
105 105
         if (!$this->hadListeners($name, $object)) {
106 106
             $res = false;
107
-        } else {
107
+        }else {
108 108
             $listners = $this->doGetListeners();
109 109
             $res = (boolean)count($listners[$object][$name]);
110 110
         }
Please login to merge, or discard this patch.
src/Pipe/Pipe.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         //if(\PEIP\Util\Test::assertMessage($message)){
104 104
             if ($this->getOutputChannel()) {
105 105
                 $this->getOutputChannel()->send($message);
106
-            } else {
106
+            }else {
107 107
                 $this->doSend($message);
108 108
             }
109 109
         //}
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     public function command(\PEIP\INF\Message\Message $cmdMessage)
196 196
     {
197 197
         $this->doFireEvent(self::EVENT_PRE_COMMAND, [self::HEADER_MESSAGE => $cmdMessage]);
198
-        $commandName = trim((string) $cmdMessage->getHeader('COMMAND'));
198
+        $commandName = trim((string)$cmdMessage->getHeader('COMMAND'));
199 199
         if ($commandName != '' && array_key_exists($commandName, $this->commands)) {
200 200
             call_user_func($this->commands[$commandName], $cmdMessage->getContent());
201 201
         }
Please login to merge, or discard this patch.
src/Message/TextMessage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function __construct($content, $title)
37 37
     {
38
-        $this->setContent((string) $content);
38
+        $this->setContent((string)$content);
39 39
     }
40 40
 
41 41
     /**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function setTitle($title)
47 47
     {
48
-        $this->title = (string) $title;
48
+        $this->title = (string)$title;
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
src/Message/GenericMessage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function getHeaders()
84 84
     {
85
-        return (array) $this->headers;
85
+        return (array)$this->headers;
86 86
     }
87 87
 
88 88
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function getHeader($name)
96 96
     {
97
-        $name = (string) $name;
97
+        $name = (string)$name;
98 98
 
99 99
         return isset($this->headers[$name]) ? $this->headers[$name] : null;
100 100
     }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $res = false;
141 141
         try {
142
-            $res = (string) $this->getContent();
142
+            $res = (string)$this->getContent();
143 143
         } catch (\Exception $e) {
144 144
             try {
145 145
                 $res = get_class($this->getContent());
Please login to merge, or discard this patch.