fix optional parameters

This commit is contained in:
Ivan Fedorov 2021-06-28 19:01:20 +03:00 committed by Ivan Fedorov
parent bfcb707357
commit a70cb38071
8 changed files with 14 additions and 15 deletions

View File

@ -2479,7 +2479,7 @@ function curl_reset(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'], default: '
* Run the sub-connections of the current cURL handle
* @link https://php.net/manual/en/function.curl-multi-exec.php
* @param CurlMultiHandle|resource $multi_handle
* @param int &$still_running [optional] <p>
* @param int &$still_running <p>
* A reference to a flag to tell whether the operations are still running.
* </p>
* @return int A cURL code defined in the cURL Predefined Constants.

View File

@ -412,7 +412,7 @@ function gmdate(string $format, ?int $timestamp) {}
/**
* Get Unix timestamp for a date
* @link https://php.net/manual/en/function.mktime.php
* @param int $hour [optional] <p>
* @param int $hour <p>
* The number of the hour.
* </p>
* @param int|null $minute [optional] <p>
@ -461,7 +461,7 @@ function gmdate(string $format, ?int $timestamp) {}
*/
#[Pure]
function mktime(
int $hour = null,
int $hour,
?int $minute = null,
?int $second = null,
?int $month = null,
@ -474,7 +474,7 @@ function mktime(
/**
* Get Unix timestamp for a GMT date
* @link https://php.net/manual/en/function.gmmktime.php
* @param int $hour [optional] <p>
* @param int $hour <p>
* The hour
* </p>
* @param int $minute [optional] <p>
@ -500,7 +500,7 @@ function mktime(
*/
#[Pure]
function gmmktime(
int $hour = null,
int $hour,
?int $minute = null,
?int $second = null,
?int $month = null,

View File

@ -803,7 +803,7 @@ function mb_decode_mimeheader(string $string): string {}
* is omitted, detect_order is used.
* </p>
* @param string|array|object &$var var is the reference to the variable being converted.
* @param string|array|object &...$vars <p>
* @param string|array|object &...$vars [optional] <p>
* vars is the other references to the
* variables being converted. String, Array and Object are accepted.
* mb_convert_variables assumes all parameters

View File

@ -1886,7 +1886,7 @@ function mysqli_get_client_info(?mysqli $mysql) {}
* @link https://php.net/manual/en/mysqli.get-client-version.php
* @return int
*/
function mysqli_get_client_version($link): int {}
function mysqli_get_client_version(): int {}
/**
* Returns a string representing the type of connection used
@ -2621,10 +2621,9 @@ function mysqli_client_encoding(mysqli $mysql): string {}
* @link https://php.net/manual/en/function.mysqli-escape-string.php
* @param mysqli $mysql A link identifier returned by mysqli_connect() or mysqli_init()
* @param string $string The string to be escaped
* @param $resultmode [optional]
* @return string
*/
function mysqli_escape_string(mysqli $mysql, string $string, $resultmode): string {}
function mysqli_escape_string(mysqli $mysql, string $string): string {}
/**
* Alias for <b>mysqli_stmt_fetch</b>

View File

@ -770,7 +770,7 @@ function openssl_verify(
* @param string &$sealed_data
* @param array &$encrypted_keys
* @param array $public_key
* @param string $cipher_algo [optional]
* @param string $cipher_algo
* @param string &$iv [optional]
* @return int|false the length of the sealed data on success, or false on error.
* If successful the sealed data is returned in
@ -789,7 +789,7 @@ function openssl_seal(string $data, &$sealed_data, &$encrypted_keys, array $publ
* </p>
* @param string $encrypted_key
* @param OpenSSLAsymmetricKey|OpenSSLCertificate|array|string $private_key
* @param string $cipher_algo [optional] The cipher method.
* @param string $cipher_algo The cipher method.
* @param string|null $iv [optional] The initialization vector.
* @return bool true on success or false on failure.
*/
@ -798,7 +798,7 @@ function openssl_open(
&$output,
string $encrypted_key,
#[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'], default: 'resource|array|string')] $private_key,
string $cipher_algo = "RC4",
string $cipher_algo,
?string $iv
): bool {}

View File

@ -361,7 +361,7 @@ function highlight_string(string $string, bool $return = false): string|bool {}
* Otherwise the nanoseconds are returned as integer (64bit platforms) or float (32bit platforms).
*/
#[Pure]
function hrtime(bool $as_number = false): array|int|float|false {}
function hrtime(bool $as_number): array|int|float|false {}
/**
* Return source with stripped comments and whitespace

View File

@ -750,6 +750,7 @@ function array_filter(array $array, ?callable $callback, int $mode = 0): array {
*/
function array_map(
?callable $callback,
#[PhpStormStubsElementAvailable(from:'8.0')] array $array,
array ...$arrays): array {}
/**

View File

@ -89,10 +89,9 @@ function xdebug_stop_function_monitor() {}
/**
* Returns a structure which contains information about where the monitored functions were executed in your script.
* @param $clear [optional]
* @return array
*/
function xdebug_get_monitored_functions($clear): array {}
function xdebug_get_monitored_functions(): array {}
/**
* This function displays structured information about one or more expressions that includes its type and value.