Skip to content

Commit

Permalink
Removed remaining usage of deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed May 21, 2023
1 parent 666fdca commit 5082ee5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Each.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static function ofLimitAll(
$concurrency,
callable $onFulfilled = null
) {
return each_limit(
return self::ofLimit(
$iterable,
$concurrency,
$onFulfilled,
Expand Down
2 changes: 1 addition & 1 deletion src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static function inspectAll($promises)
{
$results = [];
foreach ($promises as $key => $promise) {
$results[$key] = inspect($promise);
$results[$key] = self::inspect($promise);
}

return $results;
Expand Down
6 changes: 3 additions & 3 deletions tests/UtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public function testReturnsTrampoline()
public function testCanScheduleThunk()
{
$tramp = P\Utils::queue();
$promise = P\task(function () { return 'Hi!'; });
$promise = P\Utils::task(function () { return 'Hi!'; });
$c = null;
$promise->then(function ($v) use (&$c) { $c = $v; });
$this->assertNull($c);
Expand All @@ -250,7 +250,7 @@ public function testCanScheduleThunk()
public function testCanScheduleThunkWithRejection()
{
$tramp = P\Utils::queue();
$promise = P\task(function () { throw new \Exception('Hi!'); });
$promise = P\Utils::task(function () { throw new \Exception('Hi!'); });
$c = null;
$promise->otherwise(function ($v) use (&$c) { $c = $v; });
$this->assertNull($c);
Expand All @@ -261,7 +261,7 @@ public function testCanScheduleThunkWithRejection()
public function testCanScheduleThunkWithWait()
{
$tramp = P\Utils::queue();
$promise = P\task(function () { return 'a'; });
$promise = P\Utils::task(function () { return 'a'; });
$this->assertSame('a', $promise->wait());
$tramp->run();
}
Expand Down

0 comments on commit 5082ee5

Please sign in to comment.