Skip to content

Commit 6567d33

Browse files
authored
support-floats-in-carboninterval-helpers (#58006)
1 parent 31d0ce0 commit 6567d33

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Illuminate/Support/functions.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function now($tz = null): CarbonInterface
7070
/**
7171
* Get the current date / time plus the given number of microseconds.
7272
*/
73-
function microseconds(int $microseconds): CarbonInterval
73+
function microseconds(int|float $microseconds): CarbonInterval
7474
{
7575
return CarbonInterval::microseconds($microseconds);
7676
}
@@ -80,7 +80,7 @@ function microseconds(int $microseconds): CarbonInterval
8080
/**
8181
* Get the current date / time plus the given number of milliseconds.
8282
*/
83-
function milliseconds(int $milliseconds): CarbonInterval
83+
function milliseconds(int|float $milliseconds): CarbonInterval
8484
{
8585
return CarbonInterval::milliseconds($milliseconds);
8686
}
@@ -90,7 +90,7 @@ function milliseconds(int $milliseconds): CarbonInterval
9090
/**
9191
* Get the current date / time plus the given number of seconds.
9292
*/
93-
function seconds(int $seconds): CarbonInterval
93+
function seconds(int|float $seconds): CarbonInterval
9494
{
9595
return CarbonInterval::seconds($seconds);
9696
}
@@ -100,7 +100,7 @@ function seconds(int $seconds): CarbonInterval
100100
/**
101101
* Get the current date / time plus the given number of minutes.
102102
*/
103-
function minutes(int $minutes): CarbonInterval
103+
function minutes(int|float $minutes): CarbonInterval
104104
{
105105
return CarbonInterval::minutes($minutes);
106106
}
@@ -110,7 +110,7 @@ function minutes(int $minutes): CarbonInterval
110110
/**
111111
* Get the current date / time plus the given number of hours.
112112
*/
113-
function hours(int $hours): CarbonInterval
113+
function hours(int|float $hours): CarbonInterval
114114
{
115115
return CarbonInterval::hours($hours);
116116
}
@@ -120,7 +120,7 @@ function hours(int $hours): CarbonInterval
120120
/**
121121
* Get the current date / time plus the given number of days.
122122
*/
123-
function days(int $days): CarbonInterval
123+
function days(int|float $days): CarbonInterval
124124
{
125125
return CarbonInterval::days($days);
126126
}

0 commit comments

Comments
 (0)