From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- vendor/sabre/event/lib/Promise/functions.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'vendor/sabre/event/lib/Promise') diff --git a/vendor/sabre/event/lib/Promise/functions.php b/vendor/sabre/event/lib/Promise/functions.php index 3604b8aaa..275492cbc 100644 --- a/vendor/sabre/event/lib/Promise/functions.php +++ b/vendor/sabre/event/lib/Promise/functions.php @@ -1,14 +1,15 @@ -error( + )->otherwise( function($reason) use ($fail) { $fail($reason); } @@ -66,9 +71,8 @@ function all(array $promises) { * that first promise. * * @param Promise[] $promises - * @return Promise */ -function race(array $promises) { +function race(array $promises) : Promise { return new Promise(function($success, $fail) use ($promises) { @@ -106,9 +110,8 @@ function race(array $promises) { * promise and eventually get the same state as the followed promise. * * @param mixed $value - * @return Promise */ -function resolve($value) { +function resolve($value) : Promise { if ($value instanceof Promise) { return $value->then(); @@ -122,11 +125,8 @@ function resolve($value) { /** * Returns a Promise that will reject with the given reason. - * - * @param mixed $reason - * @return Promise */ -function reject($reason) { +function reject(Throwable $reason) : Promise { $promise = new Promise(); $promise->reject($reason); -- cgit v1.2.3