Skip to content
Open
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
16 changes: 8 additions & 8 deletions date/date_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ public function __construct(
* @link https://secure.php.net/manual/en/datetimeimmutable.add.php
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::add() does not modify the object itself")]
public function add(DateInterval $interval): DateTimeImmutable {}

/**
Expand Down Expand Up @@ -339,6 +340,7 @@ public static function __set_state(array $array) {}
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setDate() does not modify the object itself")]
public function setDate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
Expand All @@ -356,6 +358,7 @@ public function setDate(
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setISODate() does not modify the object itself")]
public function setISODate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
Expand All @@ -374,6 +377,7 @@ public function setISODate(
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setTime() does not modify the object itself")]
public function setTime(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
Expand All @@ -390,6 +394,7 @@ public function setTime(
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setTimestamp() does not modify the object itself")]
public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTimeImmutable {}

/**
Expand All @@ -404,6 +409,7 @@ public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default:
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setTimezone() does not modify the object itself")]
public function setTimezone(DateTimeZone $timezone): DateTimeImmutable {}

/**
Expand All @@ -418,6 +424,7 @@ public function setTimezone(DateTimeZone $timezone): DateTimeImmutable {}
* Returns the {@link https://secure.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::sub() does not modify the object itself")]
public function sub(DateInterval $interval): DateTimeImmutable {}

/**
Expand Down Expand Up @@ -516,6 +523,7 @@ public function getMicrosecond(): int {}
/**
* @since 8.4
*/
#[\NoDiscard(message: "as DateTimeImmutable::setMicrosecond() does not modify the object itself")]
public function setMicrosecond(int $microsecond): static {}
}

Expand Down Expand Up @@ -707,7 +715,6 @@ public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
* @link https://php.net/manual/en/datetime.add.php
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::add() does not modify the object itself")]
public function add(DateInterval $interval): DateTime {}

/**
Expand All @@ -727,7 +734,6 @@ public static function createFromImmutable(DateTimeImmutable $object) {}
* @throws DateInvalidOperationException
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::sub() does not modify the object itself")]
public function sub(DateInterval $interval): DateTime {}

/**
Expand All @@ -745,7 +751,6 @@ public function getTimezone(): DateTimeZone|false {}
* @link https://php.net/manual/en/datetime.settimezone.php
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setTimezone() does not modify the object itself")]
public function setTimezone(#[LanguageLevelTypeAware(['8.0' => 'DateTimeZone'], default: '')] $timezone): DateTime {}

/**
Expand All @@ -766,7 +771,6 @@ public function getOffset(): int {}
* @link https://php.net/manual/en/datetime.settime.php
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setTime() does not modify the object itself")]
public function setTime(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $hour,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $minute,
Expand All @@ -783,7 +787,6 @@ public function setTime(
* @link https://php.net/manual/en/datetime.setdate.php
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setDate() does not modify the object itself")]
public function setDate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $month,
Expand All @@ -799,7 +802,6 @@ public function setDate(
* @link https://php.net/manual/en/datetime.setisodate.php
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setISODate() does not modify the object itself")]
public function setISODate(
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $year,
#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $week,
Expand All @@ -813,7 +815,6 @@ public function setISODate(
* @link https://php.net/manual/en/datetime.settimestamp.php
*/
#[TentativeType]
#[\NoDiscard(message: "as DateTimeImmutable::setTimestamp() does not modify the object itself")]
public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTime {}

/**
Expand Down Expand Up @@ -914,7 +915,6 @@ public function getMicrosecond(): int {}
/**
* @since 8.4
*/
#[\NoDiscard(message: "as DateTimeImmutable::setMicrosecond() does not modify the object itself")]
public function setMicrosecond(int $microsecond): static {}
}

Expand Down