function RejectedPromise::finally
Overrides PromiseInterface::finally
1 call to RejectedPromise::finally()
- RejectedPromise::always in vendor/
react/ promise/ src/ Internal/ RejectedPromise.php
File
-
vendor/
react/ promise/ src/ Internal/ RejectedPromise.php, line 97
Class
- RejectedPromise
- @internal
Namespace
React\Promise\InternalCode
public function finally(callable $onFulfilledOrRejected) : PromiseInterface {
return $this->then(null, function (\Throwable $reason) use ($onFulfilledOrRejected) : PromiseInterface {
return resolve($onFulfilledOrRejected())->then(function () use ($reason) : PromiseInterface {
return new RejectedPromise($reason);
});
});
}