Test Setup Failed
Push — master ( fd5f48...1ab101 )
by Ryosuke
17:18
created
src/Internal/YieldableUtils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public static function getApplier($yielded, array $yieldables, callable $next = null)
75 75
     {
76
-        return function (array $results) use ($yielded, $yieldables, $next) {
76
+        return function(array $results) use ($yielded, $yieldables, $next) {
77 77
             foreach ($results as $hash => $resolved) {
78 78
                 $current = &$yielded;
79 79
                 foreach ($yieldables[$hash]['keylist'] as $key) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public static function safePromise(PromiseInterface $promise)
95 95
     {
96
-        return $promise->then(null, function ($value) {
96
+        return $promise->then(null, function($value) {
97 97
             if (TypeUtils::isFatalThrowable($value)) {
98 98
                 throw $value;
99 99
             }
Please login to merge, or discard this patch.
src/Co.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 YieldableUtils::getApplier($returned, $yieldables, [$deferred, 'resolve']),
165 165
                 [$deferred, 'reject']
166 166
             )
167
-            ->then(function () use ($yieldables, $deferred) {
167
+            ->then(function() use ($yieldables, $deferred) {
168 168
                 $this->runners = array_diff_key($this->runners, $yieldables);
169 169
                 return $deferred->promise();
170 170
             });
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         // Check delay request yields
185 185
         if ($gc->key() === CoInterface::DELAY) {
186 186
             return $this->pool->addDelay($gc->current())
187
-            ->then(function () use ($gc) {
187
+            ->then(function() use ($gc) {
188 188
                 $gc->send(null);
189 189
                 return $this->processGeneratorContainer($gc);
190 190
             });
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         ->then(
206 206
             YieldableUtils::getApplier($yielded, $yieldables, [$gc, 'send']),
207 207
             [$gc, 'throw_']
208
-        )->then(function () use ($gc, $yieldables) {
208
+        )->then(function() use ($gc, $yieldables) {
209 209
             // Continue
210 210
             $this->runners = array_diff_key($this->runners, $yieldables);
211 211
             return $this->processGeneratorContainer($gc);
Please login to merge, or discard this patch.
src/Internal/ManualScheduler.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 namespace mpyw\Co\Internal;
4
-use mpyw\Co\CURLException;
5 4
 use React\Promise\Deferred;
6 5
 use React\Promise\PromiseInterface;
7 6
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $errno = curl_multi_add_handle($this->mh, $ch);
60 60
         if ($errno !== CURLM_OK) {
61 61
             // @codeCoverageIgnoreStart
62
-            $msg = curl_multi_strerror($errno) . ": $ch";
62
+            $msg = curl_multi_strerror($errno).": $ch";
63 63
             $deferred && $deferred->reject(new \RuntimeException($msg));
64 64
             return;
65 65
             // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.
src/Internal/CoOption.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     public function offsetGet($offset)
91 91
     {
92 92
         if (!isset($this->options[$offset])) {
93
-            throw new \DomainException('Undefined field: ' + $offset);
93
+            throw new \DomainException('Undefined field: ' +$offset);
94 94
         }
95 95
         return $this->options[$offset];
96 96
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             if ($key === 'autoschedule' && !defined('CURLMOPT_MAX_TOTAL_CONNECTIONS')) {
131 131
                 throw new \OutOfBoundsException('"autoschedule" can be used only on PHP 7.0.7 or later.');
132 132
             }
133
-            $validator = [__CLASS__, 'validate' . self::$types[$key]];
133
+            $validator = [__CLASS__, 'validate'.self::$types[$key]];
134 134
             $options[$key] = $validator($key, $value);
135 135
         }
136 136
         return $options;
Please login to merge, or discard this patch.
src/Internal/AutoScheduler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         $errno = curl_multi_add_handle($this->mh, $ch);
32 32
         if ($errno !== CURLM_OK) {
33 33
             // @codeCoverageIgnoreStart
34
-            $msg = curl_multi_strerror($errno) . ": $ch";
34
+            $msg = curl_multi_strerror($errno).": $ch";
35 35
             $deferred->reject(new \RuntimeException($msg));
36 36
             return $deferred->promise();
37 37
             // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.