Skip to content

Commit

Permalink
Try to use LanguageLevelTypeAware
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Jun 13, 2024
1 parent 936c45f commit 0d0ed85
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions date/date_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ public static function getLastErrors(): array|false {}
*/
#[Pure]
#[TentativeType]
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTimeImmutable|false {}
#[LanguageLevelTypeAware(['8.3' => 'DateTimeImmutable'], default: 'DateTimeImmutable|false')]
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}

/**
* (PHP 5 &gt;=5.5.0)<br/>
Expand Down Expand Up @@ -560,10 +561,12 @@ public function format(#[LanguageLevelTypeAware(['8.0' => 'string'], default: ''
* in a format accepted by strtotime().
* @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>.
* @return static|false Returns the DateTime object for method chaining or FALSE on failure.
* @throws DateMalformedStringException
* @link https://php.net/manual/en/datetime.modify.php
*/
#[TentativeType]
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier): DateTime|false {}
#[LanguageLevelTypeAware(['8.3' => 'DateTime'], default: 'DateTime|false')]
public function modify(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $modifier) {}

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

#[TentativeType]
public function __wakeup(): void {}
Expand Down

0 comments on commit 0d0ed85

Please sign in to comment.