diff --git a/generated/apache.php b/generated/apache.php index 2bb3632a..2c68d850 100644 --- a/generated/apache.php +++ b/generated/apache.php @@ -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 * */ @@ -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 * */ @@ -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 * */ diff --git a/generated/apcu.php b/generated/apcu.php index 733b2436..1ba8e432 100644 --- a/generated/apcu.php +++ b/generated/apcu.php @@ -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 * */ @@ -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 * */ diff --git a/generated/array.php b/generated/array.php index f1fe2bde..9e6ce7c4 100644 --- a/generated/array.php +++ b/generated/array.php @@ -4,30 +4,6 @@ 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 @@ -47,9 +23,9 @@ function array_combine(array $keys, array $values): array * 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 * */ @@ -81,10 +57,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 * */ @@ -108,7 +84,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. @@ -144,7 +120,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 * */ diff --git a/generated/cubrid.php b/generated/cubrid.php index 559bc973..d0c5af3e 100644 --- a/generated/cubrid.php +++ b/generated/cubrid.php @@ -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 * */ @@ -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 * */ @@ -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 * */ @@ -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 * */ @@ -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 * */ @@ -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 * */ diff --git a/generated/curl.php b/generated/curl.php index a85379a6..fcb06df2 100644 --- a/generated/curl.php +++ b/generated/curl.php @@ -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 diff --git a/generated/datetime.php b/generated/datetime.php index 9ab44a47..f2f6ea62 100644 --- a/generated/datetime.php +++ b/generated/datetime.php @@ -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 * */ @@ -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 * @@ -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: * * @@ -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 diff --git a/generated/dir.php b/generated/dir.php index fe4ea5af..c9523565 100644 --- a/generated/dir.php +++ b/generated/dir.php @@ -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 diff --git a/generated/exec.php b/generated/exec.php index c4dd4911..5163694e 100644 --- a/generated/exec.php +++ b/generated/exec.php @@ -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 diff --git a/generated/filesystem.php b/generated/filesystem.php index 833719b6..7df9b745 100644 --- a/generated/filesystem.php +++ b/generated/filesystem.php @@ -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 * */ @@ -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 @@ -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 @@ -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 * @@ -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 @@ -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 * */ @@ -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 * */ diff --git a/generated/filter.php b/generated/filter.php index aba02b4d..0618cfce 100644 --- a/generated/filter.php +++ b/generated/filter.php @@ -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 @@ -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. @@ -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 @@ -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 * diff --git a/generated/ftp.php b/generated/ftp.php index 23846bf1..01a5ac55 100644 --- a/generated/ftp.php +++ b/generated/ftp.php @@ -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 * */ @@ -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 * */ @@ -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 diff --git a/generated/functionsList.php b/generated/functionsList.php index 58e78822..b1c28d6f 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -14,7 +14,6 @@ 'apcu_inc', 'apcu_sma_info', 'apc_fetch', - 'array_combine', 'array_replace', 'array_replace_recursive', 'array_walk_recursive', diff --git a/generated/ibmDb2.php b/generated/ibmDb2.php index f97e7b08..2425554e 100644 --- a/generated/ibmDb2.php +++ b/generated/ibmDb2.php @@ -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 * @@ -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 diff --git a/generated/image.php b/generated/image.php index 91342964..061eb227 100644 --- a/generated/image.php +++ b/generated/image.php @@ -17,7 +17,7 @@ * @param string $filename This parameter specifies the file you wish to retrieve information * about. It can reference a local file or (configuration permitting) a * remote file using one of the supported streams. - * @param array|null $image_info This optional parameter allows you to extract some extended + * @param \array|null $image_info This optional parameter allows you to extract some extended * information from the image file. Currently, this will return the * different JPG APP markers as an associative array. * Some programs use these APP markers to embed text information in @@ -28,7 +28,7 @@ * * The image_info only supports * JFIF files. - * @return array Returns an array with up to 7 elements. Not all image types will include + * @return \array Returns an array with up to 7 elements. Not all image types will include * the channels and bits elements. * * Index 0 and 1 contains respectively the width and the height of the image. @@ -133,8 +133,8 @@ function image2wbmp($image, ?string $filename = null, int $foreground = null): v * * @param resource $image A GdImage object, returned by one of the image creation functions, * such as imagecreatetruecolor. - * @param array $affine Array with keys 0 to 5. - * @param array $clip Array with keys "x", "y", "width" and "height"; or NULL. + * @param \array $affine Array with keys 0 to 5. + * @param \array $clip Array with keys "x", "y", "width" and "height"; or NULL. * @return resource Return affined image object on success. * @throws ImageException * @@ -159,11 +159,11 @@ function imageaffine($image, array $affine, array $clip = null) * what is useful if multiple transformations should be applied to the same * image in one go. * - * @param array $matrix1 An affine transformation matrix (an array with keys + * @param \array $matrix1 An affine transformation matrix (an array with keys * 0 to 5 and float values). - * @param array $matrix2 An affine transformation matrix (an array with keys + * @param \array $matrix2 An affine transformation matrix (an array with keys * 0 to 5 and float values). - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys + * @return \array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys * 0 to 5 and float values). * @throws ImageException * @@ -183,7 +183,7 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array * Returns an affine transformation matrix. * * @param int $type One of the IMG_AFFINE_* constants. - * @param array|float $options If type is IMG_AFFINE_TRANSLATE + * @param \array|float $options If type is IMG_AFFINE_TRANSLATE * or IMG_AFFINE_SCALE, * options has to be an array with keys x * and y, both having float values. @@ -191,7 +191,7 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array * If type is IMG_AFFINE_ROTATE, * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, * options has to be a float specifying the angle. - * @return array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys + * @return \array{0:float,1:float,2:float,3:float,4:float,5:float} An affine transformation matrix (an array with keys * 0 to 5 and float values). * @throws ImageException * @@ -509,7 +509,7 @@ function imagecolorset($image, int $color, int $red, int $green, int $blue, int * * @param resource $image A GdImage object, returned by one of the image creation functions, * such as imagecreatetruecolor. - * @param array $matrix A 3x3 matrix: an array of three arrays of three floats. + * @param \array $matrix A 3x3 matrix: an array of three arrays of three floats. * @param float $divisor The divisor of the result of the convolution, used for normalization. * @param float $offset Color offset. * @throws ImageException @@ -1039,7 +1039,7 @@ function imagecreatetruecolor(int $width, int $height) * * @param resource $image A GdImage object, returned by one of the image creation functions, * such as imagecreatetruecolor. - * @param array $rectangle The cropping rectangle as array with keys + * @param \array $rectangle The cropping rectangle as array with keys * x, y, width and * height. * @return resource Return cropped image object on success. @@ -1504,7 +1504,7 @@ function imageflip($image, int $mode): void * search for files that do not begin with a leading '/' by appending * '.ttf' to the filename and searching along a library-defined font path. * @param string $string The string to be measured. - * @param array $options + * @param \array $options * Possible array indexes for options * * @@ -1523,7 +1523,7 @@ function imageflip($image, int $mode): void * * * - * @return array imageftbbox returns an array with 8 + * @return \array imageftbbox returns an array with 8 * elements representing four points making the bounding box of the * text: * @@ -1619,7 +1619,7 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s * ]]> * * @param string $text Text to be inserted into image. - * @param array $options + * @param \array $options * Possible array indexes for options * * @@ -1638,7 +1638,7 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s * * * - * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: + * @return \array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise: * * * @@ -2419,7 +2419,7 @@ function imagesetpixel($image, int $x, int $y, int $color): void * * @param resource $image A GdImage object, returned by one of the image creation functions, * such as imagecreatetruecolor. - * @param array $style An array of pixel colors. You can use the + * @param \array $style An array of pixel colors. You can use the * IMG_COLOR_TRANSPARENT constant to add a * transparent pixel. * Note that style must not be an empty array. @@ -2634,8 +2634,8 @@ function imagetruecolortopalette($image, bool $dither, int $num_colors): void * Note that open_basedir does * not apply to fontfile. * @param string $string The string to be measured. - * @param array $options - * @return array imagettfbbox returns an array with 8 + * @param \array $options + * @return \array imagettfbbox returns an array with 8 * elements representing four points making the bounding box of the * text on success and FALSE on error. * @@ -2757,8 +2757,8 @@ function imagettfbbox(float $size, float $angle, string $font_filename, string $ * * If a character is used in the string which is not supported by the * font, a hollow rectangle will replace the character. - * @param array $options - * @return array Returns an array with 8 elements representing four points making the + * @param \array $options + * @return \array Returns an array with 8 elements representing four points making the * bounding box of the text. The order of the points is lower left, lower * right, upper right, upper left. The points are relative to the text * regardless of the angle, so "upper left" means in the top left-hand @@ -2893,7 +2893,7 @@ function iptcembed(string $iptc_data, string $filename, int $spool = 0) * Parses an IPTC block into its single tags. * * @param string $iptc_block A binary IPTC block. - * @return array Returns an array using the tagmarker as an index and the value as the + * @return \array Returns an array using the tagmarker as an index and the value as the * value. It returns FALSE on error or if no IPTC data was found. * @throws ImageException * diff --git a/generated/imap.php b/generated/imap.php index 917a8e20..a3741b47 100644 --- a/generated/imap.php +++ b/generated/imap.php @@ -322,7 +322,7 @@ function imap_deletemailbox($imap, string $mailbox): void * @param int $flags sequence will contain a sequence of message * indices or UIDs, if this parameter is set to * FT_UID. - * @return array Returns an array of objects describing one message header each. + * @return \array Returns an array of objects describing one message header each. * The object will only define a property if it exists. The possible * properties are: * @@ -734,7 +734,7 @@ function imap_gc($imap, int $flags): void * @param resource $imap An IMAP\Connection instance. * @param string $mailbox The mailbox name, see imap_open for more * information - * @return array Returns an associative array of "folder" => "acl" pairs. + * @return \array Returns an associative array of "folder" => "acl" pairs. * @throws ImapException * */ @@ -769,7 +769,7 @@ function imap_getacl($imap, string $mailbox): array * '%' as the pattern * parameter will return only the top level * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each + * @return \array Returns an array of objects containing mailbox information. Each * object has the attributes name, specifying * the full name of the mailbox; delimiter, * which is the hierarchy delimiter for the part of the hierarchy @@ -858,7 +858,7 @@ function imap_getmailboxes($imap, string $reference, string $pattern): array * '%' as the pattern * parameter will return only the top level * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of objects containing mailbox information. Each + * @return \array Returns an array of objects containing mailbox information. Each * object has the attributes name, specifying * the full name of the mailbox; delimiter, * which is the hierarchy delimiter for the part of the hierarchy @@ -1150,7 +1150,7 @@ function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $sub * Returns headers for all messages in a mailbox. * * @param resource $imap An IMAP\Connection instance. - * @return array Returns an array of string formatted with header info. One + * @return \array Returns an array of string formatted with header info. One * element per mail message. * Returns FALSE on failure. * @throws ImapException @@ -1193,7 +1193,7 @@ function imap_headers($imap): array * parameter will return only the top level * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. * @param string $content The searched string - * @return array Returns an array containing the names of the mailboxes that have + * @return \array Returns an array containing the names of the mailboxes that have * content in the text of the mailbox. * @throws ImapException * @@ -1229,7 +1229,7 @@ function imap_listscan($imap, string $reference, string $pattern, string $conten * '%' as the pattern * parameter will return only the top level * mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox in the ~/mail directory, but none in subfolders of that directory. - * @return array Returns an array of all the subscribed mailboxes. + * @return \array Returns an array of all the subscribed mailboxes. * @throws ImapException * */ @@ -1248,12 +1248,12 @@ function imap_lsub($imap, string $reference, string $pattern): array * Create a MIME message based on the given envelope * and bodies sections. * - * @param array $envelope An associative array of header fields. Valid keys are: "remail", + * @param \array $envelope An associative array of header fields. Valid keys are: "remail", * "return_path", "date", "from", "reply_to", "in_reply_to", "subject", * "to", "cc", "bcc" and "message_id", which set the respective message headers to the given string. * To set additional headers, the key "custom_headers" is supported, which expects * an array of those headers, e.g. ["User-Agent: My Mail Client"]. - * @param array $bodies An indexed array of bodies. The first body is the main body of the message; + * @param \array $bodies An indexed array of bodies. The first body is the main body of the message; * only if it has a type of TYPEMULTIPART, further bodies * are processed; these bodies constitute the bodies of the parts. * @@ -1539,7 +1539,7 @@ function imap_mailboxmsginfo($imap): \stdClass * Decodes MIME message header extensions that are non ASCII text (see RFC2047). * * @param string $string The MIME text - * @return array The decoded elements are returned in an array of objects, where each + * @return \array The decoded elements are returned in an array of objects, where each * object has two properties, charset and * text. * @@ -1791,7 +1791,7 @@ function imap_num_msg($imap): int * * * @param int $retries Number of maximum connect attempts - * @param array $options Connection parameters, the following (string) keys maybe used + * @param \array $options Connection parameters, the following (string) keys maybe used * to set one or more connection parameters: * * @@ -2058,7 +2058,7 @@ function imap_setflag_full($imap, string $sequence, string $flag, int $options = * @param string $search_criteria IMAP2-format search criteria string. For details see * imap_search. * @param string $charset MIME character set to use when sorting strings. - * @return array Returns an array of message numbers sorted by the given + * @return \array Returns an array of message numbers sorted by the given * parameters. * @throws ImapException * @@ -2170,7 +2170,7 @@ function imap_subscribe($imap, string $mailbox): void * * @param resource $imap An IMAP\Connection instance. * @param int $flags - * @return array imap_thread returns an associative array containing + * @return \array imap_thread returns an associative array containing * a tree of messages threaded by REFERENCES. * * Every message in the current mailbox will be represented by three entries diff --git a/generated/info.php b/generated/info.php index aefa0819..5c2ab5f4 100644 --- a/generated/info.php +++ b/generated/info.php @@ -321,7 +321,7 @@ function getmyuid(): int * Parses options passed to the script. * * @param string $short_options - * @param array $long_options + * @param \array $long_options * @param int|null $rest_index * @return \__benevolent This function will return an array of option / argument pairs. * @throws InfoException @@ -344,7 +344,7 @@ function getopt(string $short_options, array $long_options = [], ?int &$rest_ind * * @param int $mode If mode is 1, getrusage will be called with * RUSAGE_CHILDREN. - * @return array Returns an associative array containing the data returned from the system + * @return \array Returns an associative array containing the data returned from the system * call. All entries are accessible by using their documented field names. * Returns FALSE on failure. * @throws InfoException diff --git a/generated/ldap.php b/generated/ldap.php index 97b42e5a..ed463852 100644 --- a/generated/ldap.php +++ b/generated/ldap.php @@ -33,7 +33,7 @@ function ldap_8859_to_t61(string $value): string * * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An array that specifies the information about the entry. The values in + * @param \array $entry An array that specifies the information about the entry. The values in * the entries are indexed by individual attributes. * In case of multiple values for an attribute, they are indexed using * integers starting with 0. @@ -43,7 +43,7 @@ function ldap_8859_to_t61(string $value): string * ]]> * * - * @param array $controls Array of LDAP Controls to send with the request. + * @param \array $controls Array of LDAP Controls to send with the request. * @throws LdapException * */ @@ -155,7 +155,7 @@ function ldap_count_entries($ldap, $result): int * * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $controls Array of LDAP Controls to send with the request. + * @param \array $controls Array of LDAP Controls to send with the request. * @throws LdapException * */ @@ -200,7 +200,7 @@ function ldap_dn2ufn(string $dn): string * @param string $user dn of the user to change the password of. * @param string $old_password The old password of this user. May be ommited depending of server configuration. * @param string $new_password The new password for this user. May be omitted or empty to have a generated password. - * @param array $controls If provided, a password policy request control is send with the request and this is + * @param \array $controls If provided, a password policy request control is send with the request and this is * filled with an array of LDAP Controls * returned with the request. * @return string|bool Returns the generated password if new_password is empty or omitted. @@ -246,7 +246,7 @@ function ldap_exop_whoami($ldap) * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param string $reqoid The extended operation request OID. You may use one of LDAP_EXOP_START_TLS, LDAP_EXOP_MODIFY_PASSWD, LDAP_EXOP_REFRESH, LDAP_EXOP_WHO_AM_I, LDAP_EXOP_TURN, or a string with the OID of the operation you want to send. * @param string $reqdata The extended operation request data. May be NULL for some operations like LDAP_EXOP_WHO_AM_I, may also need to be BER encoded. - * @param array|null $serverctrls Array of LDAP Controls to send with the request. + * @param \array|null $serverctrls Array of LDAP Controls to send with the request. * @param string|null $retdata Will be filled with the extended operation response data if provided. * If not provided you may use ldap_parse_exop on the result object * later to get this data. @@ -287,7 +287,7 @@ function ldap_exop($ldap, string $reqoid, string $reqdata = null, ?array $server * attributes as well. To get RDNs with the attributes (i.e. in * attribute=value format) set with_attrib to 0 * and to get only values set it to 1. - * @return array Returns an array of all DN components. + * @return \array Returns an array of all DN components. * The first element in the array has count key and * represents the number of returned values, next elements are numerically * indexed DN components. @@ -396,7 +396,7 @@ function ldap_free_result($result): void * * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param resource $entry An LDAP\ResultEntry instance. - * @return array Returns a complete entry information in a multi-dimensional array + * @return \array Returns a complete entry information in a multi-dimensional array * on success and FALSE on error. * @throws LdapException * @@ -438,7 +438,7 @@ function ldap_get_dn($ldap, $entry): string * * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param resource $result An LDAP\Result instance, returned by ldap_list or ldap_search. - * @return array Returns a complete result information in a multi-dimensional array on + * @return \array Returns a complete result information in a multi-dimensional array on * success. * * The structure of the array is as follows. @@ -665,7 +665,7 @@ function ldap_get_option($ldap, int $option, &$value = null): void * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param resource $entry An LDAP\ResultEntry instance. * @param string $attribute - * @return array Returns an array of values for the attribute on success and FALSE on + * @return \array Returns an array of values for the attribute on success and FALSE on * error. Individual values are accessed by integer index in the array. The * first index is 0. The number of values can be found by indexing "count" * in the resultant array. @@ -698,7 +698,7 @@ function ldap_get_values_len($ldap, $entry, string $attribute): array * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param resource $entry An LDAP\ResultEntry instance. * @param string $attribute - * @return array Returns an array of values for the attribute on success and FALSE on + * @return \array Returns an array of values for the attribute on success and FALSE on * error. The number of values can be found by indexing "count" in the * resultant array. Individual values are accessed by integer index in the * array. The first index is 0. @@ -733,8 +733,8 @@ function ldap_get_values($ldap, $entry, string $attribute): array * * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. - * @param array $controls Array of LDAP Controls to send with the request. + * @param \array $entry An associative array listing the attirbute values to add. If an attribute was not existing yet it will be added. If an attribute is existing you can only add values to it if it supports multiple values. + * @param \array $controls Array of LDAP Controls to send with the request. * @throws LdapException * */ @@ -759,8 +759,8 @@ function ldap_mod_add($ldap, string $dn, array $entry, array $controls = null): * * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry - * @param array $controls Array of LDAP Controls to send with the request. + * @param \array $entry + * @param \array $controls Array of LDAP Controls to send with the request. * @throws LdapException * */ @@ -784,8 +784,8 @@ function ldap_mod_del($ldap, string $dn, array $entry, array $controls = null): * * @param resource $ldap An LDAP\Connection instance, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. - * @param array $controls Array of LDAP Controls to send with the request. + * @param \array $entry An associative array listing the attributes to replace. Sending an empty array as value will remove the attribute, while sending an attribute not existing yet on this entry will add it. + * @param \array $controls Array of LDAP Controls to send with the request. * @throws LdapException * */ @@ -809,7 +809,7 @@ function ldap_mod_replace($ldap, string $dn, array $entry, array $controls = nul * * @param resource $ldap An LDAP resource, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $modifications_info An array that specifies the modifications to make. Each entry in this + * @param \array $modifications_info An array that specifies the modifications to make. Each entry in this * array is an associative array with two or three keys: * attrib maps to the name of the attribute to modify, * modtype maps to the type of modification to perform, @@ -882,7 +882,7 @@ function ldap_mod_replace($ldap, string $dn, array $entry, array $controls = nul * value for values must be an array of strings, and * any value for modtype must be one of the * LDAP_MODIFY_BATCH_* constants listed above. - * @param array $controls Each value specified through values is added (as + * @param \array $controls Each value specified through values is added (as * an additional value) to the attribute named by * attrib. * @throws LdapException @@ -957,10 +957,10 @@ function ldap_parse_exop($ldap, $result, ?string &$response_data = null, ?string * recognised within the request, otherwise it will be set to NULL. * @param string|null $error_message A reference to a variable that will be set to the LDAP error message in * the result, or an empty string if no error occurred. - * @param array|null $referrals A reference to a variable that will be set to an array set + * @param \array|null $referrals A reference to a variable that will be set to an array set * to all of the referral strings in the result, or an empty array if no * referrals were returned. - * @param array|null $controls An array of LDAP Controls which have been sent with the response. + * @param \array|null $controls An array of LDAP Controls which have been sent with the response. * @throws LdapException * */ @@ -983,7 +983,7 @@ function ldap_parse_result($ldap, $result, ?int &$error_code, ?string &$matched_ * @param string $new_parent The new parent/superior entry. * @param bool $delete_old_rdn If TRUE the old RDN value(s) is removed, else the old RDN value(s) * is retained as non-distinguished values of the entry. - * @param array $controls Array of LDAP Controls to send with the request. + * @param \array $controls Array of LDAP Controls to send with the request. * @throws LdapException * */ diff --git a/generated/mbstring.php b/generated/mbstring.php index 49622015..22d794a3 100644 --- a/generated/mbstring.php +++ b/generated/mbstring.php @@ -40,7 +40,7 @@ function mb_chr(int $codepoint, string $encoding = null): string * If string is an array, all its string values will be * converted recursively. * - * @param string|array $string The string or array to be converted. + * @param string|\array $string The string or array to be converted. * @param string $to_encoding The desired encoding of the result. * @param mixed $from_encoding The current encoding used to interpret string. * Multiple encodings may be specified as an array or comma separated @@ -54,7 +54,7 @@ function mb_chr(int $codepoint, string $encoding = null): string * See supported encodings * for valid values of to_encoding * and from_encoding. - * @return string|array The encoded string or array on success. + * @return string|\array The encoded string or array on success. * @throws MbstringException * */ @@ -96,7 +96,7 @@ function mb_convert_encoding($string, string $to_encoding, $from_encoding = null * For UTF-16, UTF-32, * UCS2 and UCS4, encoding * detection will fail always. - * @return bool|array When setting the encoding detection order, TRUE is returned on success. + * @return bool|\array When setting the encoding detection order, TRUE is returned on success. * * When getting the encoding detection order, an ordered array of the encodings is returned. * @throws MbstringException @@ -121,7 +121,7 @@ function mb_detect_order($encoding = null) * Returns an array of aliases for a known encoding type. * * @param string $encoding The encoding type being checked, for aliases. - * @return array Returns a numerically indexed array of encoding aliases on success + * @return \array Returns a numerically indexed array of encoding aliases on success * @throws MbstringException * */ @@ -218,7 +218,7 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, s /** * * - * @return array + * @return \array * @throws MbstringException * */ @@ -268,7 +268,7 @@ function mb_ereg_search_init(string $string, string $pattern = null, string $opt * * @param string $pattern The search pattern. * @param string $options The search option. See mb_regex_set_options for explanation. - * @return array + * @return \array * @throws MbstringException * */ @@ -473,7 +473,7 @@ function mb_ord(string $string, string $encoding = null): int * global variables. * * @param string $string The URL encoded data. - * @param array|null $result An array containing decoded and character encoded converted values. + * @param \array|null $result An array containing decoded and character encoded converted values. * @throws MbstringException * */ @@ -523,7 +523,7 @@ function mb_regex_encoding(string $encoding = null) * This parameter is not automatically encoded. * @param string $subject The subject of the mail. * @param string $message The message of the mail. - * @param string|array|null $additional_headers String or array to be inserted at the end of the email header. + * @param string|\array|null $additional_headers String or array to be inserted at the end of the email header. * * This is typically used to add extra headers (From, Cc, and Bcc). * Multiple extra headers should be separated with a CRLF (\r\n). @@ -589,7 +589,7 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ * @param string $pattern The regular expression pattern. * @param string $string The string being split. * @param int $limit - * @return array The result as an array. + * @return \array The result as an array. * @throws MbstringException * */ diff --git a/generated/misc.php b/generated/misc.php index 31ca6158..74a76b91 100644 --- a/generated/misc.php +++ b/generated/misc.php @@ -97,7 +97,7 @@ function highlight_string(string $string, bool $return = false) * * @param bool $as_number Whether the high resolution time should be returned as array * or number. - * @return array{0:int,1:int}|int|float Returns an array of integers in the form [seconds, nanoseconds], if the + * @return \array{0:int,1:int}|int|float Returns an array of integers in the form [seconds, nanoseconds], if the * parameter as_number is false. Otherwise the nanoseconds * are returned as int (64bit platforms) or float * (32bit platforms). @@ -450,7 +450,7 @@ function sleep(int $seconds): int * * @param int $seconds Must be a non-negative integer. * @param int $nanoseconds Must be a non-negative integer less than 1 billion. - * @return array{0:0|positive-int,1:0|positive-int}|bool Returns TRUE on success. + * @return \array{0:0|positive-int,1:0|positive-int}|bool Returns TRUE on success. * * If the delay was interrupted by a signal, an associative array will be * returned with the components: @@ -528,7 +528,7 @@ function time_sleep_until(float $timestamp): void * @param string $format See pack for an explanation of the format codes. * @param string $string The packed data. * @param int $offset The offset to begin unpacking from. - * @return array Returns an associative array containing unpacked elements of binary + * @return \array Returns an associative array containing unpacked elements of binary * string. * @throws MiscException * diff --git a/generated/mysql.php b/generated/mysql.php index 475c609c..4e456ae8 100644 --- a/generated/mysql.php +++ b/generated/mysql.php @@ -249,7 +249,7 @@ function mysql_drop_db(string $database_name, $link_identifier = null): void * @param resource $result The result resource that * is being evaluated. This result comes from a call to * mysql_query. - * @return array An array of lengths on success. + * @return \array An array of lengths on success. * @throws MysqlException * */ diff --git a/generated/network.php b/generated/network.php index 21186d1f..43ebfcd9 100644 --- a/generated/network.php +++ b/generated/network.php @@ -55,15 +55,15 @@ function closelog(): void * * Windows: DNS_CAA is not supported. * Support for DNS_A6 is not implemented. - * @param array|null $authoritative_name_servers Passed by reference and, if given, will be populated with Resource + * @param \array|null $authoritative_name_servers Passed by reference and, if given, will be populated with Resource * Records for the Authoritative Name Servers. - * @param array|null $additional_records Passed by reference and, if given, will be populated with any + * @param \array|null $additional_records Passed by reference and, if given, will be populated with any * Additional Records. * @param bool $raw The type will be interpreted as a raw DNS type ID * (the DNS_* constants cannot be used). * The return value will contain a data key, which needs * to be manually parsed. - * @return array This function returns an array of associative arrays. Each associative array contains + * @return \array This function returns an array of associative arrays. Each associative array contains * at minimum the following keys: * * Basic DNS attributes @@ -471,7 +471,7 @@ function long2ip(int $ip): string /** * Returns an enumeration of network interfaces (adapters) on the local machine. * - * @return array Returns an associative array where the key is the name of the interface and + * @return \array Returns an associative array where the key is the name of the interface and * the value an associative array of interface attributes. * * Each interface associative array contains: diff --git a/generated/oci8.php b/generated/oci8.php index 4a7e3880..3b76b3ac 100644 --- a/generated/oci8.php +++ b/generated/oci8.php @@ -12,7 +12,7 @@ * * @param resource $statement A valid OCI statement identifier. * @param string $param The Oracle placeholder. - * @param array $var An array. + * @param \array $var An array. * @param int $max_array_length Sets the maximum length both for incoming and result arrays. * @param int $max_item_length Sets maximum length for array items. If not specified or equals to -1, * oci_bind_array_by_name will find the longest diff --git a/generated/opcache.php b/generated/opcache.php index dcac8549..fa9ddb37 100644 --- a/generated/opcache.php +++ b/generated/opcache.php @@ -28,7 +28,7 @@ function opcache_compile_file(string $filename): void * information about the file cache. * * @param bool $include_scripts Include script specific state information - * @return array Returns an array of information, optionally containing script specific state information. + * @return \array Returns an array of information, optionally containing script specific state information. * @throws OpcacheException * */ diff --git a/generated/openssl.php b/generated/openssl.php index 1c5b875d..910e7ad1 100644 --- a/generated/openssl.php +++ b/generated/openssl.php @@ -80,7 +80,7 @@ function openssl_cms_encrypt(string $input_filename, string $output_filename, $c * Performs the exact analog to openssl_pkcs7_read. * * @param string $input_filename - * @param array $certificates + * @param \array $certificates * @throws OpensslException * */ @@ -131,7 +131,7 @@ function openssl_cms_sign(string $input_filename, string $output_filename, $cert * @param string $input_filename The input file. * @param int $flags Flags to pass to cms_verify. * @param $certificates A file with the signer certificate and optionally intermediate certificates. - * @param array $ca_info An array containing self-signed certificate authority certificates. + * @param \array $ca_info An array containing self-signed certificate authority certificates. * @param $untrusted_certificates_filename A file containing additional intermediate certificates. * @param $content A file pointing to the content when signatures are detached. * @param $pk7 @@ -249,7 +249,7 @@ function openssl_csr_get_public_key($csr, bool $short_names = true) * array - if shortnames is TRUE (the default) then * fields will be indexed with the short name form, otherwise, the long name * form will be used - e.g.: CN is the shortname form of commonName. - * @return array Returns an associative array with subject description. + * @return \array Returns an associative array with subject description. * @throws OpensslException * */ @@ -268,13 +268,13 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array * openssl_csr_new generates a new CSR (Certificate Signing Request) * based on the information provided by distinguished_names. * - * @param array $distinguished_names The Distinguished Name or subject fields to be used in the certificate. + * @param \array $distinguished_names The Distinguished Name or subject fields to be used in the certificate. * @param resource $private_key private_key should be set to a private key that was * previously generated by openssl_pkey_new (or * otherwise obtained from the other openssl_pkey family of functions). * The corresponding public portion of the key will be used to sign the * CSR. - * @param array $options By default, the information in your system openssl.conf + * @param \array $options By default, the information in your system openssl.conf * is used to initialize the request; you can specify a configuration file * section by setting the config_section_section key of * options. You can also specify an alternative @@ -366,7 +366,7 @@ function openssl_csr_get_subject($csr, bool $short_names = true): array * * * - * @param array $extra_attributes extra_attributes is used to specify additional + * @param \array $extra_attributes extra_attributes is used to specify additional * configuration options for the CSR. Both distinguished_names and * extra_attributes are associative arrays whose keys are * converted to OIDs and applied to the relevant part of the request. @@ -401,11 +401,11 @@ function openssl_csr_new(array $distinguished_names, &$private_key, array $optio * @param string|resource|null $ca_certificate The generated certificate will be signed by ca_certificate. * If ca_certificate is NULL, the generated certificate * will be a self-signed certificate. - * @param string|resource|array $private_key private_key is the private key that corresponds to + * @param string|resource|\array $private_key private_key is the private key that corresponds to * ca_certificate. * @param int $days days specifies the length of time for which the * generated certificate will be valid, in days. - * @param array $options You can finetune the CSR signing by options. + * @param \array $options You can finetune the CSR signing by options. * See openssl_csr_new for more information about * options. * @param int $serial An optional the serial number of issued certificate. If not specified @@ -557,7 +557,7 @@ function openssl_digest(string $data, string $digest_algo, bool $binary = false) * NIST * recommends using ECC curves with at least 256 bits. * - * @return array An array of available curve names. + * @return \array An array of available curve names. * @throws OpensslException * */ @@ -586,7 +586,7 @@ function openssl_get_curve_names(): array * @param string|null $output If the call is successful the opened data is returned in this * parameter. * @param string $encrypted_key - * @param string|array|resource $private_key + * @param string|\array|resource $private_key * @param string $cipher_algo The cipher method. * * @@ -644,10 +644,10 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it * * @param string|resource $certificate See Key/Certificate parameters for a list of valid values. * @param string $output_filename Path to the output file. - * @param string|array|resource $private_key Private key component of PKCS#12 file. + * @param string|\array|resource $private_key Private key component of PKCS#12 file. * See Public/Private Key parameters for a list of valid values. * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. + * @param \array $options Optional array, other keys will be ignored. * * * @@ -688,10 +688,10 @@ function openssl_pkcs12_export_to_file($certificate, string $output_filename, $p * * @param string|resource $certificate See Key/Certificate parameters for a list of valid values. * @param string|null $output On success, this will hold the PKCS#12. - * @param string|array|resource $private_key Private key component of PKCS#12 file. + * @param string|\array|resource $private_key Private key component of PKCS#12 file. * See Public/Private Key parameters for a list of valid values. * @param string $passphrase Encryption password for unlocking the PKCS#12 file. - * @param array $options Optional array, other keys will be ignored. + * @param \array $options Optional array, other keys will be ignored. * * * @@ -731,7 +731,7 @@ function openssl_pkcs12_export($certificate, ?string &$output, $private_key, str * certificates. * * @param string $pkcs12 The certificate store contents, not its file name. - * @param array|null $certificates On success, this will hold the Certificate Store Data. + * @param \array|null $certificates On success, this will hold the Certificate Store Data. * @param string $passphrase Encryption password for unlocking the PKCS#12 file. * @throws OpensslException * @@ -756,7 +756,7 @@ function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $pass * @param string $output_filename The decrypted message is written to the file specified by * output_filename. * @param string|resource $certificate - * @param string|resource|array $private_key + * @param string|resource|\array $private_key * @throws OpensslException * */ @@ -782,8 +782,8 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, * * @param string $input_filename * @param string $output_filename - * @param string|resource|array $certificate Either a lone X.509 certificate, or an array of X.509 certificates. - * @param array $headers headers is an array of headers that + * @param string|resource|\array $certificate Either a lone X.509 certificate, or an array of X.509 certificates. + * @param \array $headers headers is an array of headers that * will be prepended to the data after it has been encrypted. * * headers can be either an associative array @@ -810,7 +810,7 @@ function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, * * * @param string $data The string of data you wish to parse (p7b format). - * @param array|null $certificates The array of PEM certificates from the p7b input data. + * @param \array|null $certificates The array of PEM certificates from the p7b input data. * @throws OpensslException * */ @@ -835,9 +835,9 @@ function openssl_pkcs7_read(string $data, ?array &$certificates): void * @param string $output_filename The file which the digital signature will be written to. * @param string|resource $certificate The X.509 certificate used to digitally sign input_filename. * See Key/Certificate parameters for a list of valid values. - * @param string|resource|array $private_key private_key is the private key corresponding to certificate. + * @param string|resource|\array $private_key private_key is the private key corresponding to certificate. * See Public/Private Key parameters for a list of valid values. - * @param array $headers headers is an array of headers that + * @param \array $headers headers is an array of headers that * will be prepended to the data after it has been signed (see * openssl_pkcs7_encrypt for more information about * the format of this parameter). @@ -891,11 +891,11 @@ function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): st * (PEM encoded) rendition of key into the file named * by output_filename. * - * @param resource|string|array $key + * @param resource|string|\array $key * @param string $output_filename Path to the output file. * @param string|null $passphrase The key can be optionally protected by a * passphrase. - * @param array $options options can be used to fine-tune the export + * @param \array $options options can be used to fine-tune the export * process by specifying and/or overriding options for the openssl * configuration file. See openssl_csr_new for more * information about options. @@ -926,7 +926,7 @@ function openssl_pkey_export_to_file($key, string $output_filename, ?string $pas * @param resource $key * @param string|null $output * @param string|null $passphrase The key is optionally protected by passphrase. - * @param array $options options can be used to fine-tune the export + * @param \array $options options can be used to fine-tune the export * process by specifying and/or overriding options for the openssl * configuration file. See openssl_csr_new for more * information about options. @@ -1018,7 +1018,7 @@ function openssl_pkey_get_public($public_key) * key. * How to obtain the public component of the key is shown in an example below. * - * @param array $options You can finetune the key generation (such as specifying the number of + * @param \array $options You can finetune the key generation (such as specifying the number of * bits) using options. See * openssl_csr_new for more information about * options. @@ -1051,7 +1051,7 @@ function openssl_pkey_new(array $options = null) * * @param string $data * @param string|null $decrypted_data - * @param string|resource|array $private_key private_key must be the private key corresponding that + * @param string|resource|\array $private_key private_key must be the private key corresponding that * was used to encrypt the data. * @param int $padding padding can be one of * OPENSSL_PKCS1_PADDING, @@ -1082,7 +1082,7 @@ function openssl_private_decrypt(string $data, ?string &$decrypted_data, $privat * * @param string $data * @param string|null $encrypted_data - * @param string|resource|array $private_key + * @param string|resource|\array $private_key * @param int $padding padding can be one of * OPENSSL_PKCS1_PADDING, * OPENSSL_NO_PADDING. @@ -1200,8 +1200,8 @@ function openssl_random_pseudo_bytes(int $length, ?bool &$strong_result = null): * * @param string $data The data to seal. * @param string|null $sealed_data The sealed data. - * @param array|null $encrypted_keys Array of encrypted keys. - * @param array $public_key Array of OpenSSLAsymmetricKey instances containing public keys. + * @param \array|null $encrypted_keys Array of encrypted keys. + * @param \array $public_key Array of OpenSSLAsymmetricKey instances containing public keys. * @param string $cipher_algo The cipher method. * * diff --git a/generated/outcontrol.php b/generated/outcontrol.php index e52c4a08..2d0f8832 100644 --- a/generated/outcontrol.php +++ b/generated/outcontrol.php @@ -123,7 +123,7 @@ function ob_flush(): void * If output buffering is still active when the script ends, PHP outputs the * contents automatically. * - * @param string|array|callable|null $callback An optional callback function may be + * @param string|\array|callable|null $callback An optional callback function may be * specified. This function takes a string as a parameter and should * return a string. The function will be called when * the output buffer is flushed (sent) or cleaned (with diff --git a/generated/pcntl.php b/generated/pcntl.php index 66cc28d4..ed93c9d9 100644 --- a/generated/pcntl.php +++ b/generated/pcntl.php @@ -154,8 +154,8 @@ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): voi * SIG_SETMASK: Replace the currently * blocked signals by the given list of signals. * - * @param array $signals List of signals. - * @param array|null $old_signals The old_signals parameter is set to an array + * @param \array $signals List of signals. + * @param \array|null $old_signals The old_signals parameter is set to an array * containing the list of the previously blocked signals. * @throws PcntlException * @@ -177,8 +177,8 @@ function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = nul * nanoseconds, which enable an upper bound to be placed * on the time for which the script is suspended. * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info is set to an array containing + * @param \array $signals Array of signals to wait for. + * @param \array|null $info The info is set to an array containing * information about the signal. See * pcntl_sigwaitinfo. * @param int $seconds Timeout in seconds. @@ -205,8 +205,8 @@ function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0 * pcntl_sigprocmask), * pcntl_sigwaitinfo will return immediately. * - * @param array $signals Array of signals to wait for. - * @param array|null $info The info parameter is set to an array containing + * @param \array $signals Array of signals to wait for. + * @param \array|null $info The info parameter is set to an array containing * information about the signal. * * The following elements are set for all signals: diff --git a/generated/pcre.php b/generated/pcre.php index 4ebb9839..7f247b62 100644 --- a/generated/pcre.php +++ b/generated/pcre.php @@ -10,11 +10,11 @@ * pattern. * * @param string $pattern The pattern to search for, as a string. - * @param array $array The input array. + * @param \array $array The input array. * @param int $flags If set to PREG_GREP_INVERT, this function returns * the elements of the input array that do not match * the given pattern. - * @return array Returns an array indexed using the keys from the + * @return \array Returns an array indexed using the keys from the * array array. * @throws PcreException * @@ -41,7 +41,7 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array * * @param string $pattern The pattern to search for, as a string. * @param string $subject The input string. - * @param array|null $matches Array of all matches in multi-dimensional array ordered according to + * @param \array|null $matches Array of all matches in multi-dimensional array ordered according to * flags. * @param int $flags Can be a combination of the following flags (note that it doesn't make * sense to use PREG_PATTERN_ORDER together with @@ -669,7 +669,7 @@ function preg_match(string $pattern, string $subject, ?iterable &$matches = null * value in an array where every element is an array consisting of the * matched string at offset 0 and its string offset * into subject at offset 1. - * @return array Returns an array containing substrings of subject + * @return \array Returns an array containing substrings of subject * split along boundaries matched by pattern. * @throws PcreException * diff --git a/generated/pgsql.php b/generated/pgsql.php index ee24da57..2637544a 100644 --- a/generated/pgsql.php +++ b/generated/pgsql.php @@ -113,11 +113,11 @@ function pg_connection_reset($connection): void * * @param resource $connection An PgSql\Connection instance. * @param string $table_name Name of the table against which to convert types. - * @param array $values Data to be converted. + * @param \array $values Data to be converted. * @param int $flags Any number of PGSQL_CONV_IGNORE_DEFAULT, * PGSQL_CONV_FORCE_NULL or * PGSQL_CONV_IGNORE_NOT_NULL, combined. - * @return array An array of converted values. + * @return \array An array of converted values. * @throws PgsqlException * */ @@ -139,7 +139,7 @@ function pg_convert($connection, string $table_name, array $values, int $flags = * * @param resource $connection An PgSql\Connection instance. * @param string $table_name Name of the table into which to copy the rows. - * @param array $rows An array of data to be copied into table_name. + * @param \array $rows An array of data to be copied into table_name. * Each value in rows becomes a row in table_name. * Each value in rows should be a delimited string of the values * to insert into each field. Values should be linefeed terminated. @@ -171,7 +171,7 @@ function pg_copy_from($connection, string $table_name, array $rows, string $sepa * rows. Default is \t. * @param string $null_as How SQL NULL values are represented in the * rows. Default is \\N ("\\\\N"). - * @return array An array with one element for each line of COPY data. + * @return \array An array with one element for each line of COPY data. * @throws PgsqlException * */ @@ -206,7 +206,7 @@ function pg_copy_to($connection, string $table_name, string $separator = "\t", s * * @param resource $connection An PgSql\Connection instance. * @param string $table_name Name of the table from which to delete rows. - * @param array $conditions An array whose keys are field names in the table table_name, + * @param \array $conditions An array whose keys are field names in the table table_name, * and whose values are the values of those fields that are to be deleted. * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, * PGSQL_DML_NO_CONV, @@ -286,7 +286,7 @@ function pg_end_copy($connection = null): void * been previously prepared using pg_prepare, * pg_send_prepare or a PREPARE SQL * command. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders + * @param \array $params An array of parameter values to substitute for the $1, $2, etc. placeholders * in the original prepared query string. The number of elements in the array * must match the number of placeholders. * @@ -435,7 +435,7 @@ function pg_host($connection = null): string * @param resource $connection An PgSql\Connection instance. * @param string $table_name Name of the table into which to insert rows. The table table_name must at least * have as many columns as values has elements. - * @param array $values An array whose keys are field names in the table table_name, + * @param \array $values An array whose keys are field names in the table table_name, * and whose values are the values of those fields that are to be inserted. * @param int $flags Any number of PGSQL_CONV_OPTS, * PGSQL_DML_NO_CONV, @@ -763,7 +763,7 @@ function pg_lo_write($lob, string $data, int $length = null): int * @param resource $connection An PgSql\Connection instance. * @param string $table_name The name of the table. * @param bool $extended Flag for returning extended meta data. Default to FALSE. - * @return array An array of the table definition. + * @return \array An array of the table definition. * @throws PgsqlException * */ @@ -1044,7 +1044,7 @@ function pg_put_line($connection = null, string $data = null): void * attack vectors and introduce bugs when handling data containing quotes. * If for some reason you cannot use a parameter, ensure that interpolated * values are properly escaped. - * @param array $params An array of parameter values to substitute for the $1, $2, etc. placeholders + * @param \array $params An array of parameter values to substitute for the $1, $2, etc. placeholders * in the original prepared query string. The number of elements in the array * must match the number of placeholders. * @@ -1214,7 +1214,7 @@ function pg_result_seek($result, int $row): void * * @param resource $connection An PgSql\Connection instance. * @param string $table_name Name of the table from which to select rows. - * @param array $conditions An array whose keys are field names in the table table_name, + * @param \array $conditions An array whose keys are field names in the table table_name, * and whose values are the conditions that a row must meet to be retrieved. * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, * PGSQL_DML_NO_CONV, @@ -1318,9 +1318,9 @@ function pg_trace(string $filename, string $mode = "w", $connection = null): voi * * @param resource $connection An PgSql\Connection instance. * @param string $table_name Name of the table into which to update rows. - * @param array $values An array whose keys are field names in the table table_name, + * @param \array $values An array whose keys are field names in the table table_name, * and whose values are what matched rows are to be updated to. - * @param array $conditions An array whose keys are field names in the table table_name, + * @param \array $conditions An array whose keys are field names in the table table_name, * and whose values are the conditions that a row must meet to be updated. * @param int $flags Any number of PGSQL_CONV_FORCE_NULL, * PGSQL_DML_NO_CONV, diff --git a/generated/posix.php b/generated/posix.php index 26b77eaa..49fdeeba 100644 --- a/generated/posix.php +++ b/generated/posix.php @@ -34,7 +34,7 @@ function posix_access(string $filename, int $flags = 0): void * Gets information about a group provided its id. * * @param int $group_id The group id. - * @return array The array elements returned are: + * @return \array The array elements returned are: * * The group information array * @@ -98,7 +98,7 @@ function posix_getgrgid(int $group_id): array * Gets information about a group provided its name. * * @param string $name The name of the group - * @return array Returns an array on success. + * @return \array Returns an array on success. * The array elements returned are: * * The group information array @@ -161,7 +161,7 @@ function posix_getgrnam(string $name): array /** * Gets the group set of the current process. * - * @return array Returns an array of integers containing the numeric group ids of the group + * @return \array Returns an array of integers containing the numeric group ids of the group * set of the current process. * @throws PosixException * @@ -200,7 +200,7 @@ function posix_getlogin(): string * referenced by the given user ID. * * @param int $user_id The user identifier. - * @return array Returns an associative array with the following elements: + * @return \array Returns an associative array with the following elements: * * The user information array * @@ -298,7 +298,7 @@ function posix_getpwuid(int $user_id): array * An unprivileged process may only set its soft limit to a value * from 0 to the hard limit, and irreversibly lower its hard limit. * - * @return array Returns an associative array of elements for each + * @return \array Returns an associative array of elements for each * limit that is defined. Each limit has a soft and a hard limit. * * List of possible limits returned @@ -638,7 +638,7 @@ function posix_setuid(int $user_id): void /** * Gets information about the current CPU usage. * - * @return array Returns a hash of strings with information about the current + * @return \array Returns a hash of strings with information about the current * process CPU usage. The indices of the hash are: * * @@ -690,7 +690,7 @@ function posix_times(): array * format of the values, e.g. the assumption that a release may contain * three digits or anything else returned by this function. * - * @return array Returns a hash of strings with information about the + * @return \array Returns a hash of strings with information about the * system. The indices of the hash are * * diff --git a/generated/ps.php b/generated/ps.php index a2dca797..94e2346d 100644 --- a/generated/ps.php +++ b/generated/ps.php @@ -809,7 +809,7 @@ function ps_get_parameter($psdoc, string $name, float $modifier = null): string * characters. Possible positions for breaks are returned in an array of * interger numbers. Each number is the position of the char in * text after which a hyphenation can take place. - * @return array An array of integers indicating the position of possible breaks in + * @return \array An array of integers indicating the position of possible breaks in * the text. * @throws PsException * diff --git a/generated/rrd.php b/generated/rrd.php index 2da227d0..95fac16e 100644 --- a/generated/rrd.php +++ b/generated/rrd.php @@ -8,7 +8,7 @@ * Creates the rdd database file. * * @param string $filename Filename for newly created rrd file. - * @param array $options Options for rrd create - list of strings. See man page of rrd create + * @param \array $options Options for rrd create - list of strings. See man page of rrd create * for whole list of options. * @throws RrdException * @@ -49,10 +49,10 @@ function rrd_first(string $file, int $raaindex = 0): int * @param string $filename The filename to output the graph to. This will generally end in either * .png, .svg or * .eps, depending on the format you want to output. - * @param array $options Options for generating image. See man page of rrd graph for all + * @param \array $options Options for generating image. See man page of rrd graph for all * possible options. All options (data definitions, variable definitions, etc.) * are allowed. - * @return array Array with information about generated image is returned. + * @return \array Array with information about generated image is returned. * @throws RrdException * */ @@ -71,7 +71,7 @@ function rrd_graph(string $filename, array $options): array * Returns information about particular RRD database file. * * @param string $filename RRD database file name. - * @return array Array with information about requested RRD file. + * @return \array Array with information about requested RRD file. * @throws RrdException * */ @@ -91,7 +91,7 @@ function rrd_info(string $filename): array * most recent update of the RRD database file. * * @param string $filename RRD database file name. - * @return array Array of information about last update. + * @return \array Array of information about last update. * @throws RrdException * */ @@ -111,7 +111,7 @@ function rrd_lastupdate(string $filename): array * * @param string $xml_file XML filename with the dump of the original RRD database file. * @param string $rrd_file Restored RRD database file name. - * @param array $options Array of options for restoring. See man page for rrd restore. + * @param \array $options Array of options for restoring. See man page for rrd restore. * @throws RrdException * */ @@ -134,7 +134,7 @@ function rrd_restore(string $xml_file, string $rrd_file, array $options = null): * the data etc. * * @param string $filename RRD database file name. - * @param array $options Options with RRD database file properties which will be changed. See + * @param \array $options Options with RRD database file properties which will be changed. See * rrd tune man page for details. * @throws RrdException * @@ -154,7 +154,7 @@ function rrd_tune(string $filename, array $options): void * properties of the RRD database file. * * @param string $filename RRD database file name. This database will be updated. - * @param array $options Options for updating the RRD database. This is list of strings. See man page of rrd update + * @param \array $options Options for updating the RRD database. This is list of strings. See man page of rrd update * for whole list of options. * @throws RrdException * @@ -174,8 +174,8 @@ function rrd_update(string $filename, array $options): void * to XML file via user space PHP script and then restored back as RRD database * file. * - * @param array $options Array of options for the export, see rrd xport man page. - * @return array Array with information about RRD database file. + * @param \array $options Array of options for the export, see rrd xport man page. + * @return \array Array with information about RRD database file. * @throws RrdException * */ diff --git a/generated/sem.php b/generated/sem.php index 02021215..c8a6527f 100644 --- a/generated/sem.php +++ b/generated/sem.php @@ -205,7 +205,7 @@ function msg_send($queue, int $message_type, $message, bool $serialize = true, b * system defined limit. * * @param resource $queue The message queue. - * @param array $data You specify the values you require by setting the value of the keys + * @param \array $data You specify the values you require by setting the value of the keys * that you require in the data array. * @throws SemException * @@ -227,7 +227,7 @@ function msg_set_queue($queue, array $data): void * that was just received. * * @param resource $queue The message queue. - * @return array On success, the return value is an array whose keys and values have the following + * @return \array On success, the return value is an array whose keys and values have the following * meanings: * * Array structure for msg_stat_queue diff --git a/generated/sockets.php b/generated/sockets.php index bfcd9bac..295d81aa 100644 --- a/generated/sockets.php +++ b/generated/sockets.php @@ -92,7 +92,7 @@ function socket_addrinfo_connect($address) * @param string $host Hostname to search. * @param mixed $service The service to connect to. If service is a name, it is translated to the corresponding * port number. - * @param array $hints Hints provide criteria for selecting addresses returned. You may specify the + * @param \array $hints Hints provide criteria for selecting addresses returned. You may specify the * hints as defined by getadrinfo. * @return resource[] Returns an array of AddressInfo instances that can be used with the other socket_addrinfo functions. * On failure, FALSE is returned. @@ -581,7 +581,7 @@ function socket_send($socket, string $data, int $length, int $flags): int * * * @param resource $socket - * @param array $message + * @param \array $message * @param int $flags * @return int Returns the number of bytes sent. * @throws SocketsException @@ -734,7 +734,7 @@ function socket_set_nonblock($socket): void * getprotobyname function. * @param int $option The available socket options are the same as those for the * socket_get_option function. - * @param int|string|array $value The option value. + * @param int|string|\array $value The option value. * @throws SocketsException * */ diff --git a/generated/spl.php b/generated/spl.php index 08c679dc..6afd603c 100644 --- a/generated/spl.php +++ b/generated/spl.php @@ -10,7 +10,7 @@ * * @param object|string $object_or_class An object (class instance) or a string (class or interface name). * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @return \array An array on success, or FALSE when the given class doesn't exist. * @throws SplException * */ @@ -31,7 +31,7 @@ function class_implements($object_or_class, bool $autoload = true): array * * @param object|string $object_or_class An object (class instance) or a string (class name). * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @return \array An array on success, or FALSE when the given class doesn't exist. * @throws SplException * */ @@ -53,7 +53,7 @@ function class_parents($object_or_class, bool $autoload = true): array * * @param object|string $object_or_class An object (class instance) or a string (class name). * @param bool $autoload Whether to call __autoload by default. - * @return array An array on success, or FALSE when the given class doesn't exist. + * @return \array An array on success, or FALSE when the given class doesn't exist. * @throws SplException * */ diff --git a/generated/sqlsrv.php b/generated/sqlsrv.php index e93aa37a..a5f3bb6a 100644 --- a/generated/sqlsrv.php +++ b/generated/sqlsrv.php @@ -54,7 +54,7 @@ function sqlsrv_cancel($stmt): void * Returns information about the client and specified connection * * @param resource $conn The connection about which information is returned. - * @return array Returns an associative array with keys described in the table below. + * @return \array Returns an associative array with keys described in the table below. * * Array returned by sqlsrv_client_info * @@ -342,7 +342,7 @@ function sqlsrv_num_rows($stmt): int * * @param resource $conn A connection resource returned by sqlsrv_connect. * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized + * @param \array $params An array specifying parameter information when executing a parameterized * query. Array elements can be any of the following: * * A literal value @@ -351,7 +351,7 @@ function sqlsrv_num_rows($stmt): int * array($value [, $direction [, $phpType [, $sqlType]]]) * * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described + * @param \array $options An array specifying query property options. The supported keys are described * in the following table: * @return resource Returns a statement resource on success. * @throws SqlsrvException @@ -379,7 +379,7 @@ function sqlsrv_prepare($conn, string $sql, array $params = null, array $options * * @param resource $conn A connection resource returned by sqlsrv_connect. * @param string $sql The string that defines the query to be prepared and executed. - * @param array $params An array specifying parameter information when executing a parameterized query. + * @param \array $params An array specifying parameter information when executing a parameterized query. * Array elements can be any of the following: * * A literal value @@ -388,7 +388,7 @@ function sqlsrv_prepare($conn, string $sql, array $params = null, array $options * array($value [, $direction [, $phpType [, $sqlType]]]) * * The following table describes the elements in the array structure above: - * @param array $options An array specifying query property options. The supported keys are described + * @param \array $options An array specifying query property options. The supported keys are described * in the following table: * @return resource Returns a statement resource on success. * @throws SqlsrvException diff --git a/generated/ssh2.php b/generated/ssh2.php index fff3ceb6..2c930449 100644 --- a/generated/ssh2.php +++ b/generated/ssh2.php @@ -114,7 +114,7 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s * * @param string $host * @param int $port - * @param array $methods methods may be an associative array with up to four parameters + * @param \array $methods methods may be an associative array with up to four parameters * as described below. * * @@ -248,7 +248,7 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s * libssh2 library unless explicitly enabled * during build time by using the appropriate ./configure options. See documentation * for the underlying library for more information. - * @param array $callbacks callbacks may be an associative array with any + * @param \array $callbacks callbacks may be an associative array with any * or all of the following parameters. * * @@ -346,7 +346,7 @@ function ssh2_disconnect($session): void * ssh2_connect. * @param string $command * @param string $pty - * @param array $env env may be passed as an associative array of + * @param \array $env env may be passed as an associative array of * name/value pairs to set in the target environment. * @param int $width Width of the virtual terminal. * @param int $height Height of the virtual terminal. @@ -434,7 +434,7 @@ function ssh2_forward_listen($session, int $port, string $host = null, int $max_ * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa * @param string $blob Publickey blob as raw binary data * @param bool $overwrite If the specified key already exists, should it be overwritten? - * @param array $attributes Associative array of attributes to assign to this public key. + * @param \array $attributes Associative array of attributes to assign to this public key. * Refer to ietf-secsh-publickey-subsystem for a list of supported attributes. * To mark an attribute as mandatory, precede its name with an asterisk. * If the server is unable to support an attribute marked mandatory, @@ -717,7 +717,7 @@ function ssh2_sftp($session) * ssh2_connect. * @param string $term_type term_type should correspond to one of the * entries in the target system's /etc/termcap file. - * @param array $env env may be passed as an associative array of + * @param \array $env env may be passed as an associative array of * name/value pairs to set in the target environment. * @param int $width Width of the virtual terminal. * @param int $height Height of the virtual terminal. diff --git a/generated/stream.php b/generated/stream.php index 3d086e14..a628fc86 100644 --- a/generated/stream.php +++ b/generated/stream.php @@ -8,7 +8,7 @@ * Sets parameters on the specified context. * * @param resource $context The stream or context to apply the parameters too. - * @param array $params An associative array of parameters to be set in the following format: + * @param \array $params An associative array of parameters to be set in the following format: * $params['paramname'] = "paramvalue";. * @throws StreamException * @@ -73,7 +73,7 @@ function stream_copy_to_stream($from, $to, int $length = null, int $offset = 0): * STREAM_FILTER_WRITE, and/or * STREAM_FILTER_ALL can also be passed to the * read_write parameter to override this behavior. - * @param array $params This filter will be added with the specified + * @param \array $params This filter will be added with the specified * params to the end of * the list and will therefore be called last during stream operations. * To add a filter to the beginning of the list, use @@ -123,7 +123,7 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul * read_write parameter to override this behavior. * See stream_filter_append for an example of * using this parameter. - * @param array $params This filter will be added with the specified params + * @param \array $params This filter will be added with the specified params * to the beginning of the list and will therefore be * called first during stream operations. To add a filter to the end of the * list, use stream_filter_append. diff --git a/generated/uodbc.php b/generated/uodbc.php index 6ac914bd..2b4d01b4 100644 --- a/generated/uodbc.php +++ b/generated/uodbc.php @@ -348,7 +348,7 @@ function odbc_cursor($statement): string * SQL_FETCH_FIRST, SQL_FETCH_NEXT. * Use SQL_FETCH_FIRST the first time this function is * called, thereafter use the SQL_FETCH_NEXT. - * @return array Returns FALSE on error, an array upon success, and NULL after fetching + * @return \array Returns FALSE on error, an array upon success, and NULL after fetching * the last available DSN. * @throws UodbcException * @@ -390,7 +390,7 @@ function odbc_exec($odbc, string $query) * Executes a statement prepared with odbc_prepare. * * @param resource $statement The result id resource, from odbc_prepare. - * @param array $params Parameters in params will be + * @param \array $params Parameters in params will be * substituted for placeholders in the prepared statement in order. * Elements of this array will be converted to strings by calling this * function. @@ -416,7 +416,7 @@ function odbc_execute($statement, array $params = []): void * Fetch one result row into array. * * @param resource $statement The result resource. - * @param array|null $array The result array + * @param \array|null $array The result array * that can be of any type since it will be converted to type * array. The array will contain the column values starting at array * index 0. diff --git a/generated/url.php b/generated/url.php index ad5bb175..f7793792 100644 --- a/generated/url.php +++ b/generated/url.php @@ -39,7 +39,7 @@ function base64_decode(string $string, bool $strict = false): string * @param resource $context A valid context resource created with * stream_context_create, or NULL to use the * default context. - * @return array Returns an indexed or associative array with the headers. + * @return \array Returns an indexed or associative array with the headers. * @throws UrlException * */ @@ -83,7 +83,7 @@ function get_headers(string $url, bool $associative = false, $context = null): a * in PHP trying to open the file along the standard include path as per * the include_path directive. * This is used for local files, not URLs. - * @return array Returns an array with all the parsed meta tags. + * @return \array Returns an array with all the parsed meta tags. * * The value of the name property becomes the key, the value of the content * property becomes the value of the returned array, so you can easily use @@ -126,7 +126,7 @@ function get_meta_tags(string $filename, bool $use_include_path = false): array * URL component as a string (except when * PHP_URL_PORT is given, in which case the return * value will be an int). - * @return array|int|string|null On seriously malformed URLs, parse_url. + * @return \array|int|string|null On seriously malformed URLs, parse_url. * * If the component parameter is omitted, an * associative array is returned. At least one element will be diff --git a/generated/yaml.php b/generated/yaml.php index fd297aad..d0e91b5d 100644 --- a/generated/yaml.php +++ b/generated/yaml.php @@ -12,7 +12,7 @@ * documents, 0 for first document, ...). * @param int|null $ndocs If ndocs is provided, then it is filled with the * number of documents found in stream. - * @param array $callbacks Content handlers for YAML nodes. Associative array of YAML + * @param \array $callbacks Content handlers for YAML nodes. Associative array of YAML * tag => callable mappings. See * parse callbacks for more * details. @@ -50,7 +50,7 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ar * documents, 0 for first document, ...). * @param int|null $ndocs If ndocs is provided, then it is filled with the * number of documents found in stream. - * @param array $callbacks Content handlers for YAML nodes. Associative array of YAML + * @param \array $callbacks Content handlers for YAML nodes. Associative array of YAML * tag => callable mappings. See * parse callbacks for more * @return mixed Returns the value encoded in input in appropriate @@ -83,7 +83,7 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, array $c * documents, 0 for first document, ...). * @param int|null $ndocs If ndocs is provided, then it is filled with the * number of documents found in stream. - * @param array $callbacks Content handlers for YAML nodes. Associative array of YAML + * @param \array $callbacks Content handlers for YAML nodes. Associative array of YAML * tag => callable mappings. See * parse callbacks for more * details. diff --git a/generated/yaz.php b/generated/yaz.php index 29c1d33c..9f3ab9f5 100644 --- a/generated/yaz.php +++ b/generated/yaz.php @@ -14,7 +14,7 @@ * * @param resource $id The connection resource returned by yaz_connect. * @param string $query The CCL FIND query. - * @param array|null $result If the function was executed successfully, this will be an array + * @param \array|null $result If the function was executed successfully, this will be an array * containing the valid RPN query under the key rpn. * * Upon failure, three indexes are set in this array to indicate the cause @@ -395,7 +395,7 @@ function yaz_search($id, string $type, string $query): void * yaz_wait returns when all servers have either * completed all requests or aborted (in case of errors). * - * @param array $options An associative array of options: + * @param \array $options An associative array of options: * * * timeout diff --git a/generated/zlib.php b/generated/zlib.php index 39dc8985..c9e523d1 100644 --- a/generated/zlib.php +++ b/generated/zlib.php @@ -49,7 +49,7 @@ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): * (\x00 = Windows, \x03 = Unix, etc.) * * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: + * @param \array $options An associative array which may contain the following elements: * * * level @@ -271,7 +271,7 @@ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_G * @param string $filename The file name. * @param int $use_include_path You can set this optional parameter to 1, if you * want to search for the file in the include_path too. - * @return array An array containing the file, one line per cell, empty lines included, and with newlines still attached. + * @return \array An array containing the file, one line per cell, empty lines included, and with newlines still attached. * @throws ZlibException * */ @@ -598,7 +598,7 @@ function inflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): * encoding. * * @param int $encoding One of the ZLIB_ENCODING_* constants. - * @param array $options An associative array which may contain the following elements: + * @param \array $options An associative array which may contain the following elements: * * * level diff --git a/generator/src/PhpStanFunctions/PhpStanType.php b/generator/src/PhpStanFunctions/PhpStanType.php index bf0e8fdb..c42ffdde 100644 --- a/generator/src/PhpStanFunctions/PhpStanType.php +++ b/generator/src/PhpStanFunctions/PhpStanType.php @@ -100,6 +100,9 @@ public function getDocBlockType(?int $errorType = null): string } elseif ($this->nullable && $errorType !== Method::NULLSY_TYPE) { $returnTypes[] = 'null'; } + + $returnTypes = \array_map(fn (string $type) => \str_replace('array', '\array', $type), $returnTypes); + $type = join('|', $returnTypes); if ($type === 'bool' && !$this->nullable && $errorType === Method::FALSY_TYPE) { // If the function only returns a boolean, since false is for error, true is for success. diff --git a/generator/tests/MethodTest.php b/generator/tests/MethodTest.php index 11d06c86..3b8dda9b 100644 --- a/generator/tests/MethodTest.php +++ b/generator/tests/MethodTest.php @@ -65,7 +65,7 @@ public function testGetTypeHintFromRessource() $this->assertEquals('', $params[0]->getSignatureType()); $this->assertEquals('int', $params[1]->getDocBlockType()); $this->assertEquals('int', $params[1]->getSignatureType()); - + $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/hash/functions/hash-update.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), Method::FALSY_TYPE); @@ -73,15 +73,15 @@ public function testGetTypeHintFromRessource() $this->assertEquals('\HashContext', $params[0]->getDocBlockType()); $this->assertEquals('\HashContext', $params[0]->getSignatureType()); } - + public function testImapOpen5Parameter() { $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/imap/functions/imap-open.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), Method::FALSY_TYPE); $params = $method->getParams(); - $this->assertEquals('array', $params[5]->getDocBlockType()); - $this->assertEquals('array', $params[5]->getSignatureType()); + $this->assertEquals('\array', $params[5]->getDocBlockType()); + $this->assertEquals('array', $params[5]->getSignatureType()); } public function testGetInitializer() @@ -94,13 +94,13 @@ public function testGetInitializer() $this->assertEquals('', $params[0]->getDefaultValue()); $this->assertEquals('false', $params[1]->getDefaultValue()); } - + public function testGetReturnDocBlock(): void { $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/array/functions/array-replace.xml'); $xmlObject = $docPage->getMethodSynopsis(); $method = new Method($xmlObject[0], $docPage->loadAndResolveFile(), $docPage->getModule(), new PhpStanFunctionMapReader(), Method::NULLSY_TYPE); - $this->assertEquals("@return array Returns an array.\n", $method->getReturnDocBlock()); + $this->assertEquals("@return \array Returns an array.\n", $method->getReturnDocBlock()); $docPage = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/shmop/functions/shmop-delete.xml'); $xmlObject = $docPage->getMethodSynopsis(); diff --git a/generator/tests/PhpStanFunctions/PhpStanTypeTest.php b/generator/tests/PhpStanFunctions/PhpStanTypeTest.php index fe399866..9235c6c4 100644 --- a/generator/tests/PhpStanFunctions/PhpStanTypeTest.php +++ b/generator/tests/PhpStanFunctions/PhpStanTypeTest.php @@ -3,16 +3,15 @@ namespace Safe\PhpStanFunctions; - use PHPUnit\Framework\TestCase; use Safe\Method; class PhpStanTypeTest extends TestCase { - public function testMixedTypes(): void + public function testMixedTypes(): void { $param = new PhpStanType('array|string|int'); - $this->assertEquals('array|string|int', $param->getDocBlockType()); + $this->assertEquals('\array|string|int', $param->getDocBlockType()); $this->assertEquals('', $param->getSignatureType()); } @@ -34,31 +33,31 @@ public function testGenerics(): void $this->assertEquals('iterable', $param->getSignatureType()); $param = new PhpStanType('array'); - $this->assertEquals('array', $param->getDocBlockType()); + $this->assertEquals('\array', $param->getDocBlockType()); $this->assertEquals('array', $param->getSignatureType()); $param = new PhpStanType('array|array'); - $this->assertEquals('array|array', $param->getDocBlockType()); + $this->assertEquals('\array|\array', $param->getDocBlockType()); $this->assertEquals('array', $param->getSignatureType()); $param = new PhpStanType('array'); - $this->assertEquals('array', $param->getDocBlockType()); + $this->assertEquals('\array', $param->getDocBlockType()); $this->assertEquals('array', $param->getSignatureType()); $param = new PhpStanType('array>|array{1: int, 2: string}'); - $this->assertEquals('array>|array{1: int, 2: string}', $param->getDocBlockType()); + $this->assertEquals('\array>|\array{1: int, 2: string}', $param->getDocBlockType()); $this->assertEquals('array', $param->getSignatureType()); $param = new PhpStanType('array{0:float,1:float,2:float,3:float,4:float,5:float}'); - $this->assertEquals('array{0:float,1:float,2:float,3:float,4:float,5:float}', $param->getDocBlockType()); + $this->assertEquals('\array{0:float,1:float,2:float,3:float,4:float,5:float}', $param->getDocBlockType()); $this->assertEquals('array', $param->getSignatureType()); } - - public function testNullable(): void + + public function testNullable(): void { $param = new PhpStanType('array|null'); $this->assertEquals(true, $param->isNullable()); - $this->assertEquals('array|null', $param->getDocBlockType()); + $this->assertEquals('\array|null', $param->getDocBlockType()); $this->assertEquals('?array', $param->getSignatureType()); $param = new PhpStanType('?int|?string'); @@ -76,8 +75,8 @@ public function testNullable(): void $this->assertEquals('\HashContext|null', $param->getDocBlockType()); $this->assertEquals('?\HashContext', $param->getSignatureType()); } - - public function testParenthesisOutsideOfCallable(): void + + public function testParenthesisOutsideOfCallable(): void { $param = new PhpStanType('(?int)|(?string)'); $this->assertEquals(true, $param->isNullable()); @@ -92,8 +91,8 @@ public function testFalsable(): void $this->assertEquals('string|false', $param->getDocBlockType()); $this->assertEquals('string', $param->getSignatureType()); } - - public function testResource(): void + + public function testResource(): void { $param = new PhpStanType('resource'); $this->assertEquals('resource', $param->getDocBlockType()); @@ -106,8 +105,8 @@ public function testNamespace(): void $this->assertEquals('\GMP', $param->getDocBlockType()); $this->assertEquals('\GMP', $param->getSignatureType()); } - - public function testVoid(): void + + public function testVoid(): void { $param = new PhpStanType(''); $this->assertEquals('', $param->getDocBlockType()); @@ -117,8 +116,8 @@ public function testVoid(): void $this->assertEquals('void', $param->getDocBlockType()); $this->assertEquals('void', $param->getSignatureType()); } - - public function testOciSpecialCases(): void + + public function testOciSpecialCases(): void { $param = new PhpStanType('OCI-Collection'); $this->assertEquals('\OCI-Collection', $param->getDocBlockType()); @@ -128,14 +127,14 @@ public function testOciSpecialCases(): void $this->assertEquals('\OCI-Lob', $param->getDocBlockType()); $this->assertEquals('', $param->getSignatureType()); } - - public function testErrorTypeInteraction(): void + + public function testErrorTypeInteraction(): void { //bool => void if the method is falsy $param = new PhpStanType('bool'); $this->assertEquals('void', $param->getDocBlockType(Method::FALSY_TYPE)); $this->assertEquals('void', $param->getSignatureType(Method::FALSY_TYPE)); - + //int|false => int if the method is falsy $param = new PhpStanType('int|false'); $this->assertEquals('int', $param->getDocBlockType(Method::FALSY_TYPE)); @@ -146,11 +145,11 @@ public function testErrorTypeInteraction(): void $this->assertEquals('int', $param->getDocBlockType(Method::NULLSY_TYPE)); $this->assertEquals('int', $param->getSignatureType(Method::NULLSY_TYPE)); } - - public function testDuplicateType(): void + + public function testDuplicateType(): void { $param = new PhpStanType('array|array|array>'); - $this->assertEquals('array|array|array>', $param->getDocBlockType()); + $this->assertEquals('\array|\array|\array>', $param->getDocBlockType()); $this->assertEquals('array', $param->getSignatureType()); } @@ -178,7 +177,7 @@ public function testPositiveIntBecomingInt(): void public function testListBecomingArray(): void { $param = new PhpStanType('list|false'); - $this->assertEquals('array', $param->getDocBlockType(Method::FALSY_TYPE)); + $this->assertEquals('\array', $param->getDocBlockType(Method::FALSY_TYPE)); $this->assertEquals('array', $param->getSignatureType(Method::FALSY_TYPE)); } @@ -188,5 +187,4 @@ public function testNumbersAreRemoved(): void $this->assertEquals('int', $param->getDocBlockType()); $this->assertEquals('int', $param->getSignatureType()); } - } diff --git a/rector-migrate.php b/rector-migrate.php index d6d92b6c..cedb3668 100644 --- a/rector-migrate.php +++ b/rector-migrate.php @@ -24,7 +24,6 @@ 'apcu_inc' => 'Safe\apcu_inc', 'apcu_sma_info' => 'Safe\apcu_sma_info', 'apc_fetch' => 'Safe\apc_fetch', - 'array_combine' => 'Safe\array_combine', 'array_replace' => 'Safe\array_replace', 'array_replace_recursive' => 'Safe\array_replace_recursive', 'array_walk_recursive' => 'Safe\array_walk_recursive',