diff --git a/date/date_c.php b/date/date_c.php index 8da12b1ec..8c7b39c1d 100644 --- a/date/date_c.php +++ b/date/date_c.php @@ -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 {} /** @@ -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 FALSE 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, @@ -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 FALSE 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, @@ -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 FALSE 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, @@ -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 FALSE on failure. */ #[TentativeType] + #[\NoDiscard(message: "as DateTimeImmutable::setTimestamp() does not modify the object itself")] public function setTimestamp(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $timestamp): DateTimeImmutable {} /** @@ -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 FALSE on failure. */ #[TentativeType] + #[\NoDiscard(message: "as DateTimeImmutable::setTimezone() does not modify the object itself")] public function setTimezone(DateTimeZone $timezone): DateTimeImmutable {} /** @@ -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 FALSE on failure. */ #[TentativeType] + #[\NoDiscard(message: "as DateTimeImmutable::sub() does not modify the object itself")] public function sub(DateInterval $interval): DateTimeImmutable {} /** @@ -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 {} } @@ -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 {} /** @@ -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 {} /** @@ -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 {} /** @@ -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, @@ -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, @@ -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, @@ -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 {} /** @@ -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 {} }