mirror of
https://github.com/itflow-org/itflow
synced 2026-06-16 23:01:04 +00:00
Allow PHP-8.2 and up Compatibility instead of just PHP-8.4
This commit is contained in:
108
plugins/vendor/illuminate/support/functions.php
vendored
108
plugins/vendor/illuminate/support/functions.php
vendored
@@ -2,8 +2,11 @@
|
||||
|
||||
namespace Illuminate\Support;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Carbon\CarbonInterval;
|
||||
use Illuminate\Support\Defer\DeferredCallback;
|
||||
use Illuminate\Support\Defer\DeferredCallbackCollection;
|
||||
use Illuminate\Support\Facades\Date;
|
||||
use Symfony\Component\Process\PhpExecutableFinder;
|
||||
|
||||
if (! function_exists('Illuminate\Support\defer')) {
|
||||
@@ -47,3 +50,108 @@ if (! function_exists('Illuminate\Support\artisan_binary')) {
|
||||
return defined('ARTISAN_BINARY') ? ARTISAN_BINARY : 'artisan';
|
||||
}
|
||||
}
|
||||
|
||||
// Time functions...
|
||||
|
||||
if (! function_exists('Illuminate\Support\now')) {
|
||||
/**
|
||||
* Create a new Carbon instance for the current time.
|
||||
*
|
||||
* @param \DateTimeZone|\UnitEnum|string|null $tz
|
||||
* @return \Illuminate\Support\Carbon
|
||||
*/
|
||||
function now($tz = null): CarbonInterface
|
||||
{
|
||||
return Date::now(enum_value($tz));
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\microseconds')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of microseconds.
|
||||
*/
|
||||
function microseconds(int|float $microseconds): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::microseconds($microseconds);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\milliseconds')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of milliseconds.
|
||||
*/
|
||||
function milliseconds(int|float $milliseconds): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::milliseconds($milliseconds);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\seconds')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of seconds.
|
||||
*/
|
||||
function seconds(int|float $seconds): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::seconds($seconds);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\minutes')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of minutes.
|
||||
*/
|
||||
function minutes(int|float $minutes): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::minutes($minutes);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\hours')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of hours.
|
||||
*/
|
||||
function hours(int|float $hours): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::hours($hours);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\days')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of days.
|
||||
*/
|
||||
function days(int|float $days): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::days($days);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\weeks')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of weeks.
|
||||
*/
|
||||
function weeks(int $weeks): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::weeks($weeks);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\months')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of months.
|
||||
*/
|
||||
function months(int $months): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::months($months);
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('Illuminate\Support\years')) {
|
||||
/**
|
||||
* Get the current date / time plus the given number of years.
|
||||
*/
|
||||
function years(int $years): CarbonInterval
|
||||
{
|
||||
return CarbonInterval::years($years);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user