Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions generated/apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function apache_lookup_uri(string $filename): object
* Fetches all HTTP request headers from the current request. Works in the
* Apache, FastCGI, CLI, and FPM webservers.
*
* @return \array An associative array of all the HTTP headers in the current request.
* @return array An associative array of all the HTTP headers in the current request.
* @throws ApacheException
*
*/
Expand All @@ -114,7 +114,7 @@ function apache_request_headers(): array
* Fetch all HTTP response headers. Works in the
* Apache, FastCGI, CLI, and FPM webservers.
*
* @return \array An array of all Apache response headers on success.
* @return array An array of all Apache response headers on success.
* @throws ApacheException
*
*/
Expand Down Expand Up @@ -157,7 +157,7 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals
* Please read the apache_request_headers
* documentation for more information on how this function works.
*
* @return \array An associative array of all the HTTP headers in the current request.
* @return array An associative array of all the HTTP headers in the current request.
* @throws ApacheException
*
*/
Expand Down
4 changes: 2 additions & 2 deletions generated/apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @param bool $limited If limited is TRUE, the
* return value will exclude the individual list of cache entries. This
* is useful when trying to optimize calls for statistics gathering.
* @return \array Array of cached data (and meta-data)
* @return array Array of cached data (and meta-data)
* @throws ApcuException
*
*/
Expand Down Expand Up @@ -97,7 +97,7 @@ function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl =
*
* @param bool $limited When set to FALSE (default) apcu_sma_info will
* return a detailed information about each segment.
* @return \array Array of Shared Memory Allocation data; FALSE on failure.
* @return array Array of Shared Memory Allocation data; FALSE on failure.
* @throws ApcuException
*
*/
Expand Down
40 changes: 32 additions & 8 deletions generated/array.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@

use Safe\Exceptions\ArrayException;

/**
* Creates an array by using the values from the
* keys array as keys and the values from the
* values array as the corresponding values.
*
* @param array $keys Array of keys to be used. Illegal values for key will be
* converted to string.
* @param array $values Array of values to be used
* @return array Returns the combined array, FALSE if the number of elements
* for each array isn't equal.
* @throws ArrayException
*
*/
function array_combine(array $keys, array $values): array
{
error_clear_last();
$result = \array_combine($keys, $values);
if ($result === false) {
throw ArrayException::createFromPhpError();
}
return $result;
}


/**
* array_replace_recursive replaces the values of
* array with the same values from all the following
Expand All @@ -23,9 +47,9 @@
* are both arrays, array_replace_recursive will replace
* their respective value recursively.
*
* @param \array $array The array in which elements are replaced.
* @param \array $replacements Arrays from which elements will be extracted.
* @return \array Returns an array.
* @param array $array The array in which elements are replaced.
* @param array $replacements Arrays from which elements will be extracted.
* @return array Returns an array.
* @throws ArrayException
*
*/
Expand Down Expand Up @@ -57,10 +81,10 @@ function array_replace_recursive(array $array, array ...$replacements): array
* array_replace is not recursive : it will replace
* values in the first array by whatever type is in the second array.
*
* @param \array $array The array in which elements are replaced.
* @param \array $replacements Arrays from which elements will be extracted.
* @param array $array The array in which elements are replaced.
* @param array $replacements Arrays from which elements will be extracted.
* Values from later arrays overwrite the previous values.
* @return \array Returns an array.
* @return array Returns an array.
* @throws ArrayException
*
*/
Expand All @@ -84,7 +108,7 @@ function array_replace(array $array, array ...$replacements): array
* element of the array. This function will recurse
* into deeper arrays.
*
* @param \array|object $array The input array.
* @param array|object $array The input array.
* @param callable $callback Typically, callback takes on two parameters.
* The array parameter's value being the first, and
* the key/index second.
Expand Down Expand Up @@ -120,7 +144,7 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): void
* It uses a pseudo random number generator that is not suitable for
* cryptographic purposes.
*
* @param \array $array The array.
* @param array $array The array.
* @throws ArrayException
*
*/
Expand Down
12 changes: 6 additions & 6 deletions generated/cubrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int
* column names of the query result by using req_identifier.
*
* @param resource $req_identifier Request identifier.
* @return \array Array of string values containing the column names, when process is successful.
* @return array Array of string values containing the column names, when process is successful.
* @throws CubridException
*
*/
Expand All @@ -186,7 +186,7 @@ function cubrid_column_names($req_identifier): array
* query results by using req_identifier.
*
* @param resource $req_identifier Request identifier.
* @return \array Array of string values containing the column types, when process is successful.
* @return array Array of string values containing the column types, when process is successful.
* @throws CubridException
*
*/
Expand Down Expand Up @@ -621,7 +621,7 @@ function cubrid_get_client_info(): string
*
* @param resource $conn_identifier The CUBRID connection. If the connection identifier is not specified,
* the last link opened by cubrid_connect is assumed.
* @return \array An associative array with CUBRID database parameters; on success.
* @return array An associative array with CUBRID database parameters; on success.
* @throws CubridException
*
*/
Expand Down Expand Up @@ -711,7 +711,7 @@ function cubrid_insert_id($conn_identifier = null): string
* cubrid_lob_close is used to close all BLOB/CLOB
* returned from cubrid_lob_get.
*
* @param \array $lob_identifier_array LOB identifier array returned from cubrid_lob_get.
* @param array $lob_identifier_array LOB identifier array returned from cubrid_lob_get.
* @throws CubridException
*
*/
Expand Down Expand Up @@ -754,7 +754,7 @@ function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name)
*
* @param resource $conn_identifier Connection identifier.
* @param string $sql SQL statement to be executed.
* @return \array Return an array of LOB resources, when process is successful.
* @return array Return an array of LOB resources, when process is successful.
* @throws CubridException
*
*/
Expand Down Expand Up @@ -1833,7 +1833,7 @@ function cubrid_rollback($conn_identifier): void
* @param int $schema_type Schema data that you want to know.
* @param string $class_name Class you want to know the schema of.
* @param string $attr_name Attribute you want to know the schema of.
* @return \array Array containing the schema information, when process is successful.
* @return array Array containing the schema information, when process is successful.
* @throws CubridException
*
*/
Expand Down
2 changes: 1 addition & 1 deletion generated/curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ function curl_init(string $url = null): \CurlHandle
* @param \CurlMultiHandle $multi_handle A cURL multi handle returned by
* curl_multi_init.
* @param int|null $queued_messages Number of messages that are still in the queue
* @return \array On success, returns an associative array for the message, FALSE on failure.
* @return array On success, returns an associative array for the message, FALSE on failure.
*
*
* Contents of the returned array
Expand Down
8 changes: 4 additions & 4 deletions generated/datetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @param string $format Format accepted by DateTime::createFromFormat.
* @param string $datetime String representing the date/time.
* @return \array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: \array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns associative array with detailed info about given date/time.
* @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns associative array with detailed info about given date/time.
* @throws DatetimeException
*
*/
Expand All @@ -29,7 +29,7 @@ function date_parse_from_format(string $format, string $datetime): ?array
*
* @param string $datetime Date/time in format accepted by
* DateTimeImmutable::__construct.
* @return \array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: \array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns array with information about the parsed date/time
* @return array{year: int|false, month: int|false, day: int|false, hour: int|false, minute: int|false, second: int|false, fraction: float|false, warning_count: int, warnings: string[], error_count: int, errors: string[], is_localtime: bool, zone_type: int|bool, zone: int|bool, is_dst: bool, tz_abbr: string, tz_id: string, relative: array{year: int, month: int, day: int, hour: int, minute: int, second: int, weekday: int, weekdays: int, first_day_of_month: bool, last_day_of_month: bool}}|null Returns array with information about the parsed date/time
* on success.
* @throws DatetimeException
*
Expand All @@ -51,7 +51,7 @@ function date_parse(string $datetime): ?array
* @param int $timestamp Unix timestamp.
* @param float $latitude Latitude in degrees.
* @param float $longitude Longitude in degrees.
* @return \array Returns array on success.
* @return array Returns array on success.
* The structure of the array is detailed in the following list:
*
*
Expand Down Expand Up @@ -1004,7 +1004,7 @@ function strftime(string $format, int $timestamp = null): string
*
* For more information about the format options, read the
* strftime page.
* @return \array Returns an array.
* @return array Returns an array.
*
*
* The following parameters are returned in the array
Expand Down
2 changes: 1 addition & 1 deletion generated/dir.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function opendir(string $directory, $context = null)
* @param resource $context For a description of the context parameter,
* refer to the streams section of
* the manual.
* @return \array Returns an array of filenames on success. If directory is not a directory, then
* @return array Returns an array of filenames on success. If directory is not a directory, then
* boolean FALSE is returned, and an error of level
* E_WARNING is generated.
* @throws DirException
Expand Down
2 changes: 1 addition & 1 deletion generated/exec.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* command.
*
* @param string $command The command that will be executed.
* @param \array|null $output If the output argument is present, then the
* @param array|null $output If the output argument is present, then the
* specified array will be filled with every line of output from the
* command. Trailing whitespace, such as \n, is not
* included in this array. Note that if the array already contains some
Expand Down
14 changes: 7 additions & 7 deletions generated/filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function fflush($stream): void
* @param string $enclosure The optional enclosure parameter sets the field enclosure character (one single-byte character only).
* @param string $escape The optional escape parameter sets the escape character (at most one single-byte character).
* An empty string ("") disables the proprietary escape mechanism.
* @return \array|false|null Returns an indexed array containing the fields read on success.
* @return array|false|null Returns an indexed array containing the fields read on success.
* @throws FilesystemException
*
*/
Expand Down Expand Up @@ -453,7 +453,7 @@ function file_put_contents(string $filename, $data, int $flags = 0, $context = n
*
*
* @param resource $context
* @return \array Returns the file in an array. Each element of the array corresponds to a
* @return array Returns the file in an array. Each element of the array corresponds to a
* line in the file, with the newline still attached. Upon failure,
* file returns FALSE.
* @throws FilesystemException
Expand Down Expand Up @@ -953,7 +953,7 @@ function fread($stream, int $length): string
*
* @param resource $stream A file system pointer resource
* that is typically created using fopen.
* @return \array Returns an array with the statistics of the file; the format of the array
* @return array Returns an array with the statistics of the file; the format of the array
* is described in detail on the stat manual page.
* Returns FALSE on failure.
* @throws FilesystemException
Expand Down Expand Up @@ -1131,7 +1131,7 @@ function fwrite($stream, string $data, int $length = null): int
* systems, like Solaris or Alpine Linux.
*
*
* @return \array Returns an array containing the matched files/directories, an empty array
* @return array Returns an array containing the matched files/directories, an empty array
* if no file matched.
* @throws FilesystemException
*
Expand Down Expand Up @@ -1214,7 +1214,7 @@ function link(string $target, string $link): void
* filename.
*
* @param string $filename Path to a file or a symbolic link.
* @return \array See the manual page for stat for information on
* @return array See the manual page for stat for information on
* the structure of the array that lstat returns.
* This function is identical to the stat function
* except that if the filename parameter is a symbolic
Expand Down Expand Up @@ -1296,7 +1296,7 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal
* are converted to TRUE. "false", "off", "no"
* and "none" are considered FALSE. "null" is converted to NULL
* in typed mode. Also, all numeric strings are converted to integer type if it is possible.
* @return \array The settings are returned as an associative array on success.
* @return array The settings are returned as an associative array on success.
* @throws FilesystemException
*
*/
Expand Down Expand Up @@ -1333,7 +1333,7 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s
* are converted to TRUE. "false", "off", "no"
* and "none" are considered FALSE. "null" is converted to NULL
* in typed mode. Also, all numeric strings are converted to integer type if it is possible.
* @return \array The settings are returned as an associative array on success.
* @return array The settings are returned as an associative array on success.
* @throws FilesystemException
*
*/
Expand Down
8 changes: 4 additions & 4 deletions generated/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @param int $type One of INPUT_GET, INPUT_POST,
* INPUT_COOKIE, INPUT_SERVER, or
* INPUT_ENV.
* @param int|\array $options An array defining the arguments. A valid key is a string
* @param int|array $options An array defining the arguments. A valid key is a string
* containing a variable name and a valid value is either a filter type, or an array
* optionally specifying the filter, flags and options. If the value is an
* array, valid keys are filter which specifies the
Expand All @@ -23,7 +23,7 @@
* This parameter can be also an integer holding a filter constant. Then all values in the
* input array are filtered by this filter.
* @param bool $add_empty Add missing keys as NULL to the return value.
* @return \array|null An array containing the values of the requested variables on success.
* @return array|null An array containing the values of the requested variables on success.
* If the input array designated by type is not populated,
* the function returns NULL if the FILTER_NULL_ON_FAILURE
* flag is not given, or FALSE otherwise. For other failures, FALSE is returned.
Expand Down Expand Up @@ -51,7 +51,7 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt
* This function is useful for retrieving many values without
* repetitively calling filter_var.
*
* @param \array $array An array with string keys containing the data to filter.
* @param array $array An array with string keys containing the data to filter.
* @param mixed $options An array defining the arguments. A valid key is a string
* containing a variable name and a valid value is either a
* filter type, or an
Expand All @@ -65,7 +65,7 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt
* This parameter can be also an integer holding a filter constant. Then all values in the
* input array are filtered by this filter.
* @param bool $add_empty Add missing keys as NULL to the return value.
* @return \array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if
* @return array|null An array containing the values of the requested variables on success. An array value will be FALSE if the filter fails, or NULL if
* the variable is not set.
* @throws FilterException
*
Expand Down
6 changes: 3 additions & 3 deletions generated/ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function ftp_mkdir($ftp, string $directory): string
*
* @param resource $ftp An FTP\Connection instance.
* @param string $directory The directory to be listed.
* @return \array Returns an array of arrays with file infos from the specified directory on success.
* @return array Returns an array of arrays with file infos from the specified directory on success.
* @throws FtpException
*
*/
Expand Down Expand Up @@ -331,7 +331,7 @@ function ftp_nb_put($ftp, string $remote_filename, string $local_filename, int $
* ftp_nlist($ftp, "-la /your/dir");.
* Note that this parameter isn't escaped so there may be some issues with
* filenames containing spaces and other characters.
* @return \array Returns an array of filenames from the specified directory on success.
* @return array Returns an array of filenames from the specified directory on success.
* @throws FtpException
*
*/
Expand Down Expand Up @@ -416,7 +416,7 @@ function ftp_pwd($ftp): string
*
* @param resource $ftp An FTP\Connection instance.
* @param string $command The command to execute.
* @return \array Returns the server's response as an array of strings.
* @return array Returns the server's response as an array of strings.
* No parsing is performed on the response string, nor does
* ftp_raw determine if the command succeeded.
* @throws FtpException
Expand Down
1 change: 1 addition & 0 deletions generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'apcu_inc',
'apcu_sma_info',
'apc_fetch',
'array_combine',
'array_replace',
'array_replace_recursive',
'array_walk_recursive',
Expand Down
4 changes: 2 additions & 2 deletions generated/ibmDb2.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function db2_commit($connection): void
* db2_execute rather than db2_exec.
*
* @param resource $stmt A prepared statement returned from db2_prepare.
* @param \array $parameters An array of input parameters matching any parameter markers contained
* @param array $parameters An array of input parameters matching any parameter markers contained
* in the prepared statement.
* @throws IbmDb2Exception
*
Expand Down Expand Up @@ -842,7 +842,7 @@ function db2_server_info($connection): object
* db2_prepare or a valid connection resource as
* returned from db2_connect or
* db2_pconnect.
* @param \array $options An associative array containing valid statement or connection
* @param array $options An associative array containing valid statement or connection
* options. This parameter can be used to change autocommit values,
* cursor types (scrollable or forward), and to specify the case of
* the column names (lower, upper, or natural) that will appear in a
Expand Down
Loading