Skip to content
Open
Show file tree
Hide file tree
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
34 changes: 17 additions & 17 deletions ext/date/php_date.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ public static function __set_state(array $array): DateTime {}
/** @tentative-return-type */
public static function createFromImmutable(DateTimeImmutable $object): static {}

/** @return static */
public static function createFromInterface(DateTimeInterface $object): DateTime {} // TODO return type should be static
/** @tentative-return-type */
public static function createFromInterface(DateTimeInterface $object): static {}

/**
* @tentative-return-type
Expand Down Expand Up @@ -462,7 +462,7 @@ public function __unserialize(array $data): void {}
public function __wakeup(): void {}

/** @tentative-return-type */
public static function __set_state(array $array): DateTimeImmutable {}
public static function __set_state(array $array): static {}

/**
* @tentative-return-type
Expand Down Expand Up @@ -517,44 +517,44 @@ public function diff(DateTimeInterface $targetObject, bool $absolute = false): D

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::modify() does not modify the object itself")]
public function modify(string $modifier): DateTimeImmutable {}
public function modify(string $modifier): static {}

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::add() does not modify the object itself")]
public function add(DateInterval $interval): DateTimeImmutable {}
public function add(DateInterval $interval): static {}

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::sub() does not modify the object itself")]
public function sub(DateInterval $interval): DateTimeImmutable {}
public function sub(DateInterval $interval): static {}

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::setTimezone() does not modify the object itself")]
public function setTimezone(DateTimeZone $timezone): DateTimeImmutable {}
public function setTimezone(DateTimeZone $timezone): static {}

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::setTime() does not modify the object itself")]
public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0): DateTimeImmutable {}
public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0): static {}

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::setDate() does not modify the object itself")]
public function setDate(int $year, int $month, int $day): DateTimeImmutable {}
public function setDate(int $year, int $month, int $day): static {}

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::setISODate() does not modify the object itself")]
public function setISODate(int $year, int $week, int $dayOfWeek = 1): DateTimeImmutable {}
public function setISODate(int $year, int $week, int $dayOfWeek = 1): static {}

/** @tentative-return-type */
#[\NoDiscard(message: "as DateTimeImmutable::setTimestamp() does not modify the object itself")]
public function setTimestamp(int $timestamp): DateTimeImmutable {}
public function setTimestamp(int $timestamp): static {}

#[\NoDiscard(message: "as DateTimeImmutable::setMicrosecond() does not modify the object itself")]
public function setMicrosecond(int $microsecond): static {}

/** @tentative-return-type */
public static function createFromMutable(DateTime $object): static {}

/** @return static */
public static function createFromInterface(DateTimeInterface $object): DateTimeImmutable {} // TODO return type should be static
/** @tentative-return-type */
public static function createFromInterface(DateTimeInterface $object): static {}
}

class DateTimeZone
Expand Down Expand Up @@ -639,7 +639,7 @@ public function __unserialize(array $data): void {}
public function __wakeup(): void {}

/** @tentative-return-type */
public static function __set_state(array $array): DateTimeZone {}
public static function __set_state(array $array): static {}
}

class DateInterval
Expand All @@ -649,7 +649,7 @@ public function __construct(string $duration) {}
/**
* @tentative-return-type
*/
public static function createFromDateString(string $datetime): DateInterval {}
public static function createFromDateString(string $datetime): static {}

/**
* @tentative-return-type
Expand All @@ -666,7 +666,7 @@ public function __unserialize(array $data): void;
public function __wakeup(): void {}

/** @tentative-return-type */
public static function __set_state(array $array): DateInterval {}
public static function __set_state(array $array): static {}
}

class DatePeriod implements IteratorAggregate
Expand Down Expand Up @@ -743,7 +743,7 @@ public function __unserialize(array $data): void;
public function __wakeup(): void {}

/** @tentative-return-type */
public static function __set_state(array $array): DatePeriod {}
public static function __set_state(array $array): static {}

public function getIterator(): Iterator {}
}
Expand Down
38 changes: 15 additions & 23 deletions ext/date/php_date_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading