Skip to content

Commit

Permalink
Fix imap stubs
Browse files Browse the repository at this point in the history
Closes GH-6559.
  • Loading branch information
cmb69 committed Jan 3, 2021
1 parent e470f9b commit aab2328
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ext/imap/php_imap.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function imap_close($imap, int $flags = 0): bool {}
function imap_num_msg($imap): int|false {}

/** @param resource $imap */
function imap_num_recent($imap): int|false {}
function imap_num_recent($imap): int {}

/** @param resource $imap */
function imap_headers($imap): array|false {}
Expand Down Expand Up @@ -179,7 +179,7 @@ function imap_sort($imap, int $criteria, bool $reverse, int $flags = 0, ?string
function imap_uid($imap, int $message_num): int|false {}

/** @param resource $imap */
function imap_msgno($imap, int $message_uid): int|false {}
function imap_msgno($imap, int $message_uid): int {}

/** @param resource $imap */
function imap_list($imap, string $reference, string $pattern): array|false {}
Expand Down
8 changes: 5 additions & 3 deletions ext/imap/php_imap_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: 326cb0410034aecc702e9397cd88ef91adaa254c */
* Stub hash: d6d158112a802d867646b8f85402b8762599180b */

ZEND_BEGIN_ARG_INFO_EX(arginfo_imap_open, 0, 0, 3)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
Expand All @@ -26,7 +26,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_num_msg, 0, 1, MAY_BE_LONG|
ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()

#define arginfo_imap_num_recent arginfo_imap_num_msg
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_num_recent, 0, 1, IS_LONG, 0)
ZEND_ARG_INFO(0, imap)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_headers, 0, 1, MAY_BE_ARRAY|MAY_BE_FALSE)
ZEND_ARG_INFO(0, imap)
Expand Down Expand Up @@ -218,7 +220,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_uid, 0, 2, MAY_BE_LONG|MAY_
ZEND_ARG_TYPE_INFO(0, message_num, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_imap_msgno, 0, 2, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_imap_msgno, 0, 2, IS_LONG, 0)
ZEND_ARG_INFO(0, imap)
ZEND_ARG_TYPE_INFO(0, message_uid, IS_LONG, 0)
ZEND_END_ARG_INFO()
Expand Down

0 comments on commit aab2328

Please sign in to comment.