From 1c8381803d336bb35c00d364c17cd22ae5ab8355 Mon Sep 17 00:00:00 2001 From: Deeka Wong Date: Thu, 2 Nov 2023 21:58:20 +0800 Subject: [PATCH] Allow `Sleep::until()` to be passed a timestamp as a string (#399) --- src/Sleep.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Sleep.php b/src/Sleep.php index e89841e..dc8dd56 100644 --- a/src/Sleep.php +++ b/src/Sleep.php @@ -134,12 +134,12 @@ public static function for($duration) /** * Sleep until the given timestamp. * - * @param DateTimeInterface|int $timestamp + * @param DateTimeInterface|int|float|numeric-string $timestamp * @return static */ public static function until($timestamp) { - if (is_int($timestamp)) { + if (is_numeric($timestamp)) { $timestamp = Carbon::createFromTimestamp($timestamp); }