function rejection_for in Auth0 Single Sign On 8.2
Creates a rejected promise for a reason if the reason is not a promise. If the provided reason is a promise, then it is returned as-is.
Parameters
mixed $reason Promise or reason.:
Return value
1 call to rejection_for()
- Promise::then in vendor/
guzzlehttp/ promises/ src/ Promise.php - Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler.
File
- vendor/
guzzlehttp/ promises/ src/ functions.php, line 92
Namespace
GuzzleHttp\PromiseCode
function rejection_for($reason) {
if ($reason instanceof PromiseInterface) {
return $reason;
}
return new RejectedPromise($reason);
}