Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Not possible to have a return type of only true
Browse files Browse the repository at this point in the history
cs278 committed Jan 5, 2022
1 parent b7d7657 commit 5fec7ff
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions timecop.stub.php
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@

// Use build/gen_stub.php from PHP 8 source code checkout to create .h contents.

function timecop_freeze(\DateTimeInterface|int $timestamp): true {}
function timecop_travel(\DateTimeInterface|int $timestamp): true {}
function timecop_freeze(\DateTimeInterface|int $timestamp): bool {}
function timecop_travel(\DateTimeInterface|int $timestamp): bool {}
function timecop_scale(int $scale): bool {}
function timecop_return(): true {}
function timecop_return(): bool {}
4 changes: 2 additions & 2 deletions timecop_php8_arginfo.h
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timecop_freeze, 0, 1, true, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timecop_freeze, 0, 1, _IS_BOOL, 0)
ZEND_ARG_OBJ_TYPE_MASK(0, timestamp, DateTimeInterface, MAY_BE_LONG, NULL)
ZEND_END_ARG_INFO()

@@ -33,7 +33,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timecop_scale, 0, 1, _IS_BOOL, 0
ZEND_ARG_TYPE_INFO(0, scale, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timecop_return, 0, 0, true, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timecop_return, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timecop_time, 0, 0, IS_LONG, 0)

0 comments on commit 5fec7ff

Please sign in to comment.