From 3a0f8d5eb7e3fca51fe1e91bd99d900c45c4c837 Mon Sep 17 00:00:00 2001 From: Kharhamel Date: Sat, 16 Jul 2022 03:31:26 +0000 Subject: [PATCH] Automatically regenerate the files --- generated/array.php | 75 ------------------------------------- generated/curl.php | 2 +- generated/filesystem.php | 11 +++++- generated/functionsList.php | 2 - generated/json.php | 7 +++- generated/ldap.php | 40 ++++++++++---------- rector-migrate.php | 2 - 7 files changed, 36 insertions(+), 103 deletions(-) diff --git a/generated/array.php b/generated/array.php index 37fa077a..39a77b5e 100644 --- a/generated/array.php +++ b/generated/array.php @@ -4,81 +4,6 @@ use Safe\Exceptions\ArrayException; -/** - * array_replace_recursive replaces the values of - * array with the same values from all the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later array overwriting the previous values. - * - * array_replace_recursive is recursive : it will recurse into - * arrays and apply the same process to the inner value. - * - * When the value in the first array is scalar, it will be replaced - * by the value in the second array, may it be scalar or array. - * When the value in the first array and the second 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. - * @throws ArrayException - * - */ -function array_replace_recursive(array $array, array ...$replacements): array -{ - error_clear_last(); - if ($replacements !== []) { - $result = \array_replace_recursive($array, ...$replacements); - } else { - $result = \array_replace_recursive($array); - } - if ($result === null) { - throw ArrayException::createFromPhpError(); - } - return $result; -} - - -/** - * array_replace replaces the values of - * array with values having the same keys in each of the following - * arrays. If a key from the first array exists in the second array, its value - * will be replaced by the value from the second array. If the key exists in the - * second array, and not the first, it will be created in the first array. - * If a key only exists in the first array, it will be left as is. - * If several arrays are passed for replacement, they will be processed - * in order, the later arrays overwriting the previous values. - * - * 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. - * Values from later arrays overwrite the previous values. - * @return array Returns an array. - * @throws ArrayException - * - */ -function array_replace(array $array, array ...$replacements): array -{ - error_clear_last(); - if ($replacements !== []) { - $result = \array_replace($array, ...$replacements); - } else { - $result = \array_replace($array); - } - if ($result === null) { - throw ArrayException::createFromPhpError(); - } - return $result; -} - - /** * Applies the user-defined callback function to each * element of the array. This function will recurse diff --git a/generated/curl.php b/generated/curl.php index cbb05cd6..6473b6d2 100644 --- a/generated/curl.php +++ b/generated/curl.php @@ -2588,7 +2588,7 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): * * CURLOPT_PROXY_TLSAUTH_USERNAME * - * Tusername to use for the HTTPS proxy TLS authentication method specified with the + * The username to use for the HTTPS proxy TLS authentication method specified with the * CURLOPT_PROXY_TLSAUTH_TYPE option. Requires that the * CURLOPT_PROXY_TLSAUTH_PASSWORD option to also be set. * diff --git a/generated/filesystem.php b/generated/filesystem.php index 7f1b08bb..f3e5a208 100644 --- a/generated/filesystem.php +++ b/generated/filesystem.php @@ -1240,6 +1240,13 @@ function lstat(string $filename): array * Attempts to create the directory specified by directory. * * @param string $directory The directory path. + * A URL can be used as a + * filename with this function if the fopen wrappers have been enabled. + * See fopen for more details on how to specify the + * filename. See the for links to information + * about what abilities the various wrappers have, notes on their usage, + * and information on any predefined variables they may + * provide. * @param int $permissions The permissions are 0777 by default, which means the widest possible * access. For more information on permissions, read the details * on the chmod page. @@ -1250,8 +1257,8 @@ function lstat(string $filename): array * which means it should have a leading zero. The permissions is also modified * by the current umask, which you can change using * umask. - * @param bool $recursive Allows the creation of nested directories specified in the - * directory. + * @param bool $recursive If TRUE, then any parent directories to the directory specified will + * also be created, with the same permissions. * @param resource $context A context stream * resource. * @throws FilesystemException diff --git a/generated/functionsList.php b/generated/functionsList.php index 3c537d1f..5a590058 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -14,8 +14,6 @@ 'apcu_inc', 'apcu_sma_info', 'apc_fetch', - 'array_replace', - 'array_replace_recursive', 'array_walk_recursive', 'assert_options', 'base64_decode', diff --git a/generated/json.php b/generated/json.php index 76fc6c17..e524c617 100644 --- a/generated/json.php +++ b/generated/json.php @@ -6,7 +6,12 @@ /** * Returns a string containing the JSON representation of the supplied - * value. + * value. If the parameter is an array or object, + * it will be serialized recursively. + * + * If a value to be serialized is an object, then by default only publicly visible + * properties will be included. Alternatively, a class may implement JsonSerializable + * to control how its values are serialized to JSON. * * The encoding is affected by the supplied flags * and additionally the encoding of float values depends on the value of diff --git a/generated/ldap.php b/generated/ldap.php index 97b42e5a..0bfaaaf2 100644 --- a/generated/ldap.php +++ b/generated/ldap.php @@ -239,36 +239,36 @@ function ldap_exop_whoami($ldap) /** - * Performs an extended operation on the specified link with - * reqoid the OID of the operation and - * reqdata the data. + * Performs an extended operation on the specified ldap with + * request_oid the OID of the operation and + * request_data the data. * * @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 string|null $retdata Will be filled with the extended operation response data if provided. + * @param string $request_oid 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 $request_data 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 $controls Array of LDAP Controls to send with the request. + * @param string|null $response_data 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. - * @param string|null $retoid Will be filled with the response OID if provided, usually equal to the request OID. - * @return resource|bool When used with retdata, returns TRUE on success. - * When used without retdata, returns a result identifier. + * @param string|null $response_oid Will be filled with the response OID if provided, usually equal to the request OID. + * @return resource|bool When used with response_data, returns TRUE on success. + * When used without response_data, returns a result identifier. * @throws LdapException * */ -function ldap_exop($ldap, string $reqoid, string $reqdata = null, ?array $serverctrls = null, ?string &$retdata = null, ?string &$retoid = null) +function ldap_exop($ldap, string $request_oid, string $request_data = null, ?array $controls = null, ?string &$response_data = null, ?string &$response_oid = null) { error_clear_last(); - if ($retoid !== null) { - $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata, $retoid); - } elseif ($retdata !== null) { - $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls, $retdata); - } elseif ($serverctrls !== null) { - $result = \ldap_exop($ldap, $reqoid, $reqdata, $serverctrls); - } elseif ($reqdata !== null) { - $result = \ldap_exop($ldap, $reqoid, $reqdata); + if ($response_oid !== null) { + $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); + } elseif ($response_data !== null) { + $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data); + } elseif ($controls !== null) { + $result = \ldap_exop($ldap, $request_oid, $request_data, $controls); + } elseif ($request_data !== null) { + $result = \ldap_exop($ldap, $request_oid, $request_data); } else { - $result = \ldap_exop($ldap, $reqoid); + $result = \ldap_exop($ldap, $request_oid); } if ($result === false) { throw LdapException::createFromPhpError(); diff --git a/rector-migrate.php b/rector-migrate.php index efa2a286..4f17de5e 100644 --- a/rector-migrate.php +++ b/rector-migrate.php @@ -24,8 +24,6 @@ 'apcu_inc' => 'Safe\apcu_inc', 'apcu_sma_info' => 'Safe\apcu_sma_info', 'apc_fetch' => 'Safe\apc_fetch', - 'array_replace' => 'Safe\array_replace', - 'array_replace_recursive' => 'Safe\array_replace_recursive', 'array_walk_recursive' => 'Safe\array_walk_recursive', 'assert_options' => 'Safe\assert_options', 'base64_decode' => 'Safe\base64_decode',