Skip to content

Commit 5082ee5

Browse files
Removed remaining usage of deprecated function
1 parent 666fdca commit 5082ee5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Each.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static function ofLimitAll(
7878
$concurrency,
7979
callable $onFulfilled = null
8080
) {
81-
return each_limit(
81+
return self::ofLimit(
8282
$iterable,
8383
$concurrency,
8484
$onFulfilled,

src/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public static function inspectAll($promises)
107107
{
108108
$results = [];
109109
foreach ($promises as $key => $promise) {
110-
$results[$key] = inspect($promise);
110+
$results[$key] = self::inspect($promise);
111111
}
112112

113113
return $results;

tests/UtilsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public function testReturnsTrampoline()
239239
public function testCanScheduleThunk()
240240
{
241241
$tramp = P\Utils::queue();
242-
$promise = P\task(function () { return 'Hi!'; });
242+
$promise = P\Utils::task(function () { return 'Hi!'; });
243243
$c = null;
244244
$promise->then(function ($v) use (&$c) { $c = $v; });
245245
$this->assertNull($c);
@@ -250,7 +250,7 @@ public function testCanScheduleThunk()
250250
public function testCanScheduleThunkWithRejection()
251251
{
252252
$tramp = P\Utils::queue();
253-
$promise = P\task(function () { throw new \Exception('Hi!'); });
253+
$promise = P\Utils::task(function () { throw new \Exception('Hi!'); });
254254
$c = null;
255255
$promise->otherwise(function ($v) use (&$c) { $c = $v; });
256256
$this->assertNull($c);
@@ -261,7 +261,7 @@ public function testCanScheduleThunkWithRejection()
261261
public function testCanScheduleThunkWithWait()
262262
{
263263
$tramp = P\Utils::queue();
264-
$promise = P\task(function () { return 'a'; });
264+
$promise = P\Utils::task(function () { return 'a'; });
265265
$this->assertSame('a', $promise->wait());
266266
$tramp->run();
267267
}

0 commit comments

Comments
 (0)