You are here

function is_rejected in Lockr 7.3

Returns true if a promise is rejected.

Parameters

PromiseInterface $promise:

Return value

bool

File

vendor/guzzlehttp/promises/src/functions.php, line 430

Namespace

GuzzleHttp\Promise

Code

function is_rejected(PromiseInterface $promise) {
  return $promise
    ->getState() === PromiseInterface::REJECTED;
}