Skip to content

[12.x] Fix type hints for DateTimeZone and DateTimeInterface on DateFactory #55243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/Illuminate/Support/DateFactory.php
Original file line number Diff line number Diff line change
@@ -17,9 +17,9 @@
* @method \Illuminate\Support\Carbon|null createFromLocaleFormat(string $format, string $locale, string $time, $timezone = null)
* @method \Illuminate\Support\Carbon|null createFromLocaleIsoFormat(string $format, string $locale, string $time, $timezone = null)
* @method \Illuminate\Support\Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimeString(string $time, DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimestamp(string|int|float $timestamp, DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimestampMs(string|int|float $timestamp, DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimeString(string $time, \DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimestamp(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimestampMs(string|int|float $timestamp, \DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon createFromTimestampMsUTC($timestamp)
* @method \Illuminate\Support\Carbon createFromTimestampUTC(string|int|float $timestamp)
* @method \Illuminate\Support\Carbon createMidnightDate($year = null, $month = null, $day = null, $timezone = null)
@@ -51,7 +51,7 @@
* @method bool hasMacro($name)
* @method bool hasRelativeKeywords(?string $time)
* @method bool hasTestNow()
* @method \Illuminate\Support\Carbon instance(DateTimeInterface $date)
* @method \Illuminate\Support\Carbon instance(\DateTimeInterface $date)
* @method bool isImmutable()
* @method bool isModifiableUnit($unit)
* @method bool isMutable()
@@ -62,14 +62,14 @@
* @method bool localeHasPeriodSyntax($locale)
* @method bool localeHasShortUnits(string $locale)
* @method void macro(string $name, ?callable $macro)
* @method \Illuminate\Support\Carbon|null make($var, DateTimeZone|string|null $timezone = null)
* @method \Illuminate\Support\Carbon|null make($var, \DateTimeZone|string|null $timezone = null)
* @method void mixin(object|string $mixin)
* @method \Illuminate\Support\Carbon now(DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon parse(DateTimeInterface|WeekDay|Month|string|int|float|null $time, DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon parseFromLocale(string $time, ?string $locale = null, DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon now(\DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon parse(\DateTimeInterface|WeekDay|Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon parseFromLocale(string $time, ?string $locale = null, \DateTimeZone|string|int|null $timezone = null)
* @method string pluralUnit(string $unit)
* @method \Illuminate\Support\Carbon|null rawCreateFromFormat(string $format, string $time, $timezone = null)
* @method \Illuminate\Support\Carbon rawParse(DateTimeInterface|WeekDay|Month|string|int|float|null $time, DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon rawParse(\DateTimeInterface|WeekDay|Month|string|int|float|null $time, \DateTimeZone|string|int|null $timezone = null)
* @method void resetMonthsOverflow()
* @method void resetToStringFormat()
* @method void resetYearsOverflow()
@@ -89,16 +89,16 @@
* @method bool shouldOverflowYears()
* @method string singularUnit(string $unit)
* @method void sleep(int|float $seconds)
* @method \Illuminate\Support\Carbon today(DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon tomorrow(DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon today(\DateTimeZone|string|int|null $timezone = null)
* @method \Illuminate\Support\Carbon tomorrow(\DateTimeZone|string|int|null $timezone = null)
* @method string translateTimeString(string $timeString, ?string $from = null, ?string $to = null, int $mode = CarbonInterface::TRANSLATE_ALL)
* @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null)
* @method void useMonthsOverflow($monthsOverflow = true)
* @method void useStrictMode($strictModeEnabled = true)
* @method void useYearsOverflow($yearsOverflow = true)
* @method mixed withTestNow(mixed $testNow, callable $callback)
* @method static withTimeZone(DateTimeZone|string|int|null $timezone)
* @method \Illuminate\Support\Carbon yesterday(DateTimeZone|string|int|null $timezone = null)
* @method static withTimeZone(\DateTimeZone|string|int|null $timezone)
* @method \Illuminate\Support\Carbon yesterday(\DateTimeZone|string|int|null $timezone = null)
*/
class DateFactory
{