Skip to content

Commit 5fbba9b

Browse files
committed
getTimestamp does not return false
1 parent 6768aae commit 5fbba9b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/date/php_date.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function getTimezone(): DateTimeZone|false;
198198
public function getOffset(): int;
199199

200200
/** @tentative-return-type */
201-
public function getTimestamp(): int|false;
201+
public function getTimestamp(): int;
202202

203203
/** @tentative-return-type */
204204
public function diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval;

ext/date/php_date_arginfo.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: e4585948a8767182f38b553b603e06555e92c372 */
2+
* Stub hash: ea354510fbf64c42ee1cdd6fd786ab937516226c */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
@@ -235,8 +235,7 @@ ZEND_END_ARG_INFO()
235235
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DateTimeInterface_getOffset, 0, 0, IS_LONG, 0)
236236
ZEND_END_ARG_INFO()
237237

238-
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_DateTimeInterface_getTimestamp, 0, 0, MAY_BE_LONG|MAY_BE_FALSE)
239-
ZEND_END_ARG_INFO()
238+
#define arginfo_class_DateTimeInterface_getTimestamp arginfo_class_DateTimeInterface_getOffset
240239

241240
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_DateTimeInterface_diff, 0, 1, DateInterval, 0)
242241
ZEND_ARG_OBJ_INFO(0, targetObject, DateTimeInterface, 0)

0 commit comments

Comments
 (0)