Skip to content

Commit

Permalink
Not possible to have a return type of only true
Browse files Browse the repository at this point in the history
  • Loading branch information
cs278 committed Nov 6, 2023
1 parent 450d3c1 commit 9ac5a18
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Up @@ -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()

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

0 comments on commit 9ac5a18

Please sign in to comment.