Skip to content

Commit 0d0ed85

Browse files
Try to use LanguageLevelTypeAware
1 parent 936c45f commit 0d0ed85

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

date/date_c.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ public static function getLastErrors(): array|false {}
249249
*/
250250
#[Pure]
251251
#[TentativeType]
252-
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTimeImmutable|false {}
252+
#[LanguageLevelTypeAware(['8.3' => 'DateTimeImmutable'], default: 'DateTimeImmutable|false')]
253+
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}
253254

254255
/**
255256
* (PHP 5 &gt;=5.5.0)<br/>
@@ -560,10 +561,12 @@ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
560561
* in a format accepted by strtotime().
561562
* @param string $modifier A date/time string. Valid formats are explained in <a href="https://secure.php.net/manual/en/datetime.formats.php">Date and Time Formats</a>.
562563
* @return static|false Returns the DateTime object for method chaining or FALSE on failure.
564+
* @throws DateMalformedStringException
563565
* @link https://php.net/manual/en/datetime.modify.php
564566
*/
565567
#[TentativeType]
566-
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTime|false {}
568+
#[LanguageLevelTypeAware(['8.3' => 'DateTime'], default: 'DateTime|false')]
569+
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}
567570

568571
/**
569572
* Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object
@@ -938,7 +941,8 @@ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
938941
* @link https://php.net/manual/en/dateinterval.createfromdatestring.php
939942
*/
940943
#[TentativeType]
941-
public static function createFromDateString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime): DateInterval|false {}
944+
#[LanguageLevelTypeAware(['8.3' => 'DateInterval'], default: 'DateInterval|false')]
945+
public static function createFromDateString(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime) {}
942946

943947
#[TentativeType]
944948
public function __wakeup(): void {}

0 commit comments

Comments
 (0)