You are here

function any in Auth0 Single Sign On 8.2

Like some(), with 1 as count. However, if the promise fulfills, the fulfillment value is not an array of 1 but the value directly.

Parameters

mixed $promises Promises or values.:

Return value

PromiseInterface

File

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

Namespace

GuzzleHttp\Promise

Code

function any($promises) {
  return some(1, $promises)
    ->then(function ($values) {
    return $values[0];
  });
}