From 2e1412c8ba9861168e01b2088e89b2cf1f53d3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 18 Jun 2024 22:55:29 +0200 Subject: [PATCH] Fix some ext/date return types --- ext/date/php_date.stub.php | 6 +++--- ext/date/php_date_arginfo.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php index 2683b3bf55ec8..ec501be531b2a 100644 --- a/ext/date/php_date.stub.php +++ b/ext/date/php_date.stub.php @@ -383,7 +383,7 @@ public function format(string $format): string {} /** * @tentative-return-type */ - public function modify(string $modifier): DateTime|false {} + public function modify(string $modifier): DateTime {} /** * @tentative-return-type @@ -521,7 +521,7 @@ public function getMicrosecond(): int {} public function diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval {} /** @tentative-return-type */ - public function modify(string $modifier): DateTimeImmutable|false {} + public function modify(string $modifier): DateTimeImmutable {} /** @tentative-return-type */ public function add(DateInterval $interval): DateTimeImmutable {} @@ -644,7 +644,7 @@ public function __construct(string $duration) {} /** * @tentative-return-type */ - public static function createFromDateString(string $datetime): DateInterval|false {} + public static function createFromDateString(string $datetime): DateInterval {} /** * @tentative-return-type diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index 86e2321d63e3f..e567239d140b2 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c4d04a19ff61ab112d598d994b4c3ad499c2ba9f */ + * Stub hash: 8a84ebfe7bfd3107a5b4c3add5a2ab7116e951c0 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0) @@ -291,7 +291,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_DateTime_format arginfo_class_DateTimeInterface_format -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_DateTime_modify, 0, 1, DateTime, MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_DateTime_modify, 0, 1, DateTime, 0) ZEND_ARG_TYPE_INFO(0, modifier, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -376,7 +376,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_DateTimeImmutable_diff arginfo_class_DateTimeInterface_diff -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_DateTimeImmutable_modify, 0, 1, DateTimeImmutable, MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_DateTimeImmutable_modify, 0, 1, DateTimeImmutable, 0) ZEND_ARG_TYPE_INFO(0, modifier, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -463,7 +463,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateInterval___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, duration, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_DateInterval_createFromDateString, 0, 1, DateInterval, MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_DateInterval_createFromDateString, 0, 1, DateInterval, 0) ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0) ZEND_END_ARG_INFO()