Skip to content

Commit dffeddb

Browse files
authored
Merge pull request #134 from Kharhamel/parameters
improved parameter generation (both signature and doc-block)
2 parents 753599a + 15aea05 commit dffeddb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+800
-563
lines changed

generated/apc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function apc_compile_file(string $filename, bool $atomic = true)
8282
*
8383
* @param string $key The key of the value being decreased.
8484
* @param int $step The step, or value to decrease.
85-
* @param bool $success Optionally pass the success or fail boolean value to
85+
* @param bool|null $success Optionally pass the success or fail boolean value to
8686
* this referenced variable.
8787
* @return int Returns the current value of key's value on success
8888
* @throws ApcException
@@ -164,7 +164,7 @@ function apc_delete_file($keys)
164164
* @throws ApcException
165165
*
166166
*/
167-
function apc_delete(string $key)
167+
function apc_delete($key)
168168
{
169169
error_clear_last();
170170
$result = \apc_delete($key);
@@ -180,7 +180,7 @@ function apc_delete(string $key)
180180
*
181181
* @param string $key The key of the value being increased.
182182
* @param int $step The step, or value to increase.
183-
* @param bool $success Optionally pass the success or fail boolean value to
183+
* @param bool|null $success Optionally pass the success or fail boolean value to
184184
* this referenced variable.
185185
* @return int Returns the current value of key's value on success
186186
* @throws ApcException

generated/apcu.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function apcu_cas(string $key, int $old, int $new): void
5151
*
5252
* @param string $key The key of the value being decreased.
5353
* @param int $step The step, or value to decrease.
54-
* @param bool $success Optionally pass the success or fail boolean value to
54+
* @param bool|null $success Optionally pass the success or fail boolean value to
5555
* this referenced variable.
5656
* @param int $ttl TTL to use if the operation inserts a new value (rather than decrementing an existing one).
5757
* @return int Returns the current value of key's value on success
@@ -97,7 +97,7 @@ function apcu_delete($key)
9797
*
9898
* @param string $key The key of the value being increased.
9999
* @param int $step The step, or value to increase.
100-
* @param bool $success Optionally pass the success or fail boolean value to
100+
* @param bool|null $success Optionally pass the success or fail boolean value to
101101
* this referenced variable.
102102
* @param int $ttl TTL to use if the operation inserts a new value (rather than incrementing an existing one).
103103
* @return int Returns the current value of key's value on success

generated/array.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function array_multisort(array &$array1, $array1_sort_order = SORT_ASC, $array1_
153153
*
154154
* @param array $array1 The array in which elements are replaced.
155155
* @param array $params Optional. Arrays from which elements will be extracted.
156-
* @return array Returns an array, or NULL if an error occurs.
156+
* @return array|null Returns an array, or NULL if an error occurs.
157157
* @throws ArrayException
158158
*
159159
*/
@@ -188,7 +188,7 @@ function array_replace_recursive(array $array1, array ...$params): array
188188
* @param array $array1 The array in which elements are replaced.
189189
* @param array $params Arrays from which elements will be extracted.
190190
* Values from later arrays overwrite the previous values.
191-
* @return array Returns an array, or NULL if an error occurs.
191+
* @return array|null Returns an array, or NULL if an error occurs.
192192
* @throws ArrayException
193193
*
194194
*/

generated/bzip2.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*
1010
* @param resource $bz The file pointer. It must be valid and must point to a file
1111
* successfully opened by bzopen.
12-
* @return int Returns TRUE on success.
1312
* @throws Bzip2Exception
1413
*
1514
*/
@@ -29,7 +28,6 @@ function bzclose($bz): void
2928
*
3029
* @param resource $bz The file pointer. It must be valid and must point to a file
3130
* successfully opened by bzopen.
32-
* @return int Returns TRUE on success.
3331
* @throws Bzip2Exception
3432
*
3533
*/

generated/com.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* @throws ComException
2727
*
2828
*/
29-
function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = null): void
29+
function com_event_sink(object $comobject, object $sinkobject, $sinkinterface = null): void
3030
{
3131
error_clear_last();
3232
if ($sinkinterface !== null) {

generated/curl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ function curl_multi_errno($mh): int
495495
*
496496
* @param resource $mh A cURL multi handle returned by
497497
* curl_multi_init.
498-
* @param int $msgs_in_queue Number of messages that are still in the queue
498+
* @param int|null $msgs_in_queue Number of messages that are still in the queue
499499
* @return array On success, returns an associative array for the message, FALSE on failure.
500500
*
501501
*
@@ -528,7 +528,7 @@ function curl_multi_errno($mh): int
528528
* @throws CurlException
529529
*
530530
*/
531-
function curl_multi_info_read($mh, int &$msgs_in_queue = null): array
531+
function curl_multi_info_read($mh, ?int &$msgs_in_queue = null): array
532532
{
533533
error_clear_last();
534534
$result = \curl_multi_info_read($mh, $msgs_in_queue);

generated/filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ function filesize(string $filename): int
565565
* It is also possible to add LOCK_NB as a bitmask to one
566566
* of the above operations if you don't want flock to
567567
* block while locking.
568-
* @param int $wouldblock The optional third argument is set to 1 if the lock would block
568+
* @param int|null $wouldblock The optional third argument is set to 1 if the lock would block
569569
* (EWOULDBLOCK errno condition).
570570
* @throws FilesystemException
571571
*

generated/ftp.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function ftp_alloc($ftp_stream, int $filesize, string &$result = null): void
3535
* @throws FtpException
3636
*
3737
*/
38-
function ftp_append($ftp, string $remote_file, string $local_file, int $mode = FTP_IMAGE): void
38+
function ftp_append($ftp, string $remote_file, string $local_file, int $mode = FTP_BINARY): void
3939
{
4040
error_clear_last();
4141
$result = \ftp_append($ftp, $remote_file, $local_file, $mode);
@@ -179,7 +179,7 @@ function ftp_delete($ftp_stream, string $path): void
179179
* @throws FtpException
180180
*
181181
*/
182-
function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_IMAGE, int $resumepos = 0): void
182+
function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_BINARY, int $resumepos = 0): void
183183
{
184184
error_clear_last();
185185
$result = \ftp_fget($ftp_stream, $handle, $remote_file, $mode, $resumepos);
@@ -202,7 +202,7 @@ function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_IMA
202202
* @throws FtpException
203203
*
204204
*/
205-
function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_IMAGE, int $startpos = 0): void
205+
function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_BINARY, int $startpos = 0): void
206206
{
207207
error_clear_last();
208208
$result = \ftp_fput($ftp_stream, $remote_file, $handle, $mode, $startpos);
@@ -353,7 +353,7 @@ function ftp_pasv($ftp_stream, bool $pasv): void
353353
* @throws FtpException
354354
*
355355
*/
356-
function ftp_put($ftp_stream, string $remote_file, string $local_file, int $mode = FTP_IMAGE, int $startpos = 0): void
356+
function ftp_put($ftp_stream, string $remote_file, string $local_file, int $mode = FTP_BINARY, int $startpos = 0): void
357357
{
358358
error_clear_last();
359359
$result = \ftp_put($ftp_stream, $remote_file, $local_file, $mode, $startpos);

generated/funchand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function create_function(string $args, string $code): string
2828
/**
2929
*
3030
*
31-
* @param callable $function The function to register.
31+
* @param callable(): void $function The function to register.
3232
* @param mixed $params
3333
* @throws FunchandException
3434
*

generated/gmp.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
/**
88
* Calculates the binomial coefficient C(n, k).
99
*
10-
* @param mixed $n Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
10+
* @param \GMP|string|int $n Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
1111
* @param int $k
12-
* @return \\GMP Returns the binomial coefficient C(n, k).
12+
* @return \GMP Returns the binomial coefficient C(n, k).
1313
* @throws GmpException
1414
*
1515
*/
@@ -34,7 +34,7 @@ function gmp_binomial($n, int $k): \GMP
3434
* @throws GmpException
3535
*
3636
*/
37-
function gmp_export(\GMP $gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string
37+
function gmp_export($gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string
3838
{
3939
error_clear_last();
4040
$result = \gmp_export($gmpnumber, $word_size, $options);

0 commit comments

Comments
 (0)