Skip to content

Commit

Permalink
Sync date_diff and DateTime::diff return type
Browse files Browse the repository at this point in the history
This function/method cannot return false.
  • Loading branch information
nikic committed Jan 18, 2021
1 parent 48e2e53 commit c31f9f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ext/date/php_date.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function setTimestamp(int $timestamp) {}
public function getTimestamp() {}

/**
* @return DateInterval|false
* @return DateInterval
* @alias date_diff
*/
public function diff(DateTimeInterface $targetObject, bool $absolute = false) {}
Expand Down Expand Up @@ -291,7 +291,7 @@ public function getOffset() {}
public function getTimestamp() {}

/**
* @return DateInterval|false
* @return DateInterval
* @alias date_diff
*/
public function diff(DateTimeInterface $targetObject, bool $absolute = false) {}
Expand Down
2 changes: 1 addition & 1 deletion ext/date/php_date_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 339c2c91f38eeaafac6134ac04573243069502f5 */
* Stub hash: 880a93d8a3461635447318317869fa7d3d7762dd */

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)
Expand Down

0 comments on commit c31f9f7

Please sign in to comment.