Skip to content

Commit

Permalink
Use single line phpdoc in stubs where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Jul 20, 2021
1 parent 322864b commit 2378f35
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 129 deletions.
4 changes: 1 addition & 3 deletions ext/com_dotnet/com_extension.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ function com_message_pump(int $timeout_milliseconds = 0): bool {}

function com_load_typelib(string $typelib, bool $case_insensitive = true): bool {}

/**
* @not-serializable
*/
/** @not-serializable */
class variant
{
public function __construct(mixed $value = null, int $type = VT_EMPTY, int $codepage = CP_ACP) {}
Expand Down
2 changes: 1 addition & 1 deletion ext/com_dotnet/com_extension_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: a2e260364d3f1f0e632b43be1a61294b21eed937 */
* Stub hash: 6d32c6c4ed91fb542f6d78de50a4f099b9285614 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_variant_set, 0, 2, IS_VOID, 0)
ZEND_ARG_OBJ_INFO(0, variant, variant, 0)
Expand Down
4 changes: 1 addition & 3 deletions ext/curl/curl_file.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

/** @generate-class-entries */

/**
* @not-serializable
*/
/** @not-serializable */
class CURLFile
{
public string $name = "";
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/curl_file_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: 63d47eac83ee088e8b4c0d1aa469de9ae066146a */
* Stub hash: 0d09bd2f3b0a155cef25ca343319ecf470424d71 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
Expand Down
13 changes: 4 additions & 9 deletions ext/ffi/ffi.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

namespace {

/**
* @not-serializable
*/
/** @not-serializable */
final class FFI
{
public static function cdef(string $code = "", ?string $lib = null): FFI {}
Expand Down Expand Up @@ -70,15 +68,12 @@ public static function isNull(FFI\CData $ptr): bool {}
}

namespace FFI {
/**
* @not-serializable
*/

/** @not-serializable */
final class CData {
}

/**
* @not-serializable
*/
/** @not-serializable */
final class CType {
public function getName(): string {}

Expand Down
2 changes: 1 addition & 1 deletion ext/ffi/ffi_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: a5c742bba32bd234e89268bebfc13f3cb4177719 */
* Stub hash: d9dd3b93c0d1623fe61ea0bd8ee9d4c3a359bf78 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_FFI_cdef, 0, 0, FFI, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, code, IS_STRING, 0, "\"\"")
Expand Down
4 changes: 1 addition & 3 deletions ext/fileinfo/fileinfo.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

/** @generate-class-entries */

/**
* @not-serializable
*/
/** @not-serializable */
class finfo
{
/** @alias finfo_open */
Expand Down
2 changes: 1 addition & 1 deletion ext/fileinfo/fileinfo_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: 41527cacd680ee2e9657d0a1a39614567d356d83 */
* Stub hash: edb72bf1a82a6b2e027caa91c6668c27e36b9c34 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
Expand Down
40 changes: 8 additions & 32 deletions ext/imap/php_imap.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ function imap_rfc822_parse_adrlist(string $string, string $default_hostname): ar

function imap_body(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}

/**
* @alias imap_body
*/
/** @alias imap_body */
function imap_fetchtext(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}

function imap_bodystruct(IMAP\Connection $imap, int $message_num, string $section): \stdClass|false {}
Expand All @@ -48,43 +46,29 @@ function imap_fetchbody(IMAP\Connection $imap, int $message_num, string $section

function imap_fetchmime(IMAP\Connection $imap, int $message_num, string $section, int $flags = 0): string|false {}

/**
* @param resource|string|int $file
*/
/** @param resource|string|int $file */
function imap_savebody(IMAP\Connection $imap, $file, int $message_num, string $section = "", int $flags = 0): bool {}

function imap_fetchheader(IMAP\Connection $imap, int $message_num, int $flags = 0): string|false {}

function imap_fetchstructure(IMAP\Connection $imap, int $message_num, int $flags = 0): \stdClass|false {}

/**
*/
function imap_gc(IMAP\Connection $imap, int $flags): bool {}

/**
*/
function imap_expunge(IMAP\Connection $imap): bool {}

/**
*/
function imap_delete(IMAP\Connection $imap, string $message_num, int $flags = 0): bool {}

/**
*/
function imap_undelete(IMAP\Connection $imap, string $message_num, int $flags = 0): bool {}

function imap_check(IMAP\Connection $imap): \stdClass|false {}

function imap_listscan(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}

/**
* @alias imap_listscan
*/
/** @alias imap_listscan */
function imap_scan(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}

/**
* @alias imap_listscan
*/
/** @alias imap_listscan */
function imap_scanmailbox(IMAP\Connection $imap, string $reference, string $pattern, string $content): array|false {}

function imap_mail_copy(IMAP\Connection $imap, string $message_nums, string $mailbox, int $flags = 0): bool {}
Expand All @@ -95,16 +79,12 @@ function imap_mail_compose(array $envelope, array $bodies): string|false {}

function imap_createmailbox(IMAP\Connection $imap, string $mailbox): bool {}

/**
* @alias imap_createmailbox
*/
/** @alias imap_createmailbox */
function imap_create(IMAP\Connection $imap, string $mailbox): bool {}

function imap_renamemailbox(IMAP\Connection $imap, string $from, string $to): bool {}

/**
* @alias imap_renamemailbox
*/
/** @alias imap_renamemailbox */
function imap_rename(IMAP\Connection $imap, string $from, string $to): bool {}

function imap_deletemailbox(IMAP\Connection $imap, string $mailbox): bool {}
Expand Down Expand Up @@ -143,16 +123,12 @@ function imap_msgno(IMAP\Connection $imap, int $message_uid): int {}

function imap_list(IMAP\Connection $imap, string $reference, string $pattern): array|false {}

/**
* @alias imap_list
*/
/** @alias imap_list */
function imap_listmailbox(IMAP\Connection $imap, string $reference, string $pattern): array|false {}

function imap_lsub(IMAP\Connection $imap, string $reference, string $pattern): array|false {}

/**
* @alias imap_lsub
*/
/** @alias imap_lsub */
function imap_listsubscribed(IMAP\Connection $imap, string $reference, string $pattern): array|false {}

function imap_getsubscribed(IMAP\Connection $imap, string $reference, string $pattern): array|false {}
Expand Down
2 changes: 1 addition & 1 deletion 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: 706de8c7fbb821b71ad8cfdbbab38fe30fa6590a */
* Stub hash: 5f8aa79b08eeca70b934040b8ed3809f249cbef7 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_imap_open, 0, 3, IMAP\\Connection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, mailbox, IS_STRING, 0)
Expand Down
4 changes: 1 addition & 3 deletions ext/intl/formatter/formatter.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

/** @generate-class-entries */

/**
* @not-serializable
*/
/** @not-serializable */
class NumberFormatter
{
public function __construct(string $locale, int $style, ?string $pattern = null) {}
Expand Down
2 changes: 1 addition & 1 deletion ext/intl/formatter/formatter_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: 3cc95768092e2c6ddfcab9379d1963b58ab94def */
* Stub hash: f76ad76b08b7ca47883659fabfcc0882a2820c43 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumberFormatter___construct, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, locale, IS_STRING, 0)
Expand Down
4 changes: 1 addition & 3 deletions ext/ldap/ldap.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ function ldap_rename(LDAP\Connection $ldap, string $dn, string $new_rdn, string

function ldap_rename_ext(LDAP\Connection $ldap, string $dn, string $new_rdn, string $new_parent, bool $delete_old_rdn, ?array $controls = null): LDAP\Result|false {}

/**
* @param array|string|int $value
*/
/** @param array|string|int $value */
function ldap_get_option(LDAP\Connection $ldap, int $option, &$value = null): bool {}

/** @param array|string|int|bool $value */
Expand Down
2 changes: 1 addition & 1 deletion ext/ldap/ldap_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: 482ee2b3df6b6f6b9e86e0af890c441d6222356d */
* Stub hash: a1beb155767af8500567030b493d9d3ec408270a */

#if defined(HAVE_ORALDAP)
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_connect, 0, 0, LDAP\\Connection, MAY_BE_FALSE)
Expand Down
4 changes: 1 addition & 3 deletions ext/pdo/pdo_dbh.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

/** @generate-class-entries */

/**
* @not-serializable
*/
/** @not-serializable */
class PDO
{
public function __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null) {}
Expand Down
2 changes: 1 addition & 1 deletion ext/pdo/pdo_dbh_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: 427f534213227208cd0b02c936d526ea08fa008f */
* Stub hash: ec880c39e211dbfd4c239292b8cc9e7babab105b */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_PDO___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, dsn, IS_STRING, 0)
Expand Down
8 changes: 2 additions & 6 deletions ext/pdo/pdo_stmt.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

/** @generate-class-entries */

/**
* @not-serializable
*/
/** @not-serializable */
class PDOStatement implements IteratorAggregate
{
public string $queryString;
Expand Down Expand Up @@ -69,9 +67,7 @@ public function setFetchMode(int $mode, mixed ...$args) {} // TODO make return t
public function getIterator(): Iterator {}
}

/**
* @not-serializable
*/
/** @not-serializable */
final class PDORow
{
public string $queryString;
Expand Down
2 changes: 1 addition & 1 deletion ext/pdo/pdo_stmt_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: f5f2932888bcbffa771092e9a54508d4c51c32ab */
* Stub hash: adcbda7b6763141981700bec5d8c5b739f8de767 */

ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_PDOStatement_bindColumn, 0, 2, _IS_BOOL, 0)
ZEND_ARG_TYPE_MASK(0, column, MAY_BE_STRING|MAY_BE_LONG, NULL)
Expand Down
4 changes: 1 addition & 3 deletions ext/pgsql/pgsql.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ function pg_field_prtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN
*/
function pg_fieldprtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}

/**
* @param string|int $row
*/
/** @param string|int $row */
function pg_field_is_null(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}

/**
Expand Down
2 changes: 1 addition & 1 deletion ext/pgsql/pgsql_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: 39b3a34ba955184bbfcc7a792fa0ecc2877ac064 */
* Stub hash: 37814767f8290b717a4facbdf55ef3bfc1fc24c8 */

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_pg_connect, 0, 1, PgSql\\Connection, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0)
Expand Down

0 comments on commit 2378f35

Please sign in to comment.