From f6a8facfd4bfc40025c069eebc37094d826aff58 Mon Sep 17 00:00:00 2001 From: wn_ Date: Mon, 9 Dec 2024 17:58:28 +0000 Subject: Bump 'spomky-labs/otphp' to 11.3.x. This is mainly for PHP 8.4 compatibility. --- vendor/thecodingmachine/safe/lib/DateTime.php | 81 --------------------------- 1 file changed, 81 deletions(-) delete mode 100644 vendor/thecodingmachine/safe/lib/DateTime.php (limited to 'vendor/thecodingmachine/safe/lib/DateTime.php') diff --git a/vendor/thecodingmachine/safe/lib/DateTime.php b/vendor/thecodingmachine/safe/lib/DateTime.php deleted file mode 100644 index 56eb809f8..000000000 --- a/vendor/thecodingmachine/safe/lib/DateTime.php +++ /dev/null @@ -1,81 +0,0 @@ -format('Y-m-d H:i:s.u'), $datetime->getTimezone()); - } - - /** - * @param string $format - * @param string $time - * @param DateTimeZone|null $timezone - * @throws DatetimeException - */ - public static function createFromFormat($format, $time, $timezone = null): self - { - $datetime = \DateTime::createFromFormat($format, $time, $timezone); - if ($datetime === false) { - throw DatetimeException::createFromPhpError(); - } - return self::createFromRegular($datetime); - } - - /** - * @param DateTimeInterface $datetime2 The date to compare to. - * @param boolean $absolute [optional] Whether to return absolute difference. - * @return DateInterval The DateInterval object representing the difference between the two dates. - * @throws DatetimeException - */ - public function diff($datetime2, $absolute = false): DateInterval - { - /** @var \DateInterval|false $result */ - $result = parent::diff($datetime2, $absolute); - if ($result === false) { - throw DatetimeException::createFromPhpError(); - } - return $result; - } - - /** - * @param string $modify A date/time string. Valid formats are explained in Date and Time Formats. - * @return DateTime Returns the DateTime object for method chaining. - * @throws DatetimeException - */ - public function modify($modify): self - { - /** @var DateTime|false $result */ - $result = parent::modify($modify); - if ($result === false) { - throw DatetimeException::createFromPhpError(); - } - return $result; - } - - /** - * @param int $year - * @param int $month - * @param int $day - * @return DateTime - * @throws DatetimeException - */ - public function setDate($year, $month, $day): self - { - /** @var DateTime|false $result */ - $result = parent::setDate($year, $month, $day); - if ($result === false) { - throw DatetimeException::createFromPhpError(); - } - return $result; - } -} -- cgit v1.2.3-54-g00ecf