]> granicus.if.org Git - php/commitdiff
Fix smaller issues with stubs
authorMáté Kocsis <kocsismate@woohoolabs.com>
Wed, 18 Dec 2019 19:38:40 +0000 (20:38 +0100)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Fri, 20 Dec 2019 13:31:07 +0000 (14:31 +0100)
GH-5025

ext/bcmath/bcmath.stub.php
ext/gd/gd.stub.php
ext/hash/hash.c
ext/hash/hash.stub.php
ext/hash/hash_arginfo.h
ext/standard/basic_functions.c
ext/standard/basic_functions.stub.php
ext/standard/basic_functions_arginfo.h
ext/zlib/zlib.stub.php

index 5f59487f417a02d4e81902dedaf9bae5c6445a4f..0a975352bb85701428b5d37679e90da05a001612 100644 (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 {}
index a1c9a2f74a734a010fc984bcc62cc09a1fbd8a1c..3dbb6948561cff629cf97a074db25f00a1539741 100644 (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
index 94d673ada2380b0e2e75d0fc3c816f77f68086ab..38a32803f441e3164e79e4cb9e90f7dbeff586ce 100644 (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)
index d874a0ab18c122da7847cb8ee031175945a81c98..f17084db1d642af9f3507640d8d62e535671008b 100644 (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 {}
 
index 41d22f4a8e1c3cf297ce03383c7d48754354c6f0..27083f35bd34cd7eb8795fcb8d1fa580ce0bf6f0 100644 (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)
index da97eabf75de2dbf62ac0a835b181699605302ba..7971cce82ed683e633d76c71913a1be9746c22cc 100755 (executable)
@@ -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
 
index 246e9be833e3caeb8972b6f645d6aab49ffe1a65..2a427b8ab8444dba50cf9ab062588397fe3ab55d 100755 (executable)
@@ -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 {}
 
index e67de5024f90f17a38bca6af6b68b1ed40baec6c..93e2a5bda69f5bbad5098ae1791c2401697d99de 100755 (executable)
@@ -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()
index 25fd4e87b1a75dfca3b1160e0382c2325142ab9f..312e570de024d78147d992a3c5c09a15ba946180 100644 (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 {}