Skip to content

Commit 7244f13

Browse files
committed
Fix smaller issues with stubs
1 parent bf645d6 commit 7244f13

File tree

9 files changed

+43
-39
lines changed

9 files changed

+43
-39
lines changed

ext/bcmath/bcmath.stub.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<?php
22

3-
function bcadd(string $left_operand, string $right_operand, int $scale = UNKNOWN) : string {}
3+
function bcadd(string $left_operand, string $right_operand, int $scale = UNKNOWN): string {}
44

5-
function bcsub(string $left_operand, string $right_operand, int $scale = UNKNOWN) : string {}
5+
function bcsub(string $left_operand, string $right_operand, int $scale = UNKNOWN): string {}
66

7-
function bcmul(string $left_operand, string $right_operand, int $scale = UNKNOWN) : string {}
7+
function bcmul(string $left_operand, string $right_operand, int $scale = UNKNOWN): string {}
88

9-
function bcdiv(string $dividend, string $divisor, int $scale = UNKNOWN) : string {}
9+
function bcdiv(string $dividend, string $divisor, int $scale = UNKNOWN): string {}
1010

11-
function bcmod(string $dividend, string $divisor, int $scale = UNKNOWN) : string {}
11+
function bcmod(string $dividend, string $divisor, int $scale = UNKNOWN): string {}
1212

1313
function bcpowmod(string $base, string $exponent, string $modulus, int $scale = UNKNOWN): string|false {}
1414

15-
function bcpow(string $base, string $exponent, int $scale = UNKNOWN) : string {}
15+
function bcpow(string $base, string $exponent, int $scale = UNKNOWN): string {}
1616

17-
function bcsqrt(string $operand, int $scale = UNKNOWN) : string {}
17+
function bcsqrt(string $operand, int $scale = UNKNOWN): string {}
1818

19-
function bccomp(string $left_operand, string $right_operand, int $scale = UNKNOWN) : int {}
19+
function bccomp(string $left_operand, string $right_operand, int $scale = UNKNOWN): int {}
2020

21-
function bcscale(int $scale = UNKNOWN) : int {}
21+
function bcscale(int $scale = UNKNOWN): int {}

ext/gd/gd.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ function imagegetclip(GdImage $im): array {}
205205
#ifdef HAVE_GD_FREETYPE
206206
function imageftbbox(float $size, float $angle, string $font_file, string $text, array $extrainfo = UNKNOWN): array|false {}
207207

208-
function imagefttext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text, array $extrainfo = UNKNOWN) {}
208+
function imagefttext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text, array $extrainfo = UNKNOWN): array|false {}
209209

210-
function imagettfbbox(float $size, float $angle, string $font_file, string $text) {}
210+
function imagettfbbox(float $size, float $angle, string $font_file, string $text): array|false {}
211211

212212
function imagettftext(GdImage $im, float $size, float $angle, int $x, int $y, int $col, string $font_file, string $text) {}
213213
#endif

ext/hash/hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ static const zend_function_entry hash_functions[] = {
13291329
PHP_FE(hash_copy, arginfo_hash_copy)
13301330

13311331
PHP_FE(hash_algos, arginfo_hash_algos)
1332-
PHP_FE(hash_hmac_algos, arginfo_hash_algos)
1332+
PHP_FE(hash_hmac_algos, arginfo_hash_hmac_algos)
13331333
PHP_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
13341334
PHP_FE(hash_equals, arginfo_hash_equals)
13351335
PHP_FE(hash_hkdf, arginfo_hash_hkdf)

ext/hash/hash.stub.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ function hash_copy(HashContext $context): HashContext {}
2424

2525
function hash_algos(): array {}
2626

27+
function hash_hmac_algos(): array {}
28+
2729
function hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $raw_output = false): string {}
2830

2931
/**
3032
* @param $known_string no type juggling is performed
3133
* @param $user_string no type juggling is performed
3234
*/
33-
function hash_equals(string $known_string, string $user_string) : bool {}
35+
function hash_equals(string $known_string, string $user_string): bool {}
3436

3537
function hash_hkdf(string $algo, string $ikm, int $length = 0, string $info = '', string $salt = ''): string {}
3638

ext/hash/hash_arginfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ ZEND_END_ARG_INFO()
5656
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_algos, 0, 0, IS_ARRAY, 0)
5757
ZEND_END_ARG_INFO()
5858

59+
#define arginfo_hash_hmac_algos arginfo_hash_algos
60+
5961
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hash_pbkdf2, 0, 4, IS_STRING, 0)
6062
ZEND_ARG_TYPE_INFO(0, algo, IS_STRING, 0)
6163
ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)

ext/standard/basic_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
129129
PHP_FE(sleep, arginfo_sleep)
130130
PHP_FE(usleep, arginfo_usleep)
131131
#if HAVE_NANOSLEEP
132-
PHP_FE(time_nanosleep, arginfo_nanosleep)
132+
PHP_FE(time_nanosleep, arginfo_time_nanosleep)
133133
PHP_FE(time_sleep_until, arginfo_time_sleep_until)
134134
#endif
135135

ext/standard/basic_functions.stub.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function sleep(int $seconds): int {}
264264
function usleep(int $microseconds): void {}
265265

266266
#if HAVE_NANOSLEEP
267-
function nanosleep(int $seconds, int $nanoseconds): array|bool {}
267+
function time_nanosleep(int $seconds, int $nanoseconds): array|bool {}
268268

269269
function time_sleep_until(float $timestamp): bool {}
270270
#endif
@@ -472,9 +472,9 @@ function inet_pton(string $ip_address): string|false {}
472472
function metaphone(string $text, int $phones = 0): string|false {}
473473

474474
/* {{{ head.c */
475-
function header(string $string, bool $replace = true, int $http_response_code = 0): void { }
475+
function header(string $string, bool $replace = true, int $http_response_code = 0): void {}
476476

477-
function header_remove(string $name = UNKNOWN): void { }
477+
function header_remove(string $name = UNKNOWN): void {}
478478

479479
/** @param int|array $expires_or_options */
480480
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 {}
486486

487487
function headers_sent(&$file = null, &$line = null): bool {}
488488

489-
function headers_list(): array { }
489+
function headers_list(): array {}
490490

491491
/* {{{ html.c */
492492

@@ -686,7 +686,7 @@ public function rewind($dir_handle = UNKNOWN) {}
686686
* @param resource $dir_handle
687687
* @return string|false
688688
*/
689-
public function read($dir_handle = UNKNOWN) { }
689+
public function read($dir_handle = UNKNOWN) {}
690690
}
691691

692692
/**
@@ -872,9 +872,9 @@ function fileowner(string $filename): int|false {}
872872

873873
function fileperms(string $filename): int|false {}
874874

875-
function filesize(string $filename): int|false {}
875+
function filesize(string $filename): int|false {}
876876

877-
function filetype(string $filename): string|false {}
877+
function filetype(string $filename): string|false {}
878878

879879
function file_exists(string $filename): bool {}
880880

ext/standard/basic_functions_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_usleep, 0, 1, IS_VOID, 0)
408408
ZEND_END_ARG_INFO()
409409

410410
#if HAVE_NANOSLEEP
411-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_nanosleep, 0, 2, MAY_BE_ARRAY|MAY_BE_BOOL)
411+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_time_nanosleep, 0, 2, MAY_BE_ARRAY|MAY_BE_BOOL)
412412
ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0)
413413
ZEND_ARG_TYPE_INFO(0, nanoseconds, IS_LONG, 0)
414414
ZEND_END_ARG_INFO()

ext/zlib/zlib.stub.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,52 +28,52 @@ function gzdecode(string $data, int $max_decoded_len = 0): string|false {}
2828
function gzuncompress(string $data, int $max_decoded_len = 0): string|false {}
2929

3030
/** @param resource $fp */
31-
function gzwrite($fp, string $str, int $length = UNKNOWN): int|false {};
31+
function gzwrite($fp, string $str, int $length = UNKNOWN): int|false {}
3232

3333
/** @param resource $fp */
34-
function gzputs($fp, string $str, int $length = UNKNOWN): int|false {};
34+
function gzputs($fp, string $str, int $length = UNKNOWN): int|false {}
3535

3636
/** @param resource $fp */
37-
function gzrewind($fp): bool {};
37+
function gzrewind($fp): bool {}
3838

3939
/** @param resource $fp */
40-
function gzclose($fp): bool {};
40+
function gzclose($fp): bool {}
4141

4242
/** @param resource $fp */
43-
function gzeof($fp): bool {};
43+
function gzeof($fp): bool {}
4444

4545
/** @param resource $fp */
46-
function gzgetc($fp): string|false {};
46+
function gzgetc($fp): string|false {}
4747

4848
/** @param resource $fp */
49-
function gzpassthru($fp): int {};
49+
function gzpassthru($fp): int {}
5050

5151
/** @param resource $fp */
52-
function gzseek($fp, int $offset, int $whence = SEEK_SET): int {};
52+
function gzseek($fp, int $offset, int $whence = SEEK_SET): int {}
5353

5454
/** @param resource $fp */
55-
function gztell($fp): int|false {};
55+
function gztell($fp): int|false {}
5656

5757
/** @param resource $fp */
58-
function gzread($fp, int $length): string|false {};
58+
function gzread($fp, int $length): string|false {}
5959

6060
/** @param resource $fp */
61-
function gzgets($fp, int $length = 1024): string|false {};
61+
function gzgets($fp, int $length = 1024): string|false {}
6262

6363
/** @return resource|false */
64-
function deflate_init(int $encoding, array $options = []) {};
64+
function deflate_init(int $encoding, array $options = []) {}
6565

6666
/** @param resource $resource */
67-
function deflate_add($resource, string $add, int $flush_behavior = ZLIB_SYNC_FLUSH): string|false {};
67+
function deflate_add($resource, string $add, int $flush_behavior = ZLIB_SYNC_FLUSH): string|false {}
6868

6969
/** @return resource|false */
70-
function inflate_init(int $encoding, array $options = []) {};
70+
function inflate_init(int $encoding, array $options = []) {}
7171

7272
/** @param resource $context */
73-
function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {};
73+
function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string|false {}
7474

7575
/** @param resource $resource */
76-
function inflate_get_status($resource): int|false {};
76+
function inflate_get_status($resource): int|false {}
7777

7878
/** @param resource $resource */
79-
function inflate_get_read_len($resource): int|false {};
79+
function inflate_get_read_len($resource): int|false {}

0 commit comments

Comments
 (0)