aboutsummaryrefslogtreecommitdiff
path: root/vendor/guzzlehttp/promises/src/EachPromise.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2024-10-10 16:01:54 +0000
committerAndrew Dolgov <fox@fakecake.org>2024-10-10 16:01:54 +0000
commit468f464b486e2ed0527cfd7e80113d37cdd4d07c (patch)
tree60b3243c3796d6a21a349ee7ae8e5c76d5d2717a /vendor/guzzlehttp/promises/src/EachPromise.php
parent7fafad2ac2466b9a17b802d9b29d10056b439e29 (diff)
parent124c4e254250ebac336392711b32dfd6fa3caef3 (diff)
Merge branch 'feature/guzzle-7.9.2' into 'master'
Update Guzzle to 7.9.2 See merge request tt-rss/tt-rss!70
Diffstat (limited to 'vendor/guzzlehttp/promises/src/EachPromise.php')
-rw-r--r--vendor/guzzlehttp/promises/src/EachPromise.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php
index 28dd9793a..e12389818 100644
--- a/vendor/guzzlehttp/promises/src/EachPromise.php
+++ b/vendor/guzzlehttp/promises/src/EachPromise.php
@@ -135,7 +135,7 @@ class EachPromise implements PromisorInterface
// Add only up to N pending promises.
$concurrency = is_callable($this->concurrency)
- ? call_user_func($this->concurrency, count($this->pending))
+ ? ($this->concurrency)(count($this->pending))
: $this->concurrency;
$concurrency = max($concurrency - count($this->pending), 0);
// Concurrency may be set to 0 to disallow new promises.
@@ -170,8 +170,7 @@ class EachPromise implements PromisorInterface
$this->pending[$idx] = $promise->then(
function ($value) use ($idx, $key): void {
if ($this->onFulfilled) {
- call_user_func(
- $this->onFulfilled,
+ ($this->onFulfilled)(
$value,
$key,
$this->aggregate
@@ -181,8 +180,7 @@ class EachPromise implements PromisorInterface
},
function ($reason) use ($idx, $key): void {
if ($this->onRejected) {
- call_user_func(
- $this->onRejected,
+ ($this->onRejected)(
$reason,
$key,
$this->aggregate