Skip to content

Commit d85146f

Browse files
committed
Leverage First-class callable syntax
1 parent 50aa1c3 commit d85146f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Response/AmpResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ private static function select(ClientState $multi, float $timeout): int
207207
$timeout += microtime(true);
208208
self::$delay = Loop::defer(static function () use ($timeout) {
209209
if (0 < $timeout -= microtime(true)) {
210-
self::$delay = Loop::delay(ceil(1000 * $timeout), [Loop::class, 'stop']);
210+
self::$delay = Loop::delay(ceil(1000 * $timeout), Loop::stop(...));
211211
} else {
212212
Loop::stop();
213213
}
@@ -447,6 +447,6 @@ private static function stopLoop(): void
447447
self::$delay = null;
448448
}
449449

450-
Loop::defer([Loop::class, 'stop']);
450+
Loop::defer(Loop::stop(...));
451451
}
452452
}

0 commit comments

Comments
 (0)