Fix smaller issues with stubs

GH-5025
This commit is contained in:
Máté Kocsis 2019-12-18 20:38:40 +01:00
parent ca6c54274c
commit d59bc80782
No known key found for this signature in database
GPG key ID: FD055E41728BF310
9 changed files with 43 additions and 39 deletions

View file

@ -1,21 +1,21 @@
<?php
function bcadd(string $left_operand, string $right_operand, int $scale = UNKNOWN) : string {}
function bcadd(string $left_operand, string $right_operand, int $scale = UNKNOWN): string {}
function bcsub(string $left_operand, string $right_operand, int $scale = UNKNOWN) : string {}
function bcsub(string $left_operand, string $right_operand, int $scale = UNKNOWN): string {}
function bcmul(string $left_operand, string $right_operand, int $scale = UNKNOWN) : string {}
function bcmul(string $left_operand, string $right_operand, int $scale = UNKNOWN): string {}
function bcdiv(string $dividend, string $divisor, int $scale = UNKNOWN) : string {}
function bcdiv(string $dividend, string $divisor, int $scale = UNKNOWN): string {}
function bcmod(string $dividend, string $divisor, int $scale = UNKNOWN) : string {}
function bcmod(string $dividend, string $divisor, int $scale = UNKNOWN): string {}
function bcpowmod(string $base, string $exponent, string $modulus, int $scale = UNKNOWN): string|false {}
function bcpow(string $base, string $exponent, int $scale = UNKNOWN) : string {}
function bcpow(string $base, string $exponent, int $scale = UNKNOWN): string {}
function bcsqrt(string $operand, int $scale = UNKNOWN) : string {}
function bcsqrt(string $operand, int $scale = UNKNOWN): string {}
function bccomp(string $left_operand, string $right_operand, int $scale = UNKNOWN) : int {}
function bccomp(string $left_operand, string $right_operand, int $scale = UNKNOWN): int {}
function bcscale(int $scale = UNKNOWN) : int {}
function bcscale(int $scale = UNKNOWN): int {}

View file

@ -205,9 +205,9 @@ function imagegetclip(GdImage $im): array {}
#ifdef HAVE_GD_FREETYPE
function imageftbbox(float $size, float $angle, string $font_file, string $text, array $extrainfo = UNKNOWN): array|false {}
function imagefttext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text, array $extrainfo = UNKNOWN) {}
function imagefttext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text, array $extrainfo = UNKNOWN): array|false {}
function imagettfbbox(float $size, float $angle, string $font_file, string $text) {}
function imagettfbbox(float $size, float $angle, string $font_file, string $text): array|false {}
function imagettftext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text) {}
#endif

View file

@ -1329,7 +1329,7 @@ static const zend_function_entry hash_functions[] = {
PHP_FE(hash_copy, arginfo_hash_copy)
PHP_FE(hash_algos, arginfo_hash_algos)
PHP_FE(hash_hmac_algos, arginfo_hash_algos)
PHP_FE(hash_hmac_algos, arginfo_hash_hmac_algos)
PHP_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
PHP_FE(hash_equals, arginfo_hash_equals)
PHP_FE(hash_hkdf, arginfo_hash_hkdf)

View file

@ -24,13 +24,15 @@ function hash_copy(HashContext $context): HashContext {}
function hash_algos(): array {}
function hash_hmac_algos(): array {}
function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $raw_output = false): string {}
/**
* @param $known_string no type juggling is performed
* @param $user_string no type juggling is performed
*/
function hash_equals(string $known_string, string $user_string) : bool {}
function hash_equals(string $known_string, string $user_string): bool {}
function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string {}

View file

@ -56,6 +56,8 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_algos, 0, 0, IS_ARRAY, 0)
ZEND_END_ARG_INFO()
#define arginfo_hash_hmac_algos arginfo_hash_algos
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_pbkdf2, 0, 4, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)

View file

@ -129,7 +129,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(sleep, arginfo_sleep)
PHP_FE(usleep, arginfo_usleep)
#if HAVE_NANOSLEEP
PHP_FE(time_nanosleep, arginfo_nanosleep)
PHP_FE(time_nanosleep, arginfo_time_nanosleep)
PHP_FE(time_sleep_until, arginfo_time_sleep_until)
#endif

View file

@ -264,7 +264,7 @@ function sleep(int $seconds): int {}
function usleep(int $microseconds): void {}
#if HAVE_NANOSLEEP
function nanosleep(int $seconds, int $nanoseconds): array|bool {}
function time_nanosleep(int $seconds, int $nanoseconds): array|bool {}
function time_sleep_until(float $timestamp): bool {}
#endif
@ -472,9 +472,9 @@ function inet_pton(string $ip_address): string|false {}
function metaphone(string $text, int $phones = 0): string|false {}
/* {{{ head.c */
function header(string $string, bool $replace = true, int $http_response_code = 0): void { }
function header(string $string, bool $replace = true, int $http_response_code = 0): void {}
function header_remove(string $name = UNKNOWN): void { }
function header_remove(string $name = UNKNOWN): void {}
/** @param int|array $expires_or_options */
function setrawcookie(string $name, string $value = '', $expires_or_options = 0, string $path = '', string $domain = '', bool $secure = false, bool $httponly = false): bool {}
@ -486,7 +486,7 @@ function http_response_code(int $response_code = 0): int|bool {}
function headers_sent(&$file = null, &$line = null): bool {}
function headers_list(): array { }
function headers_list(): array {}
/* {{{ html.c */
@ -686,7 +686,7 @@ class Directory
* @param resource $dir_handle
* @return string|false
*/
public function read($dir_handle = UNKNOWN) { }
public function read($dir_handle = UNKNOWN) {}
}
/**
@ -872,9 +872,9 @@ function fileowner(string $filename): int|false {}
function fileperms(string $filename): int|false {}
function filesize(string $filename): int|false {}
function filesize(string $filename): int|false {}
function filetype(string $filename): string|false {}
function filetype(string $filename): string|false {}
function file_exists(string $filename): bool {}

View file

@ -408,7 +408,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_usleep, 0, 1, IS_VOID, 0)
ZEND_END_ARG_INFO()
#if HAVE_NANOSLEEP
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_nanosleep, 0, 2, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_time_nanosleep, 0, 2, MAY_BE_ARRAY|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, nanoseconds, IS_LONG, 0)
ZEND_END_ARG_INFO()

View file

@ -28,52 +28,52 @@ function gzdecode(string $data, int $max_decoded_len = 0): string|false {}
function gzuncompress(string $data, int $max_decoded_len = 0): string|false {}
/** @param resource $fp */
function gzwrite($fp, string $str, int $length = UNKNOWN): int|false {};
function gzwrite($fp, string $str, int $length = UNKNOWN): int|false {}
/** @param resource $fp */
function gzputs($fp, string $str, int $length = UNKNOWN): int|false {};
function gzputs($fp, string $str, int $length = UNKNOWN): int|false {}
/** @param resource $fp */
function gzrewind($fp): bool {};
function gzrewind($fp): bool {}
/** @param resource $fp */
function gzclose($fp): bool {};
function gzclose($fp): bool {}
/** @param resource $fp */
function gzeof($fp): bool {};
function gzeof($fp): bool {}
/** @param resource $fp */
function gzgetc($fp): string|false {};
function gzgetc($fp): string|false {}
/** @param resource $fp */
function gzpassthru($fp): int {};
function gzpassthru($fp): int {}
/** @param resource $fp */
function gzseek($fp, int $offset, int $whence = SEEK_SET): int {};
function gzseek($fp, int $offset, int $whence = SEEK_SET): int {}
/** @param resource $fp */
function gztell($fp): int|false {};
function gztell($fp): int|false {}
/** @param resource $fp */
function gzread($fp, int $length): string|false {};
function gzread($fp, int $length): string|false {}
/** @param resource $fp */
function gzgets($fp, int $length = 1024): string|false {};
function gzgets($fp, int $length = 1024): string|false {}
/** @return resource|false */
function deflate_init(int $encoding, array $options = []) {};
function deflate_init(int $encoding, array $options = []) {}
/** @param resource $resource */
function deflate_add($resource, string $add, int $flush_behavior = ZLIB_SYNC_FLUSH): string|false {};
function deflate_add($resource, string $add, int $flush_behavior = ZLIB_SYNC_FLUSH): string|false {}
/** @return resource|false */
function inflate_init(int $encoding, array $options = []) {};
function inflate_init(int $encoding, array $options = []) {}
/** @param resource $context */
function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {};
function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
/** @param resource $resource */
function inflate_get_status($resource): int|false {};
function inflate_get_status($resource): int|false {}
/** @param resource $resource */
function inflate_get_read_len($resource): int|false {};
function inflate_get_read_len($resource): int|false {}