Skip to content

Commit bdacd2a

Browse files
committed
Add a few missing types to stubs
1 parent c10a406 commit bdacd2a

10 files changed

+30
-17
lines changed

ext/exif/exif.stub.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
function exif_tagname(int $index): string|false {}
66

7+
/** @param resource|string $filename */
78
function exif_read_data($filename, ?string $sections_needed = null, bool $sub_arrays = false, bool $read_thumbnail = false): array|false {}
89

10+
/** @param resource|string $filename */
911
function exif_thumbnail($filename, &$width = null, &$height = null, &$imagetype = null): string|false {}
1012

1113
function exif_imagetype(string $filename): int|false {}

ext/exif/exif_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 603888c5295306e86fabce6d6f5367376c666cfe */
2+
* Stub hash: 62f6ca1a43c69d917711eae9118caf5a658722d9 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_exif_tagname, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
55
ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0)

ext/odbc/odbc.stub.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function odbc_binmode($result_id, int $mode): bool {}
1111
function odbc_longreadlen($result_id, int $length): bool {}
1212

1313
/**
14-
* @param resource $result_id
14+
* @param resource $connection_id
1515
* @return resource|false
1616
*/
1717
function odbc_prepare($connection_id, string $query) {}
@@ -48,7 +48,10 @@ function odbc_fetch_object($result, int $rownumber = -1): stdClass|false {}
4848
function odbc_fetch_array($result, int $rownumber = -1): array|false {}
4949
#endif
5050

51-
/** @param resource $result_id */
51+
/**
52+
* @param resource $result_id
53+
* @param array $result_array
54+
*/
5255
function odbc_fetch_into($result_id, &$result_array, int $rownumber = 0): int|false {}
5356

5457
/** @param resource $result_id */

ext/odbc/odbc_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 4abab509eb27b93c15f03313e80c90400f7948d0 */
2+
* Stub hash: 14702a5bd87902871d456de2289f4ae236e5bfa5 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0)
55
ZEND_END_ARG_INFO()

ext/openssl/openssl.stub.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ final class OpenSSLAsymmetricKey
1616

1717
function openssl_x509_export_to_file(OpenSSLCertificate|string $x509, string $outfilename, bool $notext = true): bool {}
1818

19+
/** @param string $out */
1920
function openssl_x509_export(OpenSSLCertificate|string $x509, &$out, bool $notext = true): bool {}
2021

2122
function openssl_x509_fingerprint(OpenSSLCertificate|string $x509, string $method = "sha1", bool $raw_output = false): string|false {}
@@ -38,7 +39,10 @@ function openssl_x509_free(OpenSSLCertificate $x509): void {}
3839
/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $priv_key */
3940
function openssl_pkcs12_export_to_file(OpenSSLCertificate|string $x509cert, string $filename, $priv_key, string $pass, array $args = []): bool {}
4041

41-
/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $priv_key */
42+
/**
43+
* @param string $out
44+
* @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $priv_key
45+
*/
4246
function openssl_pkcs12_export(OpenSSLCertificate|string $x509, &$out, $priv_key, string $pass, array $args = []): bool {}
4347

4448
/** @param array $certs */
@@ -115,9 +119,10 @@ function openssl_pkcs7_sign(string $infile, string $outfile, OpenSSLCertificate|
115119
/** @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string|null $recipkey */
116120
function openssl_pkcs7_decrypt(string $infilename, string $outfilename, OpenSSLCertificate|string $recipcert, $recipkey = null): bool {}
117121

122+
/** @param array $certs */
118123
function openssl_pkcs7_read(string $infilename, &$certs): bool {}
119124

120-
function openssl_cms_verify(string $filename, int $flags = 0, ?string $signerscerts = null, ?array $cainfo = null, ?string $extracerts = null, ?string $content = null, ?string $pk7 = null, ?string $sigfile = null, $encoding = OPENSSL_ENCODING_SMIME): bool {}
125+
function openssl_cms_verify(string $filename, int $flags = 0, ?string $signerscerts = null, ?array $cainfo = null, ?string $extracerts = null, ?string $content = null, ?string $pk7 = null, ?string $sigfile = null, int $encoding = OPENSSL_ENCODING_SMIME): bool {}
121126

122127
/** @param OpenSSLCertificate|array|string $recipcerts */
123128
function openssl_cms_encrypt(string $infile, string $outfile, $recipcerts, ?array $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher = OPENSSL_CIPHER_RC2_40): bool {}

ext/openssl/openssl_arginfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 5189cc18305417d2566fe594f69806f72899c355 */
2+
* Stub hash: ed45da0e8786db9b20fd33d574b20f3d41304e0a */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_x509_export_to_file, 0, 2, _IS_BOOL, 0)
55
ZEND_ARG_OBJ_TYPE_MASK(0, x509, OpenSSLCertificate, MAY_BE_STRING, NULL)
@@ -208,7 +208,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_cms_verify, 0, 1, _IS_BO
208208
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null")
209209
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pk7, IS_STRING, 1, "null")
210210
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sigfile, IS_STRING, 1, "null")
211-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, encoding, "OPENSSL_ENCODING_SMIME")
211+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_LONG, 0, "OPENSSL_ENCODING_SMIME")
212212
ZEND_END_ARG_INFO()
213213

214214
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_openssl_cms_encrypt, 0, 4, _IS_BOOL, 0)

ext/pcntl/pcntl.stub.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
function pcntl_fork(): int {}
66

7+
/** @param int $status */
78
function pcntl_waitpid(int $pid, &$status, int $options = 0, &$rusage = []): int {}
89

10+
/** @param int $status */
911
function pcntl_wait(&$status, int $options = 0, &$rusage = []): int {}
1012

11-
/**
12-
* @param callable|int $handler
13-
*/
13+
/** @param callable|int $handler */
1414
function pcntl_signal(int $signo, $handler, bool $restart_syscalls = true): bool {}
1515

1616
/** @return mixed */
@@ -19,13 +19,16 @@ function pcntl_signal_get_handler(int $signo) {}
1919
function pcntl_signal_dispatch(): bool {}
2020

2121
#ifdef HAVE_SIGPROCMASK
22+
/** @param array $oldset */
2223
function pcntl_sigprocmask(int $how, array $set, &$oldset = null): bool {}
2324
#endif
2425

2526
#ifdef HAVE_STRUCT_SIGINFO_T
2627
#if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
28+
/** @param array $info */
2729
function pcntl_sigwaitinfo(array $set, &$info = []): int|false {}
2830

31+
/** @param array $info */
2932
function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {}
3033
#endif
3134
#endif

ext/pcntl/pcntl_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: c87eae3de097554566cf3e285c1a2542947d6ff9 */
2+
* Stub hash: 243017c5440bff0b3ee3296705d8455d0fac5b7e */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_fork, 0, 0, IS_LONG, 0)
55
ZEND_END_ARG_INFO()

ext/sodium/libsodium.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function sodium_crypto_generichash_init(string $key = "", int $length = SODIUM_C
7878

7979
function sodium_crypto_generichash_update(string &$state, string $string): bool {}
8080

81-
function sodium_crypto_generichash_final(string &$state, $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {}
81+
function sodium_crypto_generichash_final(string &$state, int $length = SODIUM_CRYPTO_GENERICHASH_BYTES): string {}
8282

8383
function sodium_crypto_kdf_derive_from_key(int $subkey_len, int $subkey_id, string $context, string $key): string {}
8484

@@ -176,7 +176,7 @@ function sodium_unpad(string $string, int $block_size): string {}
176176

177177
function sodium_bin2hex(string $string): string {}
178178

179-
function sodium_hex2bin(string $string, $ignore = ""): string {}
179+
function sodium_hex2bin(string $string, string $ignore = ""): string {}
180180

181181
#ifdef sodium_base64_VARIANT_ORIGINAL
182182
function sodium_bin2base64(string $string, int $id): string {}

ext/sodium/libsodium_arginfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 1cbca4f3d58dea842b4ea419df57531682ab984d */
2+
* Stub hash: 5d064655caf10f5e0dd126009755bf3552c63f59 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_aead_aes256gcm_is_available, 0, 0, _IS_BOOL, 0)
55
ZEND_END_ARG_INFO()
@@ -162,7 +162,7 @@ ZEND_END_ARG_INFO()
162162

163163
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_generichash_final, 0, 1, IS_STRING, 0)
164164
ZEND_ARG_TYPE_INFO(1, state, IS_STRING, 0)
165-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, length, "SODIUM_CRYPTO_GENERICHASH_BYTES")
165+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "SODIUM_CRYPTO_GENERICHASH_BYTES")
166166
ZEND_END_ARG_INFO()
167167

168168
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_crypto_kdf_derive_from_key, 0, 4, IS_STRING, 0)
@@ -363,7 +363,7 @@ ZEND_END_ARG_INFO()
363363

364364
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sodium_hex2bin, 0, 1, IS_STRING, 0)
365365
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
366-
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, ignore, "\"\"")
366+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ignore, IS_STRING, 0, "\"\"")
367367
ZEND_END_ARG_INFO()
368368

369369
#if defined(sodium_base64_VARIANT_ORIGINAL)

0 commit comments

Comments
 (0)