From 8bec661288b276c98bdb0e773e5f4d5275dc4c87 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 20 Oct 2023 16:44:35 +0300 Subject: update AWK SDK --- vendor/guzzlehttp/promises/src/Create.php | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'vendor/guzzlehttp/promises/src/Create.php') diff --git a/vendor/guzzlehttp/promises/src/Create.php b/vendor/guzzlehttp/promises/src/Create.php index 8d038e9..9d3fc4a 100644 --- a/vendor/guzzlehttp/promises/src/Create.php +++ b/vendor/guzzlehttp/promises/src/Create.php @@ -1,5 +1,7 @@ then([$promise, 'resolve'], [$promise, 'reject']); + return $promise; } @@ -34,10 +35,8 @@ final class Create * If the provided reason is a promise, then it is returned as-is. * * @param mixed $reason Promise or reason. - * - * @return PromiseInterface */ - public static function rejectionFor($reason) + public static function rejectionFor($reason): PromiseInterface { if ($reason instanceof PromiseInterface) { return $reason; @@ -50,12 +49,10 @@ final class Create * Create an exception for a rejected promise value. * * @param mixed $reason - * - * @return \Exception|\Throwable */ - public static function exceptionFor($reason) + public static function exceptionFor($reason): \Throwable { - if ($reason instanceof \Exception || $reason instanceof \Throwable) { + if ($reason instanceof \Throwable) { return $reason; } @@ -66,10 +63,8 @@ final class Create * Returns an iterator for the given value. * * @param mixed $value - * - * @return \Iterator */ - public static function iterFor($value) + public static function iterFor($value): \Iterator { if ($value instanceof \Iterator) { return $value; -- cgit v1.2.3