@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | $seed = $chain = Promise::deferred(); |
49 | 49 | |
50 | 50 | foreach ($this->layers as $idx => $layer) { |
51 | - $chain = $chain->then(static function ($data) use ($ctx, $layer, $idx) { |
|
51 | + $chain = $chain->then(static function($data) use ($ctx, $layer, $idx) { |
|
52 | 52 | return $layer->inbound($data, $ctx->set(self::XID, $idx)); |
53 | - }, static function (Throwable $e) use ($ctx, $layer, $idx) { |
|
53 | + }, static function(Throwable $e) use ($ctx, $layer, $idx) { |
|
54 | 54 | if (($ctx->get(self::XID) ?? 999) >= $idx) { |
55 | 55 | $layer->exception($e, $ctx); |
56 | 56 | } else { |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | $replies = array_reverse($this->layers); |
69 | 69 | |
70 | 70 | foreach ($replies as $idx => $layer) { |
71 | - $chain = $chain->then(static function ($data) use ($ctx, $layer) { |
|
71 | + $chain = $chain->then(static function($data) use ($ctx, $layer) { |
|
72 | 72 | return $layer->outbound($data, $ctx); |
73 | - }, static function (Throwable $e) use ($ctx, $layer, $idx, $size) { |
|
73 | + }, static function(Throwable $e) use ($ctx, $layer, $idx, $size) { |
|
74 | 74 | if (($ctx->get(self::XID) ?? 999) >= ($size - $idx - 1)) { |
75 | 75 | $layer->exception($e, $ctx); |
76 | 76 | } else { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function handler() : Closure |
91 | 91 | { |
92 | - return function ($initial, Context $ctx = null) { |
|
92 | + return function($initial, Context $ctx = null) { |
|
93 | 93 | try { |
94 | 94 | return $this->processing($ctx ?? new Context, $initial); |
95 | 95 | } catch (Throwable $e) { |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | $begin = microtime(true); |
31 | 31 | |
32 | -for ($r = 0; $r < 102400; $r ++) { |
|
32 | +for ($r = 0; $r < 102400; $r++) { |
|
33 | 33 | $layers->handler()($r); |
34 | 34 | } |
35 | 35 |