[Web] Update composer deps
This commit is contained in:
21
data/web/inc/lib/vendor/nesbot/carbon/readme.md
vendored
21
data/web/inc/lib/vendor/nesbot/carbon/readme.md
vendored
@@ -117,21 +117,28 @@ This project exists thanks to all the people who contribute.
|
||||
|
||||
[Thanks to people helping us to translate Carbon in so many languages](https://carbon.nesbot.com/contribute/translators/)
|
||||
|
||||
### Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Carbon#backer)]
|
||||
|
||||
<a href="https://opencollective.com/Carbon#backers" target="_blank"><img src="https://opencollective.com/Carbon/backers.svg?width=890"></a>
|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Carbon#sponsor)]
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
|
||||
|
||||
<a href="https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme" target="_blank"><img src="https://carbon.nesbot.com/tidelift-brand.png" width="256" height="64"></a>
|
||||
<a href="https://onlinecasinohex.ca/?utm_source=opencollective&utm_medium=github&utm_campaign=Carbon" target="_blank"><img src="https://opencollective.com/Carbon/sponsor/0/avatar.svg" width="192" height="64"></a>
|
||||
<a href="https://opencollective.com/Carbon/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Carbon/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/Carbon/sponsor/1/website" target="_blank"><img src="https://opencollective.com/Carbon/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/Carbon/sponsor/2/website" target="_blank"><img src="https://opencollective.com/Carbon/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/Carbon/sponsor/3/website" target="_blank"><img src="https://opencollective.com/Carbon/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/Carbon/sponsor/4/website" target="_blank"><img src="https://opencollective.com/Carbon/sponsor/4/avatar.svg"></a>
|
||||
|
||||
[[Become a sponsor](https://opencollective.com/Carbon#sponsor)]
|
||||
|
||||
### Backers
|
||||
|
||||
Thank you to all our backers! 🙏
|
||||
|
||||
<a href="https://opencollective.com/Carbon#backers" target="_blank"><img src="https://opencollective.com/Carbon/backers.svg?width=890"></a>
|
||||
|
||||
[[Become a backer](https://opencollective.com/Carbon#backer)]
|
||||
|
||||
## Carbon for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
@@ -1226,6 +1226,25 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*/
|
||||
public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null);
|
||||
|
||||
/**
|
||||
* Create a new Carbon instance from a specific date and time using strict validation.
|
||||
*
|
||||
* @see create()
|
||||
*
|
||||
* @param int|null $year
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param DateTimeZone|string|null $tz
|
||||
*
|
||||
* @throws InvalidFormatException
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null);
|
||||
|
||||
/**
|
||||
* Get/set the day of year.
|
||||
*
|
||||
@@ -2284,7 +2303,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTranslationMessage(string $key, string $locale = null, string $default = null, $translator = null);
|
||||
public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null);
|
||||
|
||||
/**
|
||||
* Returns raw translation message for a given key.
|
||||
@@ -2296,7 +2315,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getTranslationMessageWith($translator, string $key, string $locale = null, string $default = null);
|
||||
public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null);
|
||||
|
||||
/**
|
||||
* Get the default translator instance in use.
|
||||
@@ -2934,7 +2953,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function isoFormat(string $format, string $originalFormat = null): string;
|
||||
public function isoFormat(string $format, ?string $originalFormat = null): string;
|
||||
|
||||
/**
|
||||
* Get/set the week number using given first day of week and first
|
||||
@@ -3066,7 +3085,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return $this|string
|
||||
*/
|
||||
public function locale(string $locale = null, ...$fallbackLocales);
|
||||
public function locale(?string $locale = null, ...$fallbackLocales);
|
||||
|
||||
/**
|
||||
* Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow).
|
||||
@@ -3423,7 +3442,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function ordinal(string $key, string $period = null): string;
|
||||
public function ordinal(string $key, ?string $period = null): string;
|
||||
|
||||
/**
|
||||
* Create a carbon instance from a string.
|
||||
@@ -4737,7 +4756,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function translate(string $key, array $parameters = [], $number = null, \Symfony\Component\Translation\TranslatorInterface $translator = null, bool $altNumbers = false): string;
|
||||
public function translate(string $key, array $parameters = [], $number = null, ?\Symfony\Component\Translation\TranslatorInterface $translator = null, bool $altNumbers = false): string;
|
||||
|
||||
/**
|
||||
* Returns the alternative number for a given integer if available in the current locale.
|
||||
@@ -4907,7 +4926,7 @@ interface CarbonInterface extends DateTimeInterface, JsonSerializable
|
||||
*
|
||||
* @return int|static
|
||||
*/
|
||||
public function utcOffset(int $minuteOffset = null);
|
||||
public function utcOffset(?int $minuteOffset = null);
|
||||
|
||||
/**
|
||||
* Returns the milliseconds timestamps used amongst other by Date javascript objects.
|
||||
|
@@ -27,6 +27,7 @@ use Closure;
|
||||
use DateInterval;
|
||||
use Exception;
|
||||
use ReflectionException;
|
||||
use ReturnTypeWillChange;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -522,6 +523,8 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
$interval = implode($match[1], $interval);
|
||||
}
|
||||
|
||||
$interval = $interval ?? '';
|
||||
|
||||
for ($index = 0; $index < $length; $index++) {
|
||||
$expected = mb_substr($format, $index, 1);
|
||||
$nextCharacter = mb_substr($interval, 0, 1);
|
||||
@@ -963,6 +966,7 @@ class CarbonInterval extends DateInterval implements CarbonConverterInterface
|
||||
*
|
||||
* @link http://php.net/manual/en/dateinterval.createfromdatestring.php
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public static function createFromDateString($time)
|
||||
{
|
||||
$interval = @parent::createFromDateString(strtr($time, [
|
||||
|
@@ -479,7 +479,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
$interval = $part;
|
||||
} elseif ($start === null && $parsed = Carbon::make($part)) {
|
||||
$start = $part;
|
||||
} elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start, $part))) {
|
||||
} elseif ($end === null && $parsed = Carbon::make(static::addMissingParts($start ?? '', $part))) {
|
||||
$end = $part;
|
||||
} else {
|
||||
throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso.");
|
||||
@@ -641,7 +641,7 @@ class CarbonPeriod implements Iterator, Countable, JsonSerializable
|
||||
if ($this->dateInterval === null &&
|
||||
(
|
||||
\is_string($argument) && preg_match(
|
||||
'/^(\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T0-9].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i',
|
||||
'/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T0-9].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i',
|
||||
$argument
|
||||
) ||
|
||||
$argument instanceof DateInterval ||
|
||||
|
@@ -13,8 +13,14 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Types\ConversionException;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* @template T of CarbonInterface
|
||||
*/
|
||||
trait CarbonTypeConverter
|
||||
{
|
||||
/**
|
||||
* @return class-string<T>
|
||||
*/
|
||||
protected function getCarbonClassName(): string
|
||||
{
|
||||
return Carbon::class;
|
||||
@@ -42,6 +48,8 @@ trait CarbonTypeConverter
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return T|null
|
||||
*/
|
||||
public function convertToPHPValue($value, AbstractPlatform $platform)
|
||||
{
|
||||
@@ -78,6 +86,8 @@ trait CarbonTypeConverter
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function convertToDatabaseValue($value, AbstractPlatform $platform)
|
||||
{
|
||||
|
@@ -11,8 +11,12 @@ use Doctrine\DBAL\Types\VarDateTimeImmutableType;
|
||||
|
||||
class DateTimeImmutableType extends VarDateTimeImmutableType implements CarbonDoctrineType
|
||||
{
|
||||
/** @use CarbonTypeConverter<CarbonImmutable> */
|
||||
use CarbonTypeConverter;
|
||||
|
||||
/**
|
||||
* @return class-string<CarbonImmutable>
|
||||
*/
|
||||
protected function getCarbonClassName(): string
|
||||
{
|
||||
return CarbonImmutable::class;
|
||||
|
@@ -6,9 +6,11 @@
|
||||
*/
|
||||
namespace Carbon\Doctrine;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Doctrine\DBAL\Types\VarDateTimeType;
|
||||
|
||||
class DateTimeType extends VarDateTimeType implements CarbonDoctrineType
|
||||
{
|
||||
/** @use CarbonTypeConverter<Carbon> */
|
||||
use CarbonTypeConverter;
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@ use ReflectionMethod;
|
||||
* will be 0.
|
||||
* If one of the set values is not valid, an InvalidDateException
|
||||
* will be thrown.
|
||||
* @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation.
|
||||
* @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather use the ->settings() method.
|
||||
* @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
@@ -76,7 +77,7 @@ use ReflectionMethod;
|
||||
* @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now"
|
||||
* instance is created.
|
||||
* @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision.
|
||||
* @method string getTranslationMessageWith($translator, string $key, string $locale = null, string $default = null) Returns raw translation message for a given key.
|
||||
* @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key.
|
||||
* @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use.
|
||||
* @method int getWeekEndsAt() Get the last day of week
|
||||
* @method int getWeekStartsAt() Get the first day of week
|
||||
|
@@ -51,6 +51,7 @@ use Closure;
|
||||
* will be 0.
|
||||
* If one of the set values is not valid, an InvalidDateException
|
||||
* will be thrown.
|
||||
* @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation.
|
||||
* @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
* You should rather use the ->settings() method.
|
||||
* @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used.
|
||||
@@ -75,7 +76,7 @@ use Closure;
|
||||
* @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now"
|
||||
* instance is created.
|
||||
* @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision.
|
||||
* @method string getTranslationMessageWith($translator, string $key, string $locale = null, string $default = null) Returns raw translation message for a given key.
|
||||
* @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key.
|
||||
* @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use.
|
||||
* @method int getWeekEndsAt() Get the last day of week
|
||||
* @method int getWeekStartsAt() Get the first day of week
|
||||
|
@@ -24,6 +24,7 @@ if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) {
|
||||
* - Serhan Apaydın
|
||||
* - JD Isaacks
|
||||
* - AbadonnaAbbys
|
||||
* - Siomkin Alexander
|
||||
*/
|
||||
return [
|
||||
'year' => ':count год|:count гады|:count гадоў',
|
||||
@@ -35,18 +36,18 @@ return [
|
||||
'week' => ':count тыдзень|:count тыдні|:count тыдняў',
|
||||
'a_week' => '{1}тыдзень|:count тыдзень|:count тыдні|:count тыдняў',
|
||||
'w' => ':count тыдзень|:count тыдні|:count тыдняў',
|
||||
'day' => ':count дзень|:count ні|:count дзён',
|
||||
'a_day' => '{1}дзень|:count дзень|:count ні|:count дзён',
|
||||
'd' => ':count дзень|:count ні|:count дзён',
|
||||
'day' => ':count дзень|:count дні|:count дзён',
|
||||
'a_day' => '{1}дзень|:count дзень|:count дні|:count дзён',
|
||||
'd' => ':count дн',
|
||||
'hour' => ':count гадзіну|:count гадзіны|:count гадзін',
|
||||
'a_hour' => '{1}гадзіна|:count гадзіна|:count гадзіны|:count гадзін',
|
||||
'h' => ':count гадзіна|:count гадзіны|:count гадзін',
|
||||
'minute' => ':count хвіліна|:count хвіліны|:count хвілін',
|
||||
'a_minute' => '{1}хвіліна|:count хвіліна|:count хвіліны|:count хвілін',
|
||||
'min' => ':count хвіліна|:count хвіліны|:count хвілін',
|
||||
'min' => ':count хв',
|
||||
'second' => ':count секунда|:count секунды|:count секунд',
|
||||
'a_second' => '{1}некалькі секунд|:count секунда|:count секунды|:count секунд',
|
||||
's' => ':count секунда|:count секунды|:count секунд',
|
||||
's' => ':count сек',
|
||||
|
||||
'hour_ago' => ':count гадзіну|:count гадзіны|:count гадзін',
|
||||
'a_hour_ago' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін',
|
||||
|
@@ -19,6 +19,7 @@ use Carbon\Exceptions\UnitException;
|
||||
use Closure;
|
||||
use DateTime;
|
||||
use DateTimeImmutable;
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* Trait Converter.
|
||||
@@ -75,6 +76,7 @@ trait Converter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function format($format)
|
||||
{
|
||||
$function = $this->localFormatFunction ?: static::$formatFunction;
|
||||
|
@@ -21,6 +21,7 @@ use Closure;
|
||||
use DateTimeInterface;
|
||||
use DateTimeZone;
|
||||
use Exception;
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* Trait Creator.
|
||||
@@ -477,6 +478,37 @@ trait Creator
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Carbon instance from a specific date and time using strict validation.
|
||||
*
|
||||
* @see create()
|
||||
*
|
||||
* @param int|null $year
|
||||
* @param int|null $month
|
||||
* @param int|null $day
|
||||
* @param int|null $hour
|
||||
* @param int|null $minute
|
||||
* @param int|null $second
|
||||
* @param DateTimeZone|string|null $tz
|
||||
*
|
||||
* @throws InvalidFormatException
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self
|
||||
{
|
||||
$initialStrictMode = static::isStrictModeEnabled();
|
||||
static::useStrictMode(true);
|
||||
|
||||
try {
|
||||
$date = static::create($year, $month, $day, $hour, $minute, $second, $tz);
|
||||
} finally {
|
||||
static::useStrictMode($initialStrictMode);
|
||||
}
|
||||
|
||||
return $date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Carbon instance from just a date. The time portion is set to now.
|
||||
*
|
||||
@@ -657,6 +689,7 @@ trait Creator
|
||||
*
|
||||
* @return static|false
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public static function createFromFormat($format, $time, $tz = null)
|
||||
{
|
||||
$function = static::$createFromFormatFunction;
|
||||
@@ -899,6 +932,7 @@ trait Creator
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public static function getLastErrors()
|
||||
{
|
||||
return static::$lastErrors;
|
||||
|
@@ -31,6 +31,7 @@ use DateTimeInterface;
|
||||
use DateTimeZone;
|
||||
use InvalidArgumentException;
|
||||
use ReflectionException;
|
||||
use ReturnTypeWillChange;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -631,6 +632,7 @@ trait Date
|
||||
*
|
||||
* @link http://php.net/manual/en/datetime.gettimezone.php
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function getTimezone()
|
||||
{
|
||||
return CarbonTimeZone::instance(parent::getTimezone());
|
||||
@@ -737,6 +739,30 @@ trait Date
|
||||
return $date instanceof self ? $date : static::instance($date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Carbon instance passed through, a now instance in UTC
|
||||
* if null given or parse the input if string given (using current timezone
|
||||
* then switching to UTC).
|
||||
*
|
||||
* @param Carbon|DateTimeInterface|string|null $date
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
protected function resolveUTC($date = null): self
|
||||
{
|
||||
if (!$date) {
|
||||
return static::now('UTC');
|
||||
}
|
||||
|
||||
if (\is_string($date)) {
|
||||
return static::parse($date, $this->getTimezone())->utc();
|
||||
}
|
||||
|
||||
static::expectDateTime($date, ['null', 'string']);
|
||||
|
||||
return $date instanceof self ? $date : static::instance($date)->utc();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Carbon instance passed through, a now instance in the same timezone
|
||||
* if null given or parse the input if string given.
|
||||
@@ -1398,6 +1424,7 @@ trait Date
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function setDate($year, $month, $day)
|
||||
{
|
||||
return parent::setDate((int) $year, (int) $month, (int) $day);
|
||||
@@ -1414,6 +1441,7 @@ trait Date
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function setISODate($year, $week, $day = 1)
|
||||
{
|
||||
return parent::setISODate((int) $year, (int) $week, (int) $day);
|
||||
@@ -1449,6 +1477,7 @@ trait Date
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function setTime($hour, $minute, $second = 0, $microseconds = 0)
|
||||
{
|
||||
return parent::setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds);
|
||||
@@ -1463,6 +1492,7 @@ trait Date
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function setTimestamp($unixTimestamp)
|
||||
{
|
||||
[$timestamp, $microseconds] = self::getIntegerAndDecimalParts($unixTimestamp);
|
||||
@@ -1521,6 +1551,7 @@ trait Date
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function setTimezone($value)
|
||||
{
|
||||
return parent::setTimezone(static::safeCreateDateTimeZone($value));
|
||||
|
@@ -19,6 +19,7 @@ use Carbon\Translator;
|
||||
use Closure;
|
||||
use DateInterval;
|
||||
use DateTimeInterface;
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* Trait Difference.
|
||||
@@ -117,6 +118,7 @@ trait Difference
|
||||
*
|
||||
* @return DateInterval
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function diff($date = null, $absolute = false)
|
||||
{
|
||||
return parent::diff($this->resolveCarbon($date), (bool) $absolute);
|
||||
@@ -638,7 +640,7 @@ trait Difference
|
||||
*/
|
||||
public function floatDiffInRealDays($date = null, $absolute = true)
|
||||
{
|
||||
$date = $this->resolveCarbon($date)->utc();
|
||||
$date = $this->resolveUTC($date);
|
||||
$utc = $this->copy()->utc();
|
||||
$hoursDiff = $utc->floatDiffInRealHours($date, $absolute);
|
||||
|
||||
|
@@ -11,6 +11,7 @@
|
||||
namespace Carbon\Traits;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* Trait Modifiers.
|
||||
@@ -429,6 +430,7 @@ trait Modifiers
|
||||
*
|
||||
* @see https://php.net/manual/en/datetime.modify.php
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function modify($modify)
|
||||
{
|
||||
return parent::modify((string) $modify);
|
||||
|
@@ -11,6 +11,7 @@
|
||||
namespace Carbon\Traits;
|
||||
|
||||
use Carbon\Exceptions\InvalidFormatException;
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* Trait Serialization.
|
||||
@@ -91,6 +92,7 @@ trait Serialization
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public static function __set_state($dump)
|
||||
{
|
||||
if (\is_string($dump)) {
|
||||
@@ -125,6 +127,7 @@ trait Serialization
|
||||
/**
|
||||
* Set locale if specified on unserialize() called.
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function __wakeup()
|
||||
{
|
||||
if (get_parent_class() && method_exists(parent::class, '__wakeup')) {
|
||||
|
@@ -16,6 +16,7 @@ use Carbon\CarbonInterval;
|
||||
use Carbon\Exceptions\UnitException;
|
||||
use Closure;
|
||||
use DateInterval;
|
||||
use ReturnTypeWillChange;
|
||||
|
||||
/**
|
||||
* Trait Units.
|
||||
@@ -193,6 +194,7 @@ trait Units
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function add($unit, $value = 1, $overflow = null)
|
||||
{
|
||||
if (\is_string($unit) && \func_num_args() === 1) {
|
||||
@@ -352,6 +354,7 @@ trait Units
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function sub($unit, $value = 1, $overflow = null)
|
||||
{
|
||||
if (\is_string($unit) && \func_num_args() === 1) {
|
||||
|
Reference in New Issue
Block a user