diff --git a/src/Plugin/Promise/GeocoderFulfilledPromise.php b/src/Plugin/Promise/GeocoderFulfilledPromise.php index a68aaef48..456f66a62 100644 --- a/src/Plugin/Promise/GeocoderFulfilledPromise.php +++ b/src/Plugin/Promise/GeocoderFulfilledPromise.php @@ -36,7 +36,7 @@ public function __construct(Collection $collection) /** * {@inheritdoc} */ - public function then(callable $onFulfilled = null, callable $onRejected = null) + public function then(callable $onFulfilled = null, callable $onRejected = null): Promise { if (null === $onFulfilled) { return $this; @@ -52,13 +52,15 @@ public function then(callable $onFulfilled = null, callable $onRejected = null) /** * {@inheritdoc} */ - public function getState() + public function getState(): string { return Promise::FULFILLED; } /** * {@inheritdoc} + * + * @return mixed */ public function wait($unwrap = true) { diff --git a/src/Plugin/Promise/GeocoderRejectedPromise.php b/src/Plugin/Promise/GeocoderRejectedPromise.php index 40cd4f220..55c2369a1 100644 --- a/src/Plugin/Promise/GeocoderRejectedPromise.php +++ b/src/Plugin/Promise/GeocoderRejectedPromise.php @@ -35,7 +35,7 @@ public function __construct(Exception $exception) /** * {@inheritdoc} */ - public function then(callable $onFulfilled = null, callable $onRejected = null) + public function then(callable $onFulfilled = null, callable $onRejected = null): Promise { if (null === $onRejected) { return $this; @@ -51,13 +51,15 @@ public function then(callable $onFulfilled = null, callable $onRejected = null) /** * {@inheritdoc} */ - public function getState() + public function getState(): string { return Promise::REJECTED; } /** * {@inheritdoc} + * + * @return mixed */ public function wait($unwrap = true) {