Completed
Branch 0.4-dev (d45f7e)
by Evgenij
02:39
created
src/Configuration/Configuration.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $options += $this->getDefaultOptions();
97 97
 
98
-        $this->connectTimeout   = (double) $options[ 'connectTimeout' ];
99
-        $this->ioTimeout        = (double) $options[ 'ioTimeout' ];
100
-        $this->preferredEngines = (array) $options[ 'preferredEngines' ];
98
+        $this->connectTimeout   = (double) $options['connectTimeout'];
99
+        $this->ioTimeout        = (double) $options['ioTimeout'];
100
+        $this->preferredEngines = (array) $options['preferredEngines'];
101 101
 
102
-        $this->streamContext = new StreamContext($options[ 'streamContext' ]);
102
+        $this->streamContext = new StreamContext($options['streamContext']);
103 103
         foreach (['minReceiveSpeed', 'minReceiveSpeedDuration', 'minSendSpeed', 'minSendSpeedDuration'] as $k) {
104 104
             $this->{$k} = $options[$k] !== null ? (int) $options[$k] : null;
105 105
         }
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
         $result        = [];
196 196
         $socketTimeout = (double) ini_get('default_socket_timeout');
197 197
 
198
-        $result[ 'connectTimeout' ]          = $socketTimeout;
199
-        $result[ 'ioTimeout' ]               = $socketTimeout;
200
-        $result[ 'preferredEngines' ]        = [ 'libevent', 'native' ];
201
-        $result[ 'streamContext' ]           = null;
202
-        $result[ 'minReceiveSpeed' ]         = null;
203
-        $result[ 'minReceiveSpeedDuration' ] = null;
204
-        $result[ 'minSendSpeed' ]            = null;
205
-        $result[ 'minSendSpeedDuration' ]    = null;
198
+        $result['connectTimeout']          = $socketTimeout;
199
+        $result['ioTimeout']               = $socketTimeout;
200
+        $result['preferredEngines']        = ['libevent', 'native'];
201
+        $result['streamContext']           = null;
202
+        $result['minReceiveSpeed']         = null;
203
+        $result['minReceiveSpeedDuration'] = null;
204
+        $result['minSendSpeed']            = null;
205
+        $result['minSendSpeedDuration']    = null;
206 206
 
207 207
         return $result;
208 208
     }
Please login to merge, or discard this patch.
src/Configuration/StreamContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
             return $settings;
60 60
         } elseif (is_array($settings)) {
61 61
             return stream_context_create(
62
-                isset($settings[ 'options' ]) ? $settings[ 'options' ] : [ ],
63
-                isset($settings[ 'params' ]) ? $settings[ 'params' ] : [ ]
62
+                isset($settings['options']) ? $settings['options'] : [],
63
+                isset($settings['params']) ? $settings['params'] : []
64 64
             );
65 65
         } elseif ($settings === null) {
66 66
             return stream_context_get_default();
Please login to merge, or discard this patch.
src/RequestExecutor/Pipeline/ConnectStage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             } elseif ($decision === LimitationSolverInterface::DECISION_SKIP_CURRENT) {
57 57
                 continue;
58 58
             } elseif ($decision !== LimitationSolverInterface::DECISION_OK) {
59
-                throw new \LogicException('Unknown decision ' . $decision . ' received.');
59
+                throw new \LogicException('Unknown decision '.$decision.' received.');
60 60
             }
61 61
 
62 62
             if ($this->connectSocket($descriptor)) {
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
             $meta = $descriptor->getMetadata();
118 118
 
119 119
             $socket->open(
120
-                $meta[ RequestExecutorInterface::META_ADDRESS ],
121
-                $meta[ RequestExecutorInterface::META_SOCKET_STREAM_CONTEXT]
120
+                $meta[RequestExecutorInterface::META_ADDRESS],
121
+                $meta[RequestExecutorInterface::META_SOCKET_STREAM_CONTEXT]
122 122
             );
123 123
 
124 124
             $descriptor->setRunning(true);
Please login to merge, or discard this patch.
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.