Completed
Branch 0.4-dev (d27253)
by Evgenij
03:26
created
src/RequestExecutor/Metadata/SocketBag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
         ];
179 179
 
180 180
         if (!is_array($key)) {
181
-            $key = [ $key => $value ];
181
+            $key = [$key => $value];
182 182
         }
183 183
 
184 184
         $key = array_intersect_key($key, $writableKeys);
Please login to merge, or discard this patch.
src/Configuration/StreamContext.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         $map = [
59
-            'null'     => [ $this, 'createFromNull' ],
60
-            'resource' => [ $this, 'createFromResource' ],
61
-            'array'    => [ $this, 'createFromArray' ],
59
+            'null'     => [$this, 'createFromNull'],
60
+            'resource' => [$this, 'createFromResource'],
61
+            'array'    => [$this, 'createFromArray'],
62 62
         ];
63 63
 
64 64
         $type = strtolower(gettype($settings));
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
     private function createFromArray(array $settings)
108 108
     {
109 109
         return stream_context_create(
110
-            isset($settings[ 'options' ]) ? $settings[ 'options' ] : [],
111
-            isset($settings[ 'params' ]) ? $settings[ 'params' ] : []
110
+            isset($settings['options']) ? $settings['options'] : [],
111
+            isset($settings['params']) ? $settings['params'] : []
112 112
         );
113 113
     }
114 114
 }
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/PushbackIterator.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,8 +163,7 @@
 block discarded – undo
163 163
         $this->popLastPushedBackItem();
164 164
 
165 165
         $result .= $this->hasUnreadItem() ?
166
-            array_shift($this->unreadItems) :
167
-            (string) $this->nestedIterator->current();
166
+            array_shift($this->unreadItems) : (string) $this->nestedIterator->current();
168 167
 
169 168
         while ($this->hasUnreadItem() && strlen($result) < $this->chunkSize) {
170 169
             $result .= array_shift($this->unreadItems);
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/AbstractTimeAwareStage.php 1 patch
Spacing   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $meta = $operation->getMetadata();
43 43
         return !$this->hasConnected($operation) ?
44
-            $meta[ RequestExecutorInterface::META_CONNECTION_TIMEOUT ] :
45
-            $meta[ RequestExecutorInterface::META_IO_TIMEOUT ];
44
+            $meta[RequestExecutorInterface::META_CONNECTION_TIMEOUT] : $meta[RequestExecutorInterface::META_IO_TIMEOUT];
46 45
     }
47 46
 
48 47
     /**
@@ -56,8 +55,7 @@  discard block
 block discarded – undo
56 55
     {
57 56
         $meta = $operation->getMetadata();
58 57
         return !$this->hasConnected($operation) ?
59
-            $meta[ RequestExecutorInterface::META_CONNECTION_START_TIME ] :
60
-            $meta[ RequestExecutorInterface::META_LAST_IO_START_TIME ];
58
+            $meta[RequestExecutorInterface::META_CONNECTION_START_TIME] : $meta[RequestExecutorInterface::META_LAST_IO_START_TIME];
61 59
     }
62 60
 
63 61
     /**
@@ -74,7 +72,7 @@  discard block
 block discarded – undo
74 72
         $meta  = $requestDescriptor->getMetadata();
75 73
         $table = [
76 74
             RequestExecutorInterface::META_CONNECTION_START_TIME =>
77
-                $meta[ RequestExecutorInterface::META_CONNECTION_START_TIME ] === null,
75
+                $meta[RequestExecutorInterface::META_CONNECTION_START_TIME] === null,
78 76
 
79 77
             RequestExecutorInterface::META_CONNECTION_FINISH_TIME =>
80 78
                 $meta[RequestExecutorInterface::META_CONNECTION_FINISH_TIME] === null,
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/WriteIoHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                 $operation,
51 51
                 $executor,
52 52
                 $socket,
53
-                $meta[ RequestExecutorInterface::META_USER_CONTEXT ]
53
+                $meta[RequestExecutorInterface::META_USER_CONTEXT]
54 54
             );
55 55
             $eventHandler->invokeEvent($event, $executor, $descriptor->getSocket(), $executionContext);
56 56
             $nextOperation = $event->getNextOperation();
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/ConnectStageReturningAllActiveSockets.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
     private function isDescriptorActive(RequestDescriptor $descriptor)
54 54
     {
55 55
         $meta = $descriptor->getMetadata();
56
-        return !$meta[ RequestExecutorInterface::META_REQUEST_COMPLETE ] &&
56
+        return !$meta[RequestExecutorInterface::META_REQUEST_COMPLETE] &&
57 57
                     $descriptor->isRunning() &&
58 58
                     !$descriptor->isPostponed();
59 59
     }
Please login to merge, or discard this patch.
src/RequestExecutor/LibEventRequestExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         parent::initializeRequest($eventCaller, $executionContext);
107 107
         $this->base = new LeBase();
108 108
 
109
-        $this->connectStage    = $this->stageFactory->createConnectStage(
109
+        $this->connectStage = $this->stageFactory->createConnectStage(
110 110
             $this,
111 111
             $executionContext,
112 112
             $eventCaller,
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             case LeCallbackInterface::EVENT_READ:
187 187
                 // fall down
188 188
             case LeCallbackInterface::EVENT_WRITE:
189
-                $result       = $this->ioStage->processStage([ $requestDescriptor ]);
189
+                $result       = $this->ioStage->processStage([$requestDescriptor]);
190 190
                 $doResetEvent = empty($result);
191 191
 
192 192
                 break;
Please login to merge, or discard this patch.
src/Socket/Io/AbstractIo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $lastError = error_get_last();
49 49
         if (!empty($lastError)) {
50 50
             $phpMessage = explode(':', $lastError['message'], 2);
51
-            $phpMessage = trim(trim(end($phpMessage)), '.') . '.';
51
+            $phpMessage = trim(trim(end($phpMessage)), '.').'.';
52 52
             return $phpMessage;
53 53
         }
54 54
 
Please login to merge, or discard this patch.
src/Socket/ServerSocket.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,8 +85,7 @@
 block discarded – undo
85 85
             'udg' => 1,
86 86
         ];
87 87
 
88
-        return isset($connectionLessMap[ $scheme ]) ?
89
-            STREAM_SERVER_BIND :
90
-            STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
88
+        return isset($connectionLessMap[$scheme]) ?
89
+            STREAM_SERVER_BIND : STREAM_SERVER_BIND | STREAM_SERVER_LISTEN;
91 90
     }
92 91
 }
Please login to merge, or discard this patch.