File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,13 +33,13 @@ public function resolve($value = null): void
3333 {
3434 $ this ->promise ();
3535
36- \call_user_func ($ this ->resolveCallback , $ value );
36+ ($ this ->resolveCallback )( $ value );
3737 }
3838
3939 public function reject (\Throwable $ reason ): void
4040 {
4141 $ this ->promise ();
4242
43- \call_user_func ($ this ->rejectCallback , $ reason );
43+ ($ this ->rejectCallback )( $ reason );
4444 }
4545}
Original file line number Diff line number Diff line change @@ -15,21 +15,21 @@ public function __construct(array $callbacks)
1515
1616 public function promise (): ?PromiseInterface
1717 {
18- return call_user_func_array ($ this ->callbacks ['promise ' ], func_get_args ());
18+ return ($ this ->callbacks ['promise ' ])(... func_get_args ());
1919 }
2020
2121 public function resolve (): ?PromiseInterface
2222 {
23- return call_user_func_array ($ this ->callbacks ['resolve ' ], func_get_args ());
23+ return ($ this ->callbacks ['resolve ' ])(... func_get_args ());
2424 }
2525
2626 public function reject (): ?PromiseInterface
2727 {
28- return call_user_func_array ($ this ->callbacks ['reject ' ], func_get_args ());
28+ return ($ this ->callbacks ['reject ' ])(... func_get_args ());
2929 }
3030
3131 public function settle (): ?PromiseInterface
3232 {
33- return call_user_func_array ($ this ->callbacks ['settle ' ], func_get_args ());
33+ return ($ this ->callbacks ['settle ' ])(... func_get_args ());
3434 }
3535}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public function cancel()
2222 $ this ->cancelCalled = true ;
2323
2424 if (is_callable ($ this ->onCancel )) {
25- call_user_func ($ this ->onCancel );
25+ ($ this ->onCancel )( );
2626 }
2727 }
2828}
You can’t perform that action at this time.
0 commit comments