diff options
Diffstat (limited to 'vendor/guzzlehttp/promises/src/Is.php')
-rw-r--r-- | vendor/guzzlehttp/promises/src/Is.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/vendor/guzzlehttp/promises/src/Is.php b/vendor/guzzlehttp/promises/src/Is.php index c3ed8d0..f3f0503 100644 --- a/vendor/guzzlehttp/promises/src/Is.php +++ b/vendor/guzzlehttp/promises/src/Is.php @@ -1,45 +1,39 @@ <?php +declare(strict_types=1); + namespace GuzzleHttp\Promise; final class Is { /** * Returns true if a promise is pending. - * - * @return bool */ - public static function pending(PromiseInterface $promise) + public static function pending(PromiseInterface $promise): bool { return $promise->getState() === PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled or rejected. - * - * @return bool */ - public static function settled(PromiseInterface $promise) + public static function settled(PromiseInterface $promise): bool { return $promise->getState() !== PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled. - * - * @return bool */ - public static function fulfilled(PromiseInterface $promise) + public static function fulfilled(PromiseInterface $promise): bool { return $promise->getState() === PromiseInterface::FULFILLED; } /** * Returns true if a promise is rejected. - * - * @return bool */ - public static function rejected(PromiseInterface $promise) + public static function rejected(PromiseInterface $promise): bool { return $promise->getState() === PromiseInterface::REJECTED; } |