diff options
| author | EoleDev <root@serverpc.home> | 2016-03-09 16:03:46 +0100 |
|---|---|---|
| committer | EoleDev <root@serverpc.home> | 2016-03-09 16:03:46 +0100 |
| commit | 03ef74d0cfe675a6e18a91f039182ca1b248d8f5 (patch) | |
| tree | b1668c59fdbf9cb0b0a3da52bfc79e393a953573 /server/vendor/guzzlehttp/promises/src/functions.php | |
| parent | 1d3ed3af6d57316640c143002ddf80d61e6c098a (diff) | |
MAJ Librarys
Diffstat (limited to 'server/vendor/guzzlehttp/promises/src/functions.php')
| -rw-r--r-- | server/vendor/guzzlehttp/promises/src/functions.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/vendor/guzzlehttp/promises/src/functions.php b/server/vendor/guzzlehttp/promises/src/functions.php index 89c6569..2fe61b7 100644 --- a/server/vendor/guzzlehttp/promises/src/functions.php +++ b/server/vendor/guzzlehttp/promises/src/functions.php @@ -146,9 +146,9 @@ function inspect(PromiseInterface $promise) 'value' => $promise->wait() ]; } catch (RejectionException $e) { - return ['state' => 'rejected', 'reason' => $e->getReason()]; + return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; } catch (\Exception $e) { - return ['state' => 'rejected', 'reason' => $e]; + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; } } @@ -304,10 +304,10 @@ function settle($promises) return each( $promises, function ($value, $idx) use (&$results) { - $results[$idx] = ['state' => 'fulfilled', 'value' => $value]; + $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; }, function ($reason, $idx) use (&$results) { - $results[$idx] = ['state' => 'rejected', 'reason' => $reason]; + $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; } )->then(function () use (&$results) { ksort($results); |
