From b7084b0f12caa074c9a04a73f14c9ff06c9c157c Mon Sep 17 00:00:00 2001
From: Vincent Langlet
Date: Wed, 29 May 2024 16:07:30 +0200
Subject: [PATCH] Update date exception thrown
---
date/date_c.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/date/date_c.php b/date/date_c.php
index 9e2bd89bb..4c56c7938 100644
--- a/date/date_c.php
+++ b/date/date_c.php
@@ -184,7 +184,7 @@ class DateTimeImmutable implements DateTimeInterface
* The $timezone parameter and the current timezone are ignored when the $datetime parameter either
* is a UNIX timestamp (e.g. @946684800) or specifies a timezone (e.g. 2010-01-28T15:00:00+02:00).
*
- * @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",
@@ -531,7 +531,7 @@ class DateTime implements DateTimeInterface
* or specifies a timezone
* (e.g. 2010-01-28T15:00:00+02:00).
*
- * @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',
@@ -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) {}
@@ -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) {}