Fix some ext/date return types (#14600)

This commit is contained in:
Máté Kocsis 2024-06-18 23:25:09 +02:00 committed by GitHub
parent 9672cd9469
commit 09303ad0e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -383,7 +383,7 @@ class DateTime implements DateTimeInterface
/** /**
* @tentative-return-type * @tentative-return-type
*/ */
public function modify(string $modifier): DateTime|false {} public function modify(string $modifier): DateTime {}
/** /**
* @tentative-return-type * @tentative-return-type
@ -521,7 +521,7 @@ class DateTimeImmutable implements DateTimeInterface
public function diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval {} public function diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval {}
/** @tentative-return-type */ /** @tentative-return-type */
public function modify(string $modifier): DateTimeImmutable|false {} public function modify(string $modifier): DateTimeImmutable {}
/** @tentative-return-type */ /** @tentative-return-type */
public function add(DateInterval $interval): DateTimeImmutable {} public function add(DateInterval $interval): DateTimeImmutable {}
@ -644,7 +644,7 @@ class DateInterval
/** /**
* @tentative-return-type * @tentative-return-type
*/ */
public static function createFromDateString(string $datetime): DateInterval|false {} public static function createFromDateString(string $datetime): DateInterval {}
/** /**
* @tentative-return-type * @tentative-return-type

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead. /* 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_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) 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 #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_ARG_TYPE_INFO(0, modifier, IS_STRING, 0)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
@ -376,7 +376,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_DateTimeImmutable_diff arginfo_class_DateTimeInterface_diff #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_ARG_TYPE_INFO(0, modifier, IS_STRING, 0)
ZEND_END_ARG_INFO() 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_ARG_TYPE_INFO(0, duration, IS_STRING, 0)
ZEND_END_ARG_INFO() 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_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()