@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | if (!self::$self) { |
| 84 | 84 | throw new \BadMethodCallException( |
| 85 | - 'Co::async() must be called along with Co::wait(). ' . |
|
| 85 | + 'Co::async() must be called along with Co::wait(). '. |
|
| 86 | 86 | 'This method is mainly expected to be used in CURLOPT_WRITEFUNCTION callback.' |
| 87 | 87 | ); |
| 88 | 88 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $return = $exception = null; |
| 106 | 106 | $deferred = new Deferred; |
| 107 | 107 | // For convenience, all values are wrapped into generator |
| 108 | - $genfunc = function () use ($value, &$return) { |
|
| 108 | + $genfunc = function() use ($value, &$return) { |
|
| 109 | 109 | try { |
| 110 | 110 | $return = (yield $value); |
| 111 | 111 | } catch (\RuntimeException $e) { |
@@ -163,9 +163,9 @@ discard block |
||
| 163 | 163 | if ($gc->key() === CoInterface::DELAY) { |
| 164 | 164 | $dfd = new Deferred; |
| 165 | 165 | $this->pool->addDelay($gc->current(), $dfd); |
| 166 | - $dfd->promise()->then(function () use ($gc) { |
|
| 166 | + $dfd->promise()->then(function() use ($gc) { |
|
| 167 | 167 | $gc->send(null); |
| 168 | - })->always(function () use ($gc, $deferred) { |
|
| 168 | + })->always(function() use ($gc, $deferred) { |
|
| 169 | 169 | $this->processGeneratorContainer($gc, $deferred); |
| 170 | 170 | }); |
| 171 | 171 | return; |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | $this->promiseAll($yieldables, $gc->throwAcceptable())->then( |
| 196 | 196 | self::getApplier($yielded, $yieldables, [$gc, 'send']), |
| 197 | 197 | [$gc, 'throw_'] |
| 198 | - )->always(function () use ($gc, $deferred) { |
|
| 198 | + )->always(function() use ($gc, $deferred) { |
|
| 199 | 199 | // Continue |
| 200 | 200 | $this->processGeneratorContainer($gc, $deferred); |
| 201 | 201 | }); |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | */ |
| 210 | 210 | private static function getApplier($yielded, $yieldables, callable $next) |
| 211 | 211 | { |
| 212 | - return function (array $results) use ($yielded, $yieldables, $next) { |
|
| 212 | + return function(array $results) use ($yielded, $yieldables, $next) { |
|
| 213 | 213 | foreach ($results as $hash => $resolved) { |
| 214 | 214 | $current = &$yielded; |
| 215 | 215 | foreach ($yieldables[$hash]['keylist'] as $key) { |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | if (!$throw_acceptable) { |
| 239 | 239 | $original_dfd = $dfd; |
| 240 | 240 | $dfd = new Deferred; |
| 241 | - $absorber = function ($any) use ($original_dfd) { |
|
| 241 | + $absorber = function($any) use ($original_dfd) { |
|
| 242 | 242 | $original_dfd->resolve($any); |
| 243 | 243 | }; |
| 244 | 244 | $dfd->promise()->then($absorber, $absorber); |