summaryrefslogtreecommitdiff
path: root/server/vendor/guzzlehttp/promises/src/functions.php
diff options
context:
space:
mode:
authorEoleDev <root@serverpc.home>2016-03-09 16:17:33 +0100
committerEoleDev <root@serverpc.home>2016-03-09 16:17:33 +0100
commit2b8decb81faeb7928bcbfda84c6f33a003f707fd (patch)
tree0e491d7ae2bf91347b1cf50d2c475625d8f659b4 /server/vendor/guzzlehttp/promises/src/functions.php
parentb7ebe1272c1127df290535af2430622b28160bb0 (diff)
parent03ef74d0cfe675a6e18a91f039182ca1b248d8f5 (diff)
Maj Library
Diffstat (limited to 'server/vendor/guzzlehttp/promises/src/functions.php')
-rw-r--r--server/vendor/guzzlehttp/promises/src/functions.php8
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);