@@ -31,7 +31,7 @@ |
||
31 | 31 | /** |
32 | 32 | * Store a value into task queueing stack. |
33 | 33 | * |
34 | - * @param \Closure|array $handler |
|
34 | + * @param \Closure $handler |
|
35 | 35 | * @param mixed $value |
36 | 36 | */ |
37 | 37 | public function store($handler, $value = []) |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use TaskQueue\TaskQueue; |
6 | 6 | use TaskQueue\Invoker\FunctionInvoker; |
7 | 7 | use TaskQueue\Invoker\MethodInvoker; |
8 | -use DependencyInjection\Container; |
|
9 | 8 | |
10 | 9 | /** |
11 | 10 | * @author Paulus Gandung Prakosa <[email protected]> |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $q = new Promise(); |
33 | 33 | $value = $this->value; |
34 | 34 | |
35 | - Context\ContextStack::create()->store(static function () use ($q, $value, $onFulfilled) { |
|
35 | + Context\ContextStack::create()->store(static function() use ($q, $value, $onFulfilled) { |
|
36 | 36 | if ($q->currentState() === self::STATE_PENDING) { |
37 | 37 | try { |
38 | 38 | $q->resolve($onFulfilled($value)); |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $index = $this->state === self::STATE_FULFILLED ? 1 : 2; |
246 | 246 | |
247 | 247 | Context\ContextStack::create()->store( |
248 | - static function () use ($index, $context, $value) { |
|
248 | + static function() use ($index, $context, $value) { |
|
249 | 249 | foreach ($context as $c) { |
250 | 250 | self::invokeContext($c, $index, $value); |
251 | 251 | } |
@@ -256,12 +256,12 @@ discard block |
||
256 | 256 | $value->context = array_merge($value->context, $context); |
257 | 257 | } else { |
258 | 258 | $value->then( |
259 | - static function ($value) use ($context) { |
|
259 | + static function($value) use ($context) { |
|
260 | 260 | foreach ($context as $c) { |
261 | 261 | self::invokeContext($c, 1, $value); |
262 | 262 | } |
263 | 263 | }, |
264 | - static function ($reason) use ($context) { |
|
264 | + static function($reason) use ($context) { |
|
265 | 265 | foreach ($context as $c) { |
266 | 266 | self::invokeContext($c, 2, $reason); |
267 | 267 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | $q = new Promise(); |
30 | 30 | $reason = $this->reason; |
31 | 31 | |
32 | - Context\ContextStack::create()->store(static function () use ($q, $reason, $onRejected) { |
|
32 | + Context\ContextStack::create()->store(static function() use ($q, $reason, $onRejected) { |
|
33 | 33 | if ($q->currentState() === self::STATE_PENDING) { |
34 | 34 | try { |
35 | 35 | $q->resolve($onRejected($reason)); |