Completed
Push — master ( 6ae8fd...612217 )
by Ryosuke
03:27
created
src/Co.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         if (!self::$self) {
82 82
             throw new \BadMethodCallException(
83
-                'Co::async() must be called along with Co::wait(). ' .
83
+                'Co::async() must be called along with Co::wait(). '.
84 84
                 'This method is mainly expected to be used in CURLOPT_WRITEFUNCTION callback.'
85 85
             );
86 86
         }
@@ -103,15 +103,15 @@  discard block
 block discarded – undo
103 103
         $return = $exception = null;
104 104
         $deferred = new Deferred;
105 105
         $deferred->promise()->then(
106
-            function ($r) use (&$return) {
106
+            function($r) use (&$return) {
107 107
                 $return = $r;
108 108
             },
109
-            function ($e) use (&$exception) {
109
+            function($e) use (&$exception) {
110 110
                 $exception = $e;
111 111
             }
112 112
         );
113 113
         // For convenience, all values are wrapped into generator
114
-        $genfunc = function () use ($value) {
114
+        $genfunc = function() use ($value) {
115 115
             yield CoInterface::RETURN_WITH => (yield $value);
116 116
         };
117 117
         $con = Utils::normalize($genfunc, $this->options);
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $this->promiseAll($yieldables, $gc->throwAcceptable())->then(
190 190
             self::getApplier($yielded, $yieldables, [$gc, 'send']),
191 191
             [$gc, 'throw_']
192
-        )->always(function () use ($gc, $deferred) {
192
+        )->always(function() use ($gc, $deferred) {
193 193
             // Continue
194 194
             $this->processGeneratorContainer($gc, $deferred);
195 195
         });
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     private static function getApplier($yielded, $yieldables, callable $next)
205 205
     {
206
-        return function (array $results) use ($yielded, $yieldables, $next) {
206
+        return function(array $results) use ($yielded, $yieldables, $next) {
207 207
             foreach ($results as $hash => $resolved) {
208 208
                 $current = &$yielded;
209 209
                 foreach ($yieldables[$hash]['keylist'] as $key) {
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
             if (!$throw_acceptable) {
233 233
                 $original_dfd = $dfd;
234 234
                 $dfd = new Deferred;
235
-                $absorber = function ($any) use ($original_dfd) {
235
+                $absorber = function($any) use ($original_dfd) {
236 236
                     $original_dfd->resolve($any);
237 237
                 };
238 238
                 $dfd->promise()->then($absorber, $absorber);
Please login to merge, or discard this patch.