Skip to content

Commit

Permalink
Update date exception thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed May 29, 2024
1 parent 5d05b72 commit b7084b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions date/date_c.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class DateTimeImmutable implements DateTimeInterface
* The <em>$timezone</em> parameter and the current timezone are ignored when the <em>$datetime</em> parameter either
* is a UNIX timestamp (e.g. <em>@946684800</em>) or specifies a timezone (e.g. <em>2010-01-28T15:00:00+02:00</em>).
* </p></blockquote>
* @throws Exception Emits Exception in case of an error.
* @throws DateException Emits Exception in case of an error.
*/
public function __construct(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime = "now",
Expand Down Expand Up @@ -531,7 +531,7 @@ class DateTime implements DateTimeInterface
* or specifies a timezone
* (e.g. <em>2010-01-28T15:00:00+02:00</em>).
* </p> <p></p></blockquote>
* @throws Exception Emits Exception in case of an error.
* @throws DateException Emits Exception in case of an error.
*/
public function __construct(
#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $datetime = 'now',
Expand Down Expand Up @@ -763,7 +763,7 @@ class DateTimeZone
/**
* @param string $timezone
* @link https://php.net/manual/en/datetimezone.construct.php
* @throws Exception Emits Exception in case of an error.
* @throws DateException Emits Exception in case of an error.
*/
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $timezone) {}

Expand Down Expand Up @@ -915,7 +915,7 @@ class DateInterval

/**
* @param string $duration
* @throws Exception when the $duration cannot be parsed as an interval.
* @throws DateException when the $duration cannot be parsed as an interval.
* @link https://php.net/manual/en/dateinterval.construct.php
*/
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $duration) {}
Expand Down

0 comments on commit b7084b0

Please sign in to comment.