File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,13 @@ public function resolve($value = null): void
33
33
{
34
34
$ this ->promise ();
35
35
36
- \call_user_func ($ this ->resolveCallback , $ value );
36
+ ($ this ->resolveCallback )( $ value );
37
37
}
38
38
39
39
public function reject (\Throwable $ reason ): void
40
40
{
41
41
$ this ->promise ();
42
42
43
- \call_user_func ($ this ->rejectCallback , $ reason );
43
+ ($ this ->rejectCallback )( $ reason );
44
44
}
45
45
}
Original file line number Diff line number Diff line change @@ -15,21 +15,21 @@ public function __construct(array $callbacks)
15
15
16
16
public function promise (): ?PromiseInterface
17
17
{
18
- return call_user_func_array ($ this ->callbacks ['promise ' ], func_get_args ());
18
+ return ($ this ->callbacks ['promise ' ])(... func_get_args ());
19
19
}
20
20
21
21
public function resolve (): ?PromiseInterface
22
22
{
23
- return call_user_func_array ($ this ->callbacks ['resolve ' ], func_get_args ());
23
+ return ($ this ->callbacks ['resolve ' ])(... func_get_args ());
24
24
}
25
25
26
26
public function reject (): ?PromiseInterface
27
27
{
28
- return call_user_func_array ($ this ->callbacks ['reject ' ], func_get_args ());
28
+ return ($ this ->callbacks ['reject ' ])(... func_get_args ());
29
29
}
30
30
31
31
public function settle (): ?PromiseInterface
32
32
{
33
- return call_user_func_array ($ this ->callbacks ['settle ' ], func_get_args ());
33
+ return ($ this ->callbacks ['settle ' ])(... func_get_args ());
34
34
}
35
35
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function cancel()
22
22
$ this ->cancelCalled = true ;
23
23
24
24
if (is_callable ($ this ->onCancel )) {
25
- call_user_func ($ this ->onCancel );
25
+ ($ this ->onCancel )( );
26
26
}
27
27
}
28
28
}
You can’t perform that action at this time.
0 commit comments