From 50ea87162e0db259391960b92f5a057c4037fcd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 10 Sep 2018 17:41:21 +0200 Subject: [PATCH] Applying PSR-2 coding style to generated files --- generated/apache.php | 28 +- generated/apc.php | 66 +- generated/apcu.php | 38 +- generated/array.php | 190 ++- generated/bzip2.php | 46 +- generated/classobj.php | 8 +- generated/com.php | 66 +- generated/curl.php | 2264 ++++++++++++++-------------- generated/datetime.php | 318 ++-- generated/dir.php | 42 +- generated/eio.php | 1564 ++++++++++--------- generated/errorfunc.php | 72 +- generated/exec.php | 18 +- generated/fileinfo.php | 16 +- generated/filesystem.php | 566 ++++--- generated/filter.php | 10 +- generated/fpm.php | 8 +- generated/ftp.php | 176 ++- generated/funchand.php | 34 +- generated/gmp.php | 24 +- generated/gnupg.php | 58 +- generated/hash.php | 10 +- generated/ibase.php | 156 +- generated/ibmDb2.php | 830 +++++----- generated/iconv.php | 34 +- generated/image.php | 1272 ++++++++-------- generated/imap.php | 810 +++++----- generated/info.php | 340 +++-- generated/ingres-ii.php | 180 ++- generated/inotify.php | 14 +- generated/json.php | 22 +- generated/ldap.php | 902 ++++++----- generated/libevent.php | 236 ++- generated/libxml.php | 8 +- generated/lzf.php | 14 +- generated/mailparse.php | 50 +- generated/mbstring.php | 184 ++- generated/misc.php | 78 +- generated/msql.php | 162 +- generated/mssql.php | 62 +- generated/mysql.php | 124 +- generated/mysqlndMs.php | 38 +- generated/mysqlndQc.php | 32 +- generated/network.php | 438 +++--- generated/oci8.php | 858 ++++++----- generated/opcache.php | 8 +- generated/openssl.php | 436 +++--- generated/outcontrol.php | 32 +- generated/password.php | 122 +- generated/pcntl.php | 54 +- generated/pcre.php | 498 +++--- generated/pdf.php | 1014 +++++++------ generated/pgsql.php | 668 ++++---- generated/posix.php | 138 +- generated/ps.php | 692 +++++---- generated/pspell.php | 220 ++- generated/readline.php | 64 +- generated/rrd.php | 8 +- generated/sem.php | 134 +- generated/session.php | 94 +- generated/shmop.php | 18 +- generated/simplexml.php | 12 +- generated/sockets.php | 328 ++-- generated/sodium.php | 14 +- generated/spl.php | 28 +- generated/sqlsrv.php | 228 ++- generated/ssh2.php | 346 +++-- generated/stream.php | 162 +- generated/strings.php | 392 +++-- generated/swoole.php | 60 +- generated/uodbc.php | 338 +++-- generated/url.php | 18 +- generated/var.php | 84 +- generated/xdiff.php | 92 +- generated/xml.php | 8 +- generated/xmlrpc.php | 8 +- generated/yaml.php | 26 +- generated/yaz.php | 388 +++-- generated/zip.php | 26 +- generated/zlib.php | 308 ++-- generator/composer.json | 13 +- generator/composer.lock | 826 +++++----- generator/src/GenerateCommand.php | 16 + generator/src/WritePhpFunction.php | 4 +- phpcs.xml.dist | 5 +- 85 files changed, 10153 insertions(+), 10243 deletions(-) diff --git a/generated/apache.php b/generated/apache.php index 28526dae..270533a2 100644 --- a/generated/apache.php +++ b/generated/apache.php @@ -6,16 +6,16 @@ /** * Fetch the Apache version. - * + * * @return string Returns the Apache version on success . * @throws ApacheException - * + * */ function apache_get_version(): string { error_clear_last(); $result = \apache_get_version(); - if ($result === FALSE) { + if ($result === false) { throw ApacheException::createFromPhpError(); } return $result; @@ -28,17 +28,17 @@ function apache_get_version(): string * ignore_user_abort(true) and periodic * apache_reset_timeout calls, Apache can theoretically * run forever. - * + * * This function requires Apache 1. - * + * * @throws ApacheException - * + * */ function apache_reset_timeout(): void { error_clear_last(); $result = \apache_reset_timeout(); - if ($result === FALSE) { + if ($result === false) { throw ApacheException::createFromPhpError(); } } @@ -46,16 +46,16 @@ function apache_reset_timeout(): void /** * Fetch all HTTP response headers. - * + * * @return array An array of all Apache response headers on success . * @throws ApacheException - * + * */ function apache_response_headers(): array { error_clear_last(); $result = \apache_response_headers(); - if ($result === FALSE) { + if ($result === false) { throw ApacheException::createFromPhpError(); } return $result; @@ -66,20 +66,18 @@ function apache_response_headers(): array * apache_setenv sets the value of the Apache * environment variable specified by * variable. - * + * * @param string $variable The environment variable that's being set. * @param string $value The new variable value. * @param bool $walk_to_top Whether to set the top-level variable available to all Apache layers. * @throws ApacheException - * + * */ function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void { error_clear_last(); $result = \apache_setenv($variable, $value, $walk_to_top); - if ($result === FALSE) { + if ($result === false) { throw ApacheException::createFromPhpError(); } } - - diff --git a/generated/apc.php b/generated/apc.php index a1f81f89..447f0a7c 100644 --- a/generated/apc.php +++ b/generated/apc.php @@ -5,21 +5,21 @@ use Safe\Exceptions\ApcException; /** - * apc_cas updates an already existing integer value if the - * old parameter matches the currently stored value + * apc_cas updates an already existing integer value if the + * old parameter matches the currently stored value * with the value of the new parameter. - * + * * @param string $key The key of the value being updated. * @param int $old The old value (the value currently stored). * @param int $new The new value to update to. * @throws ApcException - * + * */ function apc_cas(string $key, int $old, int $new): void { error_clear_last(); $result = \apc_cas($key, $old, $new); - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } } @@ -27,19 +27,19 @@ function apc_cas(string $key, int $old, int $new): void /** * Stores a file in the bytecode cache, bypassing all filters. - * + * * @param string $filename Full or relative path to a PHP file that will be compiled and stored in * the bytecode cache. - * @param bool $atomic + * @param bool $atomic * @return mixed Returns TRUE on success . * @throws ApcException - * + * */ function apc_compile_file(string $filename, bool $atomic = true) { error_clear_last(); $result = \apc_compile_file($filename, $atomic); - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } return $result; @@ -48,25 +48,25 @@ function apc_compile_file(string $filename, bool $atomic = true) /** * Decreases a stored integer value. - * + * * @param string $key The key of the value being decreased. * @param int $step The step, or value to decrease. * @param bool $success Optionally pass the success or fail boolean value to * this referenced variable. * @return int Returns the current value of key's value on success, - * + * * @throws ApcException - * + * */ function apc_dec(string $key, int $step = 1, bool &$success = null): int { error_clear_last(); if ($success !== null) { $result = \apc_dec($key, $step, $success); - }else { + } else { $result = \apc_dec($key, $step); } - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } return $result; @@ -78,10 +78,10 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int * APC is to increase the performance of scripts/applications, this mechanism * is provided to streamline the process of mass constant definition. However, * this function does not perform as well as anticipated. - * + * * For a better-performing solution, try the * hidef extension from PECL. - * + * * @param string $key The key serves as the name of the constant set * being stored. This key is used to retrieve the * stored constants in apc_load_constants. @@ -94,13 +94,13 @@ function apc_dec(string $key, int $step = 1, bool &$success = null): int * represent different values. If this parameter evaluates to FALSE the * constants will be declared as case-insensitive symbols. * @throws ApcException - * + * */ function apc_define_constants(string $key, array $constants, bool $case_sensitive = true): void { error_clear_last(); $result = \apc_define_constants($key, $constants, $case_sensitive); - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } } @@ -108,7 +108,7 @@ function apc_define_constants(string $key, array $constants, bool $case_sensitiv /** * Deletes the given files from the opcode cache. - * + * * @param mixed $keys The files to be deleted. Accepts a string, * array of strings, or an APCIterator * object. @@ -117,13 +117,13 @@ function apc_define_constants(string $key, array $constants, bool $case_sensitiv * an empty array is returned on success, or an array of failed files * is returned. * @throws ApcException - * + * */ function apc_delete_file($keys) { error_clear_last(); $result = \apc_delete_file($keys); - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } return $result; @@ -132,17 +132,17 @@ function apc_delete_file($keys) /** * Removes a stored variable from the cache. - * + * * @param string|string[]|APCIterator $key The key used to store the value (with * apc_store). * @throws ApcException - * + * */ function apc_delete(string $key) { error_clear_last(); $result = \apc_delete($key); - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } return $result; @@ -151,25 +151,25 @@ function apc_delete(string $key) /** * Increases a stored number. - * + * * @param string $key The key of the value being increased. * @param int $step The step, or value to increase. * @param bool $success Optionally pass the success or fail boolean value to * this referenced variable. * @return int Returns the current value of key's value on success, - * + * * @throws ApcException - * + * */ function apc_inc(string $key, int $step = 1, bool &$success = null): int { error_clear_last(); if ($success !== null) { $result = \apc_inc($key, $step, $success); - }else { + } else { $result = \apc_inc($key, $step); } - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } return $result; @@ -178,7 +178,7 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int /** * Loads a set of constants from the cache. - * + * * @param string $key The name of the constant set (that was stored with * apc_define_constants) to be retrieved. * @param bool $case_sensitive The default behaviour for constants is to be declared case-sensitive; @@ -186,15 +186,13 @@ function apc_inc(string $key, int $step = 1, bool &$success = null): int * represent different values. If this parameter evaluates to FALSE the * constants will be declared as case-insensitive symbols. * @throws ApcException - * + * */ function apc_load_constants(string $key, bool $case_sensitive = true): void { error_clear_last(); $result = \apc_load_constants($key, $case_sensitive); - if ($result === FALSE) { + if ($result === false) { throw ApcException::createFromPhpError(); } } - - diff --git a/generated/apcu.php b/generated/apcu.php index b785c44d..53ed49cc 100644 --- a/generated/apcu.php +++ b/generated/apcu.php @@ -5,21 +5,21 @@ use Safe\Exceptions\ApcuException; /** - * apcu_cas updates an already existing integer value if the - * old parameter matches the currently stored value + * apcu_cas updates an already existing integer value if the + * old parameter matches the currently stored value * with the value of the new parameter. - * + * * @param string $key The key of the value being updated. * @param int $old The old value (the value currently stored). * @param int $new The new value to update to. * @throws ApcuException - * + * */ function apcu_cas(string $key, int $old, int $new): void { error_clear_last(); $result = \apcu_cas($key, $old, $new); - if ($result === FALSE) { + if ($result === false) { throw ApcuException::createFromPhpError(); } } @@ -27,25 +27,25 @@ function apcu_cas(string $key, int $old, int $new): void /** * Decreases a stored integer value. - * + * * @param string $key The key of the value being decreased. * @param int $step The step, or value to decrease. * @param bool $success Optionally pass the success or fail boolean value to * this referenced variable. * @return int Returns the current value of key's value on success, - * + * * @throws ApcuException - * + * */ function apcu_dec(string $key, int $step = 1, bool &$success = null): int { error_clear_last(); if ($success !== null) { $result = \apcu_dec($key, $step, $success); - }else { + } else { $result = \apcu_dec($key, $step); } - if ($result === FALSE) { + if ($result === false) { throw ApcuException::createFromPhpError(); } return $result; @@ -54,20 +54,20 @@ function apcu_dec(string $key, int $step = 1, bool &$success = null): int /** * Removes a stored variable from the cache. - * + * * @param string|string[]|APCUIterator $key A key used to store the value as a * string for a single key, * or as an array of strings for several keys, * or as an APCUIterator object. * @return bool|array Returns TRUE on success . * @throws ApcuException - * + * */ function apcu_delete($key): void { error_clear_last(); $result = \apcu_delete($key); - if ($result === FALSE) { + if ($result === false) { throw ApcuException::createFromPhpError(); } } @@ -75,28 +75,26 @@ function apcu_delete($key): void /** * Increases a stored number. - * + * * @param string $key The key of the value being increased. * @param int $step The step, or value to increase. * @param bool $success Optionally pass the success or fail boolean value to * this referenced variable. * @return int Returns the current value of key's value on success, - * + * * @throws ApcuException - * + * */ function apcu_inc(string $key, int $step = 1, bool &$success = null): int { error_clear_last(); if ($success !== null) { $result = \apcu_inc($key, $step, $success); - }else { + } else { $result = \apcu_inc($key, $step); } - if ($result === FALSE) { + if ($result === false) { throw ApcuException::createFromPhpError(); } return $result; } - - diff --git a/generated/array.php b/generated/array.php index a6b9ed60..5b99c713 100644 --- a/generated/array.php +++ b/generated/array.php @@ -8,71 +8,71 @@ * array_multisort can be used to sort several * arrays at once, or a multi-dimensional array by one or more * dimensions. - * + * * Associative (string) keys will be maintained, but numeric * keys will be re-indexed. - * + * * @param array $array1 An array being sorted. * @param array|int $array1_sort_order The order used to sort the previous array argument. Either * SORT_ASC to sort ascendingly or SORT_DESC * to sort descendingly. - * + * * This argument can be swapped with array1_sort_flags * or omitted entirely, in which case SORT_ASC is assumed. * @param array|int $array1_sort_flags Sort options for the previous array argument: - * + * * Sorting type flags: - * - * + * + * * SORT_REGULAR - compare items normally * (don't change types) - * - * + * + * * SORT_NUMERIC - compare items numerically - * - * + * + * * SORT_STRING - compare items as strings - * - * - * + * + * + * * SORT_LOCALE_STRING - compare items as * strings, based on the current locale. It uses the locale, * which can be changed using setlocale - * - * - * - * + * + * + * + * * SORT_NATURAL - compare items as strings * using "natural ordering" like natsort - * - * - * - * + * + * + * + * * SORT_FLAG_CASE - can be combined * (bitwise OR) with * SORT_STRING or * SORT_NATURAL to sort strings case-insensitively - * - * - * - * + * + * + * + * * This argument can be swapped with array1_sort_order * or omitted entirely, in which case SORT_REGULAR is assumed. * @param mixed $params More arrays, optionally followed by sort order and flags. Only elements * corresponding to equivalent elements in previous arrays are compared. * In other words, the sort is lexicographical. * @throws ArrayException - * + * */ -function array_multisort(array &$array1, $array1_sort_order = SORT_ASC, $array1_sort_flags = SORT_REGULAR, ...$params): void +function array_multisort(array &$array1, $array1_sort_order = SORT_ASC, $array1_sort_flags = SORT_REGULAR, ...$params): void { error_clear_last(); if ($params !== null) { $result = \array_multisort($array1, $array1_sort_order, $array1_sort_flags, $params); - }else { + } else { $result = \array_multisort($array1, $array1_sort_order, $array1_sort_flags); } - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -82,12 +82,12 @@ function array_multisort(array &$array1, $array1_sort_order = SORT_ASC, $array1_ * Applies the user-defined callback function to each * element of the array. This function will recurse * into deeper arrays. - * + * * @param array $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. - * + * * If callback needs to be working with the * actual values of the array, specify the first parameter of * callback as a @@ -98,13 +98,13 @@ function array_multisort(array &$array1, $array1_sort_order = SORT_ASC, $array1_ * it will be passed as the third parameter to the * callback. * @throws ArrayException - * + * */ function array_walk_recursive(array &$array, callable $callback, $userdata = null): void { error_clear_last(); $result = \array_walk_recursive($array, $callback, $userdata); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -113,22 +113,22 @@ function array_walk_recursive(array &$array, callable $callback, $userdata = nul /** * This function sorts an array such that array indices maintain their * correlation with the array elements they are associated with. - * + * * This is used mainly when sorting associative arrays where the actual * element order is significant. - * + * * @param array $array The input array. * @param int $sort_flags You may modify the behavior of the sort using the optional parameter * sort_flags, for details see * sort. * @throws ArrayException - * + * */ function arsort(array &$array, int $sort_flags = SORT_REGULAR): void { error_clear_last(); $result = \arsort($array, $sort_flags); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -139,19 +139,19 @@ function arsort(array &$array, int $sort_flags = SORT_REGULAR): void * their correlation with the array elements they are associated * with. This is used mainly when sorting associative arrays where * the actual element order is significant. - * + * * @param array $array The input array. * @param int $sort_flags You may modify the behavior of the sort using the optional * parameter sort_flags, for details * see sort. * @throws ArrayException - * + * */ function asort(array &$array, int $sort_flags = SORT_REGULAR): void { error_clear_last(); $result = \asort($array, $sort_flags); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -160,19 +160,19 @@ function asort(array &$array, int $sort_flags = SORT_REGULAR): void /** * Sorts an array by key in reverse order, maintaining key to data * correlations. This is useful mainly for associative arrays. - * + * * @param array $array The input array. * @param int $sort_flags You may modify the behavior of the sort using the optional parameter * sort_flags, for details see * sort. * @throws ArrayException - * + * */ function krsort(array &$array, int $sort_flags = SORT_REGULAR): void { error_clear_last(); $result = \krsort($array, $sort_flags); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -181,19 +181,19 @@ function krsort(array &$array, int $sort_flags = SORT_REGULAR): void /** * Sorts an array by key, maintaining key to data correlations. This is * useful mainly for associative arrays. - * + * * @param array $array The input array. * @param int $sort_flags You may modify the behavior of the sort using the optional * parameter sort_flags, for details * see sort. * @throws ArrayException - * + * */ function ksort(array &$array, int $sort_flags = SORT_REGULAR): void { error_clear_last(); $result = \ksort($array, $sort_flags); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -202,20 +202,20 @@ function ksort(array &$array, int $sort_flags = SORT_REGULAR): void /** * natcasesort is a case insensitive version of * natsort. - * + * * This function implements a sort algorithm that orders * alphanumeric strings in the way a human being would while maintaining * key/value associations. This is described as a "natural ordering". - * + * * @param array $array The input array. * @throws ArrayException - * + * */ function natcasesort(array &$array): void { error_clear_last(); $result = \natcasesort($array); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -227,16 +227,16 @@ function natcasesort(array &$array): void * This is described as a "natural ordering". An example of the difference * between this algorithm and the regular computer string sorting algorithms * (used in sort) can be seen in the example below. - * + * * @param array $array The input array. * @throws ArrayException - * + * */ function natsort(array &$array): void { error_clear_last(); $result = \natsort($array); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -244,19 +244,19 @@ function natsort(array &$array): void /** * This function sorts an array in reverse order (highest to lowest). - * + * * @param array $array The input array. * @param int $sort_flags You may modify the behavior of the sort using the optional * parameter sort_flags, for details see * sort. * @throws ArrayException - * + * */ function rsort(array &$array, int $sort_flags = SORT_REGULAR): void { error_clear_last(); $result = \rsort($array, $sort_flags); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -266,16 +266,16 @@ function rsort(array &$array, int $sort_flags = SORT_REGULAR): void * This function shuffles (randomizes the order of the elements in) an array. * It uses a pseudo random number generator that is not suitable for * cryptographic purposes. - * + * * @param array $array The array. * @throws ArrayException - * + * */ function shuffle(array &$array): void { error_clear_last(); $result = \shuffle($array); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -284,53 +284,53 @@ function shuffle(array &$array): void /** * This function sorts an array. Elements will be arranged from * lowest to highest when this function has completed. - * + * * @param array $array The input array. * @param int $sort_flags The optional second parameter sort_flags * may be used to modify the sorting behavior using these values: - * + * * Sorting type flags: - * - * + * + * * SORT_REGULAR - compare items normally * (don't change types) - * - * + * + * * SORT_NUMERIC - compare items numerically - * - * + * + * * SORT_STRING - compare items as strings - * - * - * + * + * + * * SORT_LOCALE_STRING - compare items as * strings, based on the current locale. It uses the locale, * which can be changed using setlocale - * - * - * - * + * + * + * + * * SORT_NATURAL - compare items as strings * using "natural ordering" like natsort - * - * - * - * + * + * + * + * * SORT_FLAG_CASE - can be combined * (bitwise OR) with * SORT_STRING or * SORT_NATURAL to sort strings case-insensitively - * - * - * + * + * + * * @throws ArrayException - * + * */ function sort(array &$array, int $sort_flags = SORT_REGULAR): void { error_clear_last(); $result = \sort($array, $sort_flags); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -340,21 +340,21 @@ function sort(array &$array, int $sort_flags = SORT_REGULAR): void * This function sorts an array such that array indices maintain their * correlation with the array elements they are associated with, using a * user-defined comparison function. - * + * * This is used mainly when sorting associative arrays where the actual * element order is significant. - * + * * @param array $array The input array. * @param callable $value_compare_func See usort and uksort for * examples of user-defined comparison functions. * @throws ArrayException - * + * */ function uasort(array &$array, callable $value_compare_func): void { error_clear_last(); $result = \uasort($array, $value_compare_func); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -365,18 +365,18 @@ function uasort(array &$array, callable $value_compare_func): void * user-supplied comparison function. If the array you wish to sort * needs to be sorted by some non-trivial criteria, you should use * this function. - * + * * @param array $array The input array. * @param callable $key_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647. * @throws ArrayException - * + * */ function uksort(array &$array, callable $key_compare_func): void { error_clear_last(); $result = \uksort($array, $key_compare_func); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } @@ -386,26 +386,24 @@ function uksort(array &$array, callable $key_compare_func): void * This function will sort an array by its values using a user-supplied * comparison function. If the array you wish to sort needs to be sorted by * some non-trivial criteria, you should use this function. - * + * * @param array $array The input array. * @param callable $value_compare_func The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. * Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647. - * + * * Returning non-integer values from the comparison * function, such as float, will result in an internal cast to * integer of the callback's return value. So values such as * 0.99 and 0.1 will both be cast to an integer value of 0, which will * compare such values as equal. * @throws ArrayException - * + * */ function usort(array &$array, callable $value_compare_func): void { error_clear_last(); $result = \usort($array, $value_compare_func); - if ($result === FALSE) { + if ($result === false) { throw ArrayException::createFromPhpError(); } } - - diff --git a/generated/bzip2.php b/generated/bzip2.php index 1755d4ad..e1b35a44 100644 --- a/generated/bzip2.php +++ b/generated/bzip2.php @@ -6,18 +6,18 @@ /** * Closes the given bzip2 file pointer. - * - * @param resource $bz The file pointer. It must be valid and must point to a file + * + * @param resource $bz The file pointer. It must be valid and must point to a file * successfully opened by bzopen. * @return int Returns TRUE on success . * @throws Bzip2Exception - * + * */ function bzclose($bz): int { error_clear_last(); $result = \bzclose($bz); - if ($result === FALSE) { + if ($result === false) { throw Bzip2Exception::createFromPhpError(); } return $result; @@ -27,18 +27,18 @@ function bzclose($bz): int /** * Forces a write of all buffered bzip2 data for the file pointer * bz. - * - * @param resource $bz The file pointer. It must be valid and must point to a file + * + * @param resource $bz The file pointer. It must be valid and must point to a file * successfully opened by bzopen. * @return int Returns TRUE on success . * @throws Bzip2Exception - * + * */ function bzflush($bz): void { error_clear_last(); $result = \bzflush($bz); - if ($result === FALSE) { + if ($result === false) { throw Bzip2Exception::createFromPhpError(); } } @@ -46,24 +46,24 @@ function bzflush($bz): void /** * bzread reads from the given bzip2 file pointer. - * + * * Reading stops when length (uncompressed) bytes have * been read or EOF is reached, whichever comes first. - * - * @param resource $bz The file pointer. It must be valid and must point to a file + * + * @param resource $bz The file pointer. It must be valid and must point to a file * successfully opened by bzopen. - * @param int $length If not specified, bzread will read 1024 + * @param int $length If not specified, bzread will read 1024 * (uncompressed) bytes at a time. A maximum of 8192 * uncompressed bytes will be read at a time. * @return string Returns the uncompressed data, . * @throws Bzip2Exception - * + * */ function bzread($bz, int $length = 1024): string { error_clear_last(); $result = \bzread($bz, $length); - if ($result === FALSE) { + if ($result === false) { throw Bzip2Exception::createFromPhpError(); } return $result; @@ -71,31 +71,29 @@ function bzread($bz, int $length = 1024): string /** - * bzwrite writes a string into the given bzip2 file + * bzwrite writes a string into the given bzip2 file * stream. - * - * @param resource $bz The file pointer. It must be valid and must point to a file + * + * @param resource $bz The file pointer. It must be valid and must point to a file * successfully opened by bzopen. * @param string $data The written data. - * @param int $length If supplied, writing will stop after length - * (uncompressed) bytes have been written or the end of + * @param int $length If supplied, writing will stop after length + * (uncompressed) bytes have been written or the end of * data is reached, whichever comes first. * @return int Returns the number of bytes written, . * @throws Bzip2Exception - * + * */ function bzwrite($bz, string $data, int $length = null): int { error_clear_last(); if ($length !== null) { $result = \bzwrite($bz, $data, $length); - }else { + } else { $result = \bzwrite($bz, $data); } - if ($result === FALSE) { + if ($result === false) { throw Bzip2Exception::createFromPhpError(); } return $result; } - - diff --git a/generated/classobj.php b/generated/classobj.php index 3e84d58c..98147ac2 100644 --- a/generated/classobj.php +++ b/generated/classobj.php @@ -8,20 +8,18 @@ * Creates an alias named alias * based on the user defined class original. * The aliased class is exactly the same as the original class. - * + * * @param string $original The original class. * @param string $alias The alias name for the class. * @param bool $autoload Whether to autoload if the original class is not found. * @throws ClassobjException - * + * */ function class_alias(string $original, string $alias, bool $autoload = true): void { error_clear_last(); $result = \class_alias($original, $alias, $autoload); - if ($result === FALSE) { + if ($result === false) { throw ClassobjException::createFromPhpError(); } } - - diff --git a/generated/com.php b/generated/com.php index 2e8248e2..c4212aee 100644 --- a/generated/com.php +++ b/generated/com.php @@ -8,12 +8,12 @@ * Instructs COM to sink events generated by * comobject into the PHP object * sinkobject. - * + * * Be careful how you use this feature; if you are doing something similar * to the example below, then it doesn't really make sense to run it in a * web server context. - * - * @param object $comobject + * + * @param object $comobject * @param object $sinkobject sinkobject should be an instance of a class with * methods named after those of the desired dispinterface; you may use * com_print_typeinfo to help generate a template class @@ -24,17 +24,17 @@ * sinkinterface to the name of the dispinterface * that you want to use. * @throws ComException - * + * */ function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = null): void { error_clear_last(); if ($sinkinterface !== null) { $result = \com_event_sink($comobject, $sinkobject, $sinkinterface); - }else { + } else { $result = \com_event_sink($comobject, $sinkobject); } - if ($result === FALSE) { + if ($result === false) { throw ComException::createFromPhpError(); } } @@ -43,60 +43,60 @@ function com_event_sink(variant $comobject, object $sinkobject, $sinkinterface = /** * Loads a type-library and registers its constants in the engine, as though * they were defined using define. - * + * * Note that it is much more efficient to use the configuration setting to pre-load and * register the constants, although not so flexible. - * + * * If you have turned on , then * PHP will attempt to automatically register the constants associated with a * COM object when you instantiate it. This depends on the interfaces * provided by the COM object itself, and may not always be possible. - * + * * @param string $typelib_name typelib_name can be one of the following: - * - * - * + * + * + * * The filename of a .tlb file or the executable module * that contains the type library. - * - * - * - * + * + * + * + * * The type library GUID, followed by its version number, for example * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * - * - * - * + * + * + * + * * The type library name, e.g. Microsoft OLE DB ActiveX Data * Objects 1.0 Library. - * - * - * + * + * + * * PHP will attempt to resolve the type library in this order, as the * process gets more and more expensive as you progress down the list; * searching for the type library by name is handled by physically * enumerating the registry until we find a match. - * + * * The filename of a .tlb file or the executable module * that contains the type library. - * + * * The type library GUID, followed by its version number, for example * {00000200-0000-0010-8000-00AA006D2EA4},2,0. - * + * * The type library name, e.g. Microsoft OLE DB ActiveX Data * Objects 1.0 Library. * @param int $case_insensitive The case_insensitive behaves in the same way as * the parameter with the same name in the define * function. * @throws ComException - * + * */ function com_load_typelib(string $typelib_name, bool $case_insensitive = true): void { error_clear_last(); $result = \com_load_typelib($typelib_name, $case_insensitive); - if ($result === FALSE) { + if ($result === false) { throw ComException::createFromPhpError(); } } @@ -107,7 +107,7 @@ function com_load_typelib(string $typelib_name, bool $case_insensitive = true): * as an event sink. You may also use it to generate a dump of any COM * object, provided that it supports enough of the introspection interfaces, * and that you know the name of the interface you want to display. - * + * * @param object $comobject comobject should be either an instance of a COM * object, or be the name of a typelibrary (which will be resolved according * to the rules set out in com_load_typelib). @@ -115,7 +115,7 @@ function com_load_typelib(string $typelib_name, bool $case_insensitive = true): * @param bool $wantsink If set to TRUE, the corresponding sink interface will be displayed * instead. * @throws ComException - * + * */ function com_print_typeinfo(object $comobject, string $dispinterface = null, bool $wantsink = false): void { @@ -124,12 +124,10 @@ function com_print_typeinfo(object $comobject, string $dispinterface = null, boo $result = \com_print_typeinfo($comobject, $dispinterface, $wantsink); } elseif ($dispinterface !== null) { $result = \com_print_typeinfo($comobject, $dispinterface); - }else { + } else { $result = \com_print_typeinfo($comobject); } - if ($result === FALSE) { + if ($result === false) { throw ComException::createFromPhpError(); } } - - diff --git a/generated/curl.php b/generated/curl.php index ad4b9b47..c62d78c7 100644 --- a/generated/curl.php +++ b/generated/curl.php @@ -6,19 +6,19 @@ /** * This function URL encodes the given string according to RFC 3986. - * + * * @param resource $ch A cURL handle returned by * curl_init. * @param string $str The string to be encoded. * @return string Returns escaped string . * @throws CurlException - * + * */ function curl_escape($ch, string $str): string { error_clear_last(); $result = \curl_escape($ch, $str); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromCurlResource($ch); } return $result; @@ -27,23 +27,23 @@ function curl_escape($ch, string $str): string /** * Execute the given cURL session. - * + * * This function should be called after initializing a cURL session and all * the options for the session are set. - * + * * @param resource $ch A cURL handle returned by * curl_init. * @return bool|string Returns TRUE on success . However, if the CURLOPT_RETURNTRANSFER * option is set, it will return * the result on success, FALSE on failure. * @throws CurlException - * + * */ function curl_exec($ch) { error_clear_last(); $result = \curl_exec($ch); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromCurlResource($ch); } return $result; @@ -54,22 +54,22 @@ function curl_exec($ch) * Initializes a new session and return a cURL handle for use with the * curl_setopt, curl_exec, * and curl_close functions. - * + * * @param string $url If provided, the CURLOPT_URL option will be set - * to its value. You can manually set this using the + * to its value. You can manually set this using the * curl_setopt function. - * + * * The file protocol is disabled by cURL if * open_basedir is set. * @return resource Returns a cURL handle on success, FALSE on errors. * @throws CurlException - * + * */ function curl_init(string $url = null) { error_clear_last(); $result = \curl_init($url); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromPhpError(); } return $result; @@ -78,19 +78,19 @@ function curl_init(string $url = null) /** * Return an integer containing the last multi curl error number. - * + * * @param resource $mh A cURL multi handle returned by * curl_multi_init. * @return int Return an integer containing the last multi curl error number, * . * @throws CurlException - * + * */ function curl_multi_errno($mh): int { error_clear_last(); $result = \curl_multi_errno($mh); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromPhpError(); } return $result; @@ -99,610 +99,610 @@ function curl_multi_errno($mh): int /** * Sets an option on the given cURL session handle. - * + * * @param resource $ch A cURL handle returned by * curl_init. * @param int $option The CURLOPT_XXX option to set. * @param mixed $value The value to be set on option. - * + * * value should be a bool for the * following values of the option parameter: - * - * - * - * + * + * + * + * * Option * Set value to * Notes - * - * - * - * + * + * + * + * * CURLOPT_AUTOREFERER - * + * * TRUE to automatically set the Referer: field in * requests where it follows a Location: redirect. - * - * - * - * - * + * + * + * + * + * * CURLOPT_BINARYTRANSFER - * + * * TRUE to return the raw output when * CURLOPT_RETURNTRANSFER is used. - * - * + * + * * From PHP 5.1.3, this option has no effect: the raw output will * always be returned when * CURLOPT_RETURNTRANSFER is used. - * - * - * + * + * + * * CURLOPT_COOKIESESSION - * + * * TRUE to mark this as a new cookie "session". It will force libcurl * to ignore all cookies it is about to load that are "session cookies" * from the previous session. By default, libcurl always stores and * loads all cookies, independent if they are session cookies or not. * Session cookies are cookies without expiry date and they are meant * to be alive and existing for this "session" only. - * - * - * - * - * + * + * + * + * + * * CURLOPT_CERTINFO - * + * * TRUE to output SSL certification information to STDERR * on secure transfers. - * - * - * Added in cURL 7.19.1. - * Available since PHP 5.3.2. + * + * + * Added in cURL 7.19.1. + * Available since PHP 5.3.2. * Requires CURLOPT_VERBOSE to be on to have an effect. - * - * - * + * + * + * * CURLOPT_CONNECT_ONLY - * - * TRUE tells the library to perform all the required proxy authentication - * and connection setup, but no data transfer. This option is implemented for + * + * TRUE tells the library to perform all the required proxy authentication + * and connection setup, but no data transfer. This option is implemented for * HTTP, SMTP and POP3. - * - * + * + * * Added in 7.15.2. * Available since PHP 5.5.0. - * - * - * + * + * + * * CURLOPT_CRLF - * + * * TRUE to convert Unix newlines to CRLF newlines * on transfers. - * - * - * - * - * + * + * + * + * + * * CURLOPT_DNS_USE_GLOBAL_CACHE - * + * * TRUE to use a global DNS cache. This option is * not thread-safe and is enabled by default. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FAILONERROR - * + * * TRUE to fail verbosely if the HTTP code returned * is greater than or equal to 400. The default behavior is to return * the page normally, ignoring the code. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSL_FALSESTART - * + * * TRUE to enable TLS false start. - * - * + * + * * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_FILETIME - * + * * TRUE to attempt to retrieve the modification * date of the remote document. This value can be retrieved using * the CURLINFO_FILETIME option with * curl_getinfo. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FOLLOWLOCATION - * + * * TRUE to follow any * "Location: " header that the server sends as * part of the HTTP header (note this is recursive, PHP will follow as * many "Location: " headers that it is sent, * unless CURLOPT_MAXREDIRS is set). - * - * - * - * - * + * + * + * + * + * * CURLOPT_FORBID_REUSE - * + * * TRUE to force the connection to explicitly * close when it has finished processing, and not be pooled for reuse. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FRESH_CONNECT - * + * * TRUE to force the use of a new connection * instead of a cached one. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FTP_USE_EPRT - * + * * TRUE to use EPRT (and LPRT) when doing active * FTP downloads. Use FALSE to disable EPRT and LPRT and use PORT * only. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FTP_USE_EPSV - * + * * TRUE to first try an EPSV command for FTP * transfers before reverting back to PASV. Set to FALSE * to disable EPSV. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FTP_CREATE_MISSING_DIRS - * + * * TRUE to create missing directories when an FTP operation * encounters a path that currently doesn't exist. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FTPAPPEND - * + * * TRUE to append to the remote file instead of * overwriting it. - * - * - * - * - * + * + * + * + * + * * CURLOPT_TCP_NODELAY - * + * * TRUE to disable TCP's Nagle algorithm, which tries to minimize * the number of small packets on the network. - * - * + * + * * Available since PHP 5.2.1 for versions compiled with libcurl 7.11.2 or * greater. - * - * - * + * + * + * * CURLOPT_FTPASCII - * + * * An alias of * CURLOPT_TRANSFERTEXT. Use that instead. - * - * - * - * - * + * + * + * + * + * * CURLOPT_FTPLISTONLY - * + * * TRUE to only list the names of an FTP * directory. - * - * - * - * - * + * + * + * + * + * * CURLOPT_HEADER - * + * * TRUE to include the header in the output. - * - * - * - * - * + * + * + * + * + * * CURLINFO_HEADER_OUT - * + * * TRUE to track the handle's request string. - * - * + * + * * Available since PHP 5.1.3. The CURLINFO_ * prefix is intentional. - * - * - * + * + * + * * CURLOPT_HTTPGET - * + * * TRUE to reset the HTTP request method to GET. * Since GET is the default, this is only necessary if the request * method has been changed. - * - * - * - * - * + * + * + * + * + * * CURLOPT_HTTPPROXYTUNNEL - * + * * TRUE to tunnel through a given HTTP proxy. - * - * - * - * - * + * + * + * + * + * * CURLOPT_MUTE - * + * * TRUE to be completely silent with regards to * the cURL functions. - * - * + * + * * Removed in cURL 7.15.5 (You can use CURLOPT_RETURNTRANSFER instead) - * - * - * + * + * + * * CURLOPT_NETRC - * + * * TRUE to scan the ~/.netrc * file to find a username and password for the remote site that * a connection is being established with. - * - * - * - * - * + * + * + * + * + * * CURLOPT_NOBODY - * + * * TRUE to exclude the body from the output. * Request method is then set to HEAD. Changing this to FALSE does * not change it to GET. - * - * - * - * - * + * + * + * + * + * * CURLOPT_NOPROGRESS - * + * * TRUE to disable the progress meter for cURL transfers. - * - * + * + * * PHP automatically sets this option to TRUE, this should only be * changed for debugging purposes. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * CURLOPT_NOSIGNAL - * + * * TRUE to ignore any cURL function that causes a * signal to be sent to the PHP process. This is turned on by default * in multi-threaded SAPIs so timeout options can still be used. - * - * + * + * * Added in cURL 7.10. - * - * - * + * + * + * * CURLOPT_PATH_AS_IS - * + * * TRUE to not handle dot dot sequences. - * - * + * + * * Added in cURL 7.42.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_PIPEWAIT - * + * * TRUE to wait for pipelining/multiplexing. - * - * + * + * * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_POST - * + * * TRUE to do a regular HTTP POST. This POST is the * normal application/x-www-form-urlencoded kind, * most commonly used by HTML forms. - * - * - * - * - * + * + * + * + * + * * CURLOPT_PUT - * + * * TRUE to HTTP PUT a file. The file to PUT must * be set with CURLOPT_INFILE and * CURLOPT_INFILESIZE. - * - * - * - * - * + * + * + * + * + * * CURLOPT_RETURNTRANSFER - * + * * TRUE to return the transfer as a string of the * return value of curl_exec instead of outputting * it directly. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SAFE_UPLOAD - * + * * TRUE to disable support for the @ prefix for * uploading files in CURLOPT_POSTFIELDS, which * means that values starting with @ can be safely * passed as fields. CURLFile may be used for * uploads instead. - * - * + * + * * Added in PHP 5.5.0 with FALSE as the default value. PHP 5.6.0 * changes the default value to TRUE. PHP 7 removes this option; * the CURLFile interface must be used to upload files. - * - * - * + * + * + * * CURLOPT_SASL_IR - * + * * TRUE to enable sending the initial response in the first packet. - * - * + * + * * Added in cURL 7.31.10. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_SSL_ENABLE_ALPN - * + * * FALSE to disable ALPN in the SSL handshake (if the SSL backend * libcurl is built to use supports it), which can be used to * negotiate http2. - * - * + * + * * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_SSL_ENABLE_NPN - * + * * FALSE to disable NPN in the SSL handshake (if the SSL backend * libcurl is built to use supports it), which can be used to * negotiate http2. - * - * + * + * * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_SSL_VERIFYPEER - * + * * FALSE to stop cURL from verifying the peer's * certificate. Alternate certificates to verify against can be * specified with the CURLOPT_CAINFO option * or a certificate directory can be specified with the * CURLOPT_CAPATH option. - * - * + * + * * TRUE by default as of cURL 7.10. Default bundle installed as of * cURL 7.10. - * - * - * + * + * + * * CURLOPT_SSL_VERIFYSTATUS - * + * * TRUE to verify the certificate's status. - * - * + * + * * Added in cURL 7.41.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_TCP_FASTOPEN - * + * * TRUE to enable TCP Fast Open. - * - * + * + * * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_TFTP_NO_OPTIONS - * + * * TRUE to not send TFTP options requests. - * - * + * + * * Added in cURL 7.48.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_TRANSFERTEXT - * + * * TRUE to use ASCII mode for FTP transfers. * For LDAP, it retrieves data in plain text instead of HTML. On * Windows systems, it will not set STDOUT to binary * mode. - * - * - * - * - * + * + * + * + * + * * CURLOPT_UNRESTRICTED_AUTH - * + * * TRUE to keep sending the username and password * when following locations (using * CURLOPT_FOLLOWLOCATION), even when the * hostname has changed. - * - * - * - * - * + * + * + * + * + * * CURLOPT_UPLOAD - * + * * TRUE to prepare for an upload. - * - * - * - * - * + * + * + * + * + * * CURLOPT_VERBOSE - * + * * TRUE to output verbose information. Writes * output to STDERR, or the file specified using * CURLOPT_STDERR. - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * * TRUE to disable the progress meter for cURL transfers. - * - * + * + * * PHP automatically sets this option to TRUE, this should only be * changed for debugging purposes. - * - * - * + * + * + * * PHP automatically sets this option to TRUE, this should only be * changed for debugging purposes. - * + * * value should be an integer for the * following values of the option parameter: - * - * - * - * + * + * + * + * * Option * Set value to * Notes - * - * - * - * + * + * + * + * * CURLOPT_BUFFERSIZE - * + * * The size of the buffer to use for each read. There is no guarantee * this request will be fulfilled, however. - * - * + * + * * Added in cURL 7.10. - * - * - * + * + * + * * CURLOPT_CLOSEPOLICY - * + * * One of the CURLCLOSEPOLICY_* values. - * - * + * + * * This option is deprecated, as it was never implemented in cURL and * never had any effect. - * - * - * - * + * + * + * + * * Removed in PHP 5.6.0. - * - * - * + * + * + * * CURLOPT_CONNECTTIMEOUT - * + * * The number of seconds to wait while trying to connect. Use 0 to * wait indefinitely. - * - * - * - * - * + * + * + * + * + * * CURLOPT_CONNECTTIMEOUT_MS - * + * * The number of milliseconds to wait while trying to connect. Use 0 to * wait indefinitely. - * + * * If libcurl is built to use the standard system name resolver, that * portion of the connect will still use full-second resolution for * timeouts with a minimum timeout allowed of one second. - * - * + * + * * Added in cURL 7.16.2. Available since PHP 5.2.3. - * - * - * + * + * + * * CURLOPT_DNS_CACHE_TIMEOUT - * + * * The number of seconds to keep DNS entries in memory. This * option is set to 120 (2 minutes) by default. - * - * - * - * - * + * + * + * + * + * * CURLOPT_EXPECT_100_TIMEOUT_MS - * + * * The timeout for Expect: 100-continue responses in milliseconds. * Defaults to 1000 milliseconds. - * - * + * + * * Added in cURL 7.36.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_FTPSSLAUTH - * + * * The FTP authentication method (when is activated): * CURLFTPAUTH_SSL (try SSL first), * CURLFTPAUTH_TLS (try TLS first), or * CURLFTPAUTH_DEFAULT (let cURL decide). - * - * + * + * * Added in cURL 7.12.2. - * - * - * + * + * + * * CURLOPT_HEADEROPT - * + * * How to deal with headers. One of the following constants: - * + * * CURLHEADER_UNIFIED: the headers specified in * CURLOPT_HTTPHEADER will be used in requests - * both to servers and proxies. With this option enabled, + * both to servers and proxies. With this option enabled, * CURLOPT_PROXYHEADER will not have any effect. - * - * + * + * * CURLHEADER_SEPARATE: makes * CURLOPT_HTTPHEADER headers only get sent to * a server and not to a proxy. Proxy headers must be set with @@ -712,31 +712,31 @@ function curl_multi_errno($mh): int * send CURLOPT_PROXYHEADER headers only to the * proxy and then CURLOPT_HTTPHEADER headers * only to the server. - * - * + * + * * Defaults to CURLHEADER_SEPARATE as of cURL * 7.42.1, and CURLHEADER_UNIFIED before. - * - * - * + * + * + * * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_HTTP_VERSION - * + * * CURL_HTTP_VERSION_NONE (default, lets CURL * decide which version to use), * CURL_HTTP_VERSION_1_0 (forces HTTP/1.0), * or CURL_HTTP_VERSION_1_1 (forces HTTP/1.1). - * - * - * - * - * + * + * + * + * + * * CURLOPT_HTTPAUTH - * - * + * + * * The HTTP authentication method(s) to use. The options are: * CURLAUTH_BASIC, * CURLAUTH_DIGEST, @@ -744,108 +744,108 @@ function curl_multi_errno($mh): int * CURLAUTH_NTLM, * CURLAUTH_ANY, and * CURLAUTH_ANYSAFE. - * - * + * + * * The bitwise | (or) operator can be used to combine * more than one method. If this is done, cURL will poll the server to see * what methods it supports and pick the best one. - * - * + * + * * CURLAUTH_ANY is an alias for * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * + * + * * CURLAUTH_ANYSAFE is an alias for * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * - * - * - * - * + * + * + * + * + * + * * CURLOPT_INFILESIZE - * + * * The expected size, in bytes, of the file when uploading a file to * a remote site. Note that using this option will not stop libcurl * from sending more data, as exactly what is sent depends on * CURLOPT_READFUNCTION. - * - * - * - * - * + * + * + * + * + * * CURLOPT_LOW_SPEED_LIMIT - * + * * The transfer speed, in bytes per second, that the transfer should be * below during the count of CURLOPT_LOW_SPEED_TIME * seconds before PHP considers the transfer too slow and aborts. - * - * - * - * - * + * + * + * + * + * * CURLOPT_LOW_SPEED_TIME - * + * * The number of seconds the transfer speed should be below * CURLOPT_LOW_SPEED_LIMIT before PHP considers * the transfer too slow and aborts. - * - * - * - * - * + * + * + * + * + * * CURLOPT_MAXCONNECTS - * + * * The maximum amount of persistent connections that are allowed. * When the limit is reached, * CURLOPT_CLOSEPOLICY is used to determine * which connection to close. - * - * - * - * - * + * + * + * + * + * * CURLOPT_MAXREDIRS - * + * * The maximum amount of HTTP redirections to follow. Use this option * alongside CURLOPT_FOLLOWLOCATION. - * - * - * - * - * + * + * + * + * + * * CURLOPT_PORT - * + * * An alternative port number to connect to. - * - * - * - * - * + * + * + * + * + * * CURLOPT_POSTREDIR - * + * * A bitmask of 1 (301 Moved Permanently), 2 (302 Found) * and 4 (303 See Other) if the HTTP POST method should be maintained * when CURLOPT_FOLLOWLOCATION is set and a * specific type of redirect occurs. - * - * + * + * * Added in cURL 7.19.1. Available since PHP 5.3.2. - * - * - * + * + * + * * CURLOPT_PROTOCOLS - * - * - * Bitmask of CURLPROTO_* values. If used, this bitmask + * + * + * Bitmask of CURLPROTO_* values. If used, this bitmask * limits what protocols libcurl may use in the transfer. This allows you to have * a libcurl built to support a wide range of protocols but still limit specific * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. + * accept all protocols it supports. * See also CURLOPT_REDIR_PROTOCOLS. - * - * - * Valid protocol options are: + * + * + * Valid protocol options are: * CURLPROTO_HTTP, * CURLPROTO_HTTPS, * CURLPROTO_FTP, @@ -859,105 +859,105 @@ function curl_multi_errno($mh): int * CURLPROTO_FILE, * CURLPROTO_TFTP, * CURLPROTO_ALL - * - * - * + * + * + * * Added in cURL 7.19.4. - * - * - * + * + * + * * CURLOPT_PROXYAUTH - * + * * The HTTP authentication method(s) to use for the proxy connection. * Use the same bitmasks as described in * CURLOPT_HTTPAUTH. For proxy authentication, * only CURLAUTH_BASIC and * CURLAUTH_NTLM are currently supported. - * - * + * + * * Added in cURL 7.10.7. - * - * - * + * + * + * * CURLOPT_PROXYPORT - * + * * The port number of the proxy to connect to. This port number can * also be set in CURLOPT_PROXY. - * - * - * - * - * + * + * + * + * + * * CURLOPT_PROXYTYPE - * + * * Either CURLPROXY_HTTP (default), * CURLPROXY_SOCKS4, * CURLPROXY_SOCKS5, * CURLPROXY_SOCKS4A or * CURLPROXY_SOCKS5_HOSTNAME. - * - * + * + * * Added in cURL 7.10. - * - * - * + * + * + * * CURLOPT_REDIR_PROTOCOLS - * + * * Bitmask of CURLPROTO_* values. If used, this bitmask * limits what protocols libcurl may use in a transfer that it follows to in * a redirect when CURLOPT_FOLLOWLOCATION is enabled. * This allows you to limit specific transfers to only be allowed to use a subset * of protocols in redirections. By default libcurl will allow all protocols * except for FILE and SCP. This is a difference compared to pre-7.19.4 versions - * which unconditionally would follow to all protocols supported. + * which unconditionally would follow to all protocols supported. * See also CURLOPT_PROTOCOLS for protocol constant values. - * - * + * + * * Added in cURL 7.19.4. - * - * - * + * + * + * * CURLOPT_RESUME_FROM - * + * * The offset, in bytes, to resume a transfer from. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSL_OPTIONS - * + * * Set SSL behavior options, which is a bitmask of any of the following constants: - * + * * CURLSSLOPT_ALLOW_BEAST: do not attempt to use * any workarounds for a security flaw in the SSL3 and TLS1.0 protocols. - * - * + * + * * CURLSSLOPT_NO_REVOKE: disable certificate * revocation checks for those SSL backends where such behavior is * present. - * - * - * + * + * + * * Added in cURL 7.25.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_SSL_VERIFYHOST - * + * * 1 to check the existence of a common name in the * SSL peer certificate. 2 to check the existence of * a common name and also verify that it matches the hostname * provided. 0 to not check the names. In production environments the value of this option * should be kept at 2 (default value). - * - * + * + * * Support for value 1 removed in cURL 7.28.1. - * - * - * + * + * + * * CURLOPT_SSLVERSION - * + * * One of CURL_SSLVERSION_DEFAULT (0), * CURL_SSLVERSION_TLSv1 (1), * CURL_SSLVERSION_SSLv2 (2), @@ -965,29 +965,29 @@ function curl_multi_errno($mh): int * CURL_SSLVERSION_TLSv1_0 (4), * CURL_SSLVERSION_TLSv1_1 (5) or * CURL_SSLVERSION_TLSv1_2 (6). - * - * + * + * * Your best bet is to not set this and let it use the default. * Setting it to 2 or 3 is very dangerous given the known * vulnerabilities in SSLv2 and SSLv3. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * CURLOPT_STREAM_WEIGHT - * + * * Set the numerical stream weight (a number between 1 and 256). - * - * + * + * * Added in cURL 7.46.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_TIMECONDITION - * + * * How CURLOPT_TIMEVALUE is treated. * Use CURL_TIMECOND_IFMODSINCE to return the * page only if it has been modified since the time specified in @@ -997,114 +997,114 @@ function curl_multi_errno($mh): int * Use CURL_TIMECOND_IFUNMODSINCE for the reverse * effect. CURL_TIMECOND_IFMODSINCE is the * default. - * - * - * - * - * + * + * + * + * + * * CURLOPT_TIMEOUT - * + * * The maximum number of seconds to allow cURL functions to execute. - * - * - * - * - * + * + * + * + * + * * CURLOPT_TIMEOUT_MS - * + * * The maximum number of milliseconds to allow cURL functions to * execute. - * + * * If libcurl is built to use the standard system name resolver, that * portion of the connect will still use full-second resolution for * timeouts with a minimum timeout allowed of one second. - * - * + * + * * Added in cURL 7.16.2. Available since PHP 5.2.3. - * - * - * + * + * + * * CURLOPT_TIMEVALUE - * + * * The time in seconds since January 1st, 1970. The time will be used * by CURLOPT_TIMECONDITION. By default, * CURL_TIMECOND_IFMODSINCE is used. - * - * - * - * - * + * + * + * + * + * * CURLOPT_MAX_RECV_SPEED_LARGE - * + * * If a download exceeds this speed (counted in bytes per second) on * cumulative average during the transfer, the transfer will pause to * keep the average rate less than or equal to the parameter value. * Defaults to unlimited speed. - * - * + * + * * Added in cURL 7.15.5. Available since PHP 5.4.0. - * - * - * + * + * + * * CURLOPT_MAX_SEND_SPEED_LARGE - * + * * If an upload exceeds this speed (counted in bytes per second) on * cumulative average during the transfer, the transfer will pause to * keep the average rate less than or equal to the parameter value. * Defaults to unlimited speed. - * - * + * + * * Added in cURL 7.15.5. Available since PHP 5.4.0. - * - * - * + * + * + * * CURLOPT_SSH_AUTH_TYPES - * - * A bitmask consisting of one or more of - * CURLSSH_AUTH_PUBLICKEY, - * CURLSSH_AUTH_PASSWORD, - * CURLSSH_AUTH_HOST, - * CURLSSH_AUTH_KEYBOARD. Set to + * + * A bitmask consisting of one or more of + * CURLSSH_AUTH_PUBLICKEY, + * CURLSSH_AUTH_PASSWORD, + * CURLSSH_AUTH_HOST, + * CURLSSH_AUTH_KEYBOARD. Set to * CURLSSH_AUTH_ANY to let libcurl pick one. - * - * - * Added in cURL 7.16.1. - * - * - * + * + * + * Added in cURL 7.16.1. + * + * + * * CURLOPT_IPRESOLVE - * + * * Allows an application to select what kind of IP addresses to use when * resolving host names. This is only interesting when using host names that * resolve addresses using more than one version of IP, possible values are - * CURL_IPRESOLVE_WHATEVER, - * CURL_IPRESOLVE_V4, + * CURL_IPRESOLVE_WHATEVER, + * CURL_IPRESOLVE_V4, * CURL_IPRESOLVE_V6, by default * CURL_IPRESOLVE_WHATEVER. - * - * + * + * * Added in cURL 7.10.8. - * - * - * + * + * + * * CURLOPT_FTP_FILEMETHOD - * + * * Tell curl which method to use to reach a file on a FTP(S) server. Possible values are - * CURLFTPMETHOD_MULTICWD, - * CURLFTPMETHOD_NOCWD and + * CURLFTPMETHOD_MULTICWD, + * CURLFTPMETHOD_NOCWD and * CURLFTPMETHOD_SINGLECWD. - * - * + * + * * Added in cURL 7.15.1. Available since PHP 5.3.0. - * - * - * - * - * - * + * + * + * + * + * + * * This option is deprecated, as it was never implemented in cURL and * never had any effect. - * + * * The HTTP authentication method(s) to use. The options are: * CURLAUTH_BASIC, * CURLAUTH_DIGEST, @@ -1112,25 +1112,25 @@ function curl_multi_errno($mh): int * CURLAUTH_NTLM, * CURLAUTH_ANY, and * CURLAUTH_ANYSAFE. - * + * * The bitwise | (or) operator can be used to combine * more than one method. If this is done, cURL will poll the server to see * what methods it supports and pick the best one. - * + * * CURLAUTH_ANY is an alias for * CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * + * * CURLAUTH_ANYSAFE is an alias for * CURLAUTH_DIGEST | CURLAUTH_GSSNEGOTIATE | CURLAUTH_NTLM. - * - * Bitmask of CURLPROTO_* values. If used, this bitmask + * + * Bitmask of CURLPROTO_* values. If used, this bitmask * limits what protocols libcurl may use in the transfer. This allows you to have * a libcurl built to support a wide range of protocols but still limit specific * transfers to only be allowed to use a subset of them. By default libcurl will - * accept all protocols it supports. + * accept all protocols it supports. * See also CURLOPT_REDIR_PROTOCOLS. - * - * Valid protocol options are: + * + * Valid protocol options are: * CURLPROTO_HTTP, * CURLPROTO_HTTPS, * CURLPROTO_FTP, @@ -1144,78 +1144,78 @@ function curl_multi_errno($mh): int * CURLPROTO_FILE, * CURLPROTO_TFTP, * CURLPROTO_ALL - * + * * Your best bet is to not set this and let it use the default. * Setting it to 2 or 3 is very dangerous given the known * vulnerabilities in SSLv2 and SSLv3. - * + * * value should be a string for the * following values of the option parameter: - * - * - * - * + * + * + * + * * Option * Set value to * Notes - * - * - * - * + * + * + * + * * CURLOPT_CAINFO - * + * * The name of a file holding one or more certificates to verify the * peer with. This only makes sense when used in combination with * CURLOPT_SSL_VERIFYPEER. - * - * + * + * * Might require an absolute path. - * - * - * + * + * + * * CURLOPT_CAPATH - * + * * A directory that holds multiple CA certificates. Use this option * alongside CURLOPT_SSL_VERIFYPEER. - * - * - * - * - * + * + * + * + * + * * CURLOPT_COOKIE - * + * * The contents of the "Cookie: " header to be * used in the HTTP request. * Note that multiple cookies are separated with a semicolon followed * by a space (e.g., "fruit=apple; colour=red") - * - * - * - * - * + * + * + * + * + * * CURLOPT_COOKIEFILE - * + * * The name of the file containing the cookie data. The cookie file can * be in Netscape format, or just plain HTTP-style headers dumped into * a file. * If the name is an empty string, no cookies are loaded, but cookie * handling is still enabled. - * - * - * - * - * + * + * + * + * + * * CURLOPT_COOKIEJAR - * - * The name of a file to save all internal cookies to when the handle is closed, + * + * The name of a file to save all internal cookies to when the handle is closed, * e.g. after a call to curl_close. - * - * - * - * - * + * + * + * + * + * * CURLOPT_CUSTOMREQUEST - * + * * A custom request method to use instead of * "GET" or "HEAD" when doing * a HTTP request. This is useful for doing @@ -1225,112 +1225,112 @@ function curl_multi_errno($mh): int * i.e. Do not enter a whole HTTP request line here. For instance, * entering "GET /index.html HTTP/1.0\r\n\r\n" * would be incorrect. - * - * + * + * * Don't do this without making sure the server supports the custom * request method first. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * CURLOPT_DEFAULT_PROTOCOL - * + * * The default protocol to use if the URL is missing a scheme name. - * - * + * + * * Added in cURL 7.45.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_DNS_INTERFACE - * + * * Set the name of the network interface that the DNS resolver should bind to. * This must be an interface name (not an address). - * - * + * + * * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_DNS_LOCAL_IP4 - * + * * Set the local IPv4 address that the resolver should bind to. The argument * should contain a single numerical IPv4 address as a string. - * - * + * + * * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_DNS_LOCAL_IP6 - * + * * Set the local IPv6 address that the resolver should bind to. The argument * should contain a single numerical IPv6 address as a string. - * - * + * + * * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_EGDSOCKET - * + * * Like CURLOPT_RANDOM_FILE, except a filename * to an Entropy Gathering Daemon socket. - * - * - * - * - * + * + * + * + * + * * CURLOPT_ENCODING - * + * * The contents of the "Accept-Encoding: " header. * This enables decoding of the response. Supported encodings are * "identity", "deflate", and * "gzip". If an empty string, "", * is set, a header containing all supported encoding types is sent. - * - * + * + * * Added in cURL 7.10. - * - * - * + * + * + * * CURLOPT_FTPPORT - * + * * The value which will be used to get the IP address to use * for the FTP "PORT" instruction. The "PORT" instruction tells * the remote server to connect to our specified IP address. The * string may be a plain IP address, a hostname, a network * interface name (under Unix), or just a plain '-' to use the * systems default IP address. - * - * - * - * - * + * + * + * + * + * * CURLOPT_INTERFACE - * + * * The name of the outgoing network interface to use. This can be an * interface name, an IP address or a host name. - * - * - * - * - * + * + * + * + * + * * CURLOPT_KEYPASSWD - * - * The password required to use the CURLOPT_SSLKEY - * or CURLOPT_SSH_PRIVATE_KEYFILE private key. - * - * - * Added in cURL 7.16.1. - * - * - * + * + * The password required to use the CURLOPT_SSLKEY + * or CURLOPT_SSH_PRIVATE_KEYFILE private key. + * + * + * Added in cURL 7.16.1. + * + * + * * CURLOPT_KRB4LEVEL - * + * * The KRB4 (Kerberos 4) security level. Any of the following values * (in order from least to most powerful) are valid: * "clear", @@ -1341,329 +1341,329 @@ function curl_multi_errno($mh): int * "private" is used. Setting this option to NULL * will disable KRB4 security. Currently KRB4 security only works * with FTP transactions. - * - * - * - * - * + * + * + * + * + * * CURLOPT_LOGIN_OPTIONS - * + * * Can be used to set protocol specific login options, such as the * preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*", * and should be used in conjunction with the * CURLOPT_USERNAME option. - * - * + * + * * Added in cURL 7.34.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_PINNEDPUBLICKEY - * + * * Set the pinned public key. * The string can be the file name of your pinned public key. The file * format expected is "PEM" or "DER". The string can also be any * number of base64 encoded sha256 hashes preceded by "sha256//" and * separated by ";". - * - * + * + * * Added in cURL 7.39.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_POSTFIELDS - * - * + * + * * The full data to post in a HTTP "POST" operation. * To post a file, prepend a filename with @ and * use the full path. The filetype can be explicitly specified by * following the filename with the type in the format * ';type=mimetype'. This parameter can either be - * passed as a urlencoded string like 'para1=val1&para2=val2&...' + * passed as a urlencoded string like 'para1=val1&para2=val2&...' * or as an array with the field name as key and field data as value. * If value is an array, the * Content-Type header will be set to * multipart/form-data. - * - * + * + * * As of PHP 5.2.0, value must be an array if * files are passed to this option with the @ prefix. - * - * + * + * * As of PHP 5.5.0, the @ prefix is deprecated and - * files can be sent using CURLFile. The + * files can be sent using CURLFile. The * @ prefix can be disabled for safe passing of - * values beginning with @ by setting the + * values beginning with @ by setting the * CURLOPT_SAFE_UPLOAD option to TRUE. - * - * - * - * - * - * + * + * + * + * + * + * * CURLOPT_PRIVATE - * + * * Any data that should be associated with this cURL handle. This data * can subsequently be retrieved with the * CURLINFO_PRIVATE option of * curl_getinfo. cURL does nothing with this data. * When using a cURL multi handle, this private data is typically a * unique key to identify a standard cURL handle. - * - * - * Added in cURL 7.10.3. - * - * - * + * + * + * Added in cURL 7.10.3. + * + * + * * CURLOPT_PROXY - * + * * The HTTP proxy to tunnel requests through. - * - * - * - * - * + * + * + * + * + * * CURLOPT_PROXY_SERVICE_NAME - * + * * The proxy authentication service name. - * - * + * + * * Added in cURL 7.34.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_PROXYUSERPWD - * + * * A username and password formatted as * "[username]:[password]" to use for the * connection to the proxy. - * - * - * - * - * + * + * + * + * + * * CURLOPT_RANDOM_FILE - * + * * A filename to be used to seed the random number generator for SSL. - * - * - * - * - * + * + * + * + * + * * CURLOPT_RANGE - * + * * Range(s) of data to retrieve in the format * "X-Y" where X or Y are optional. HTTP transfers * also support several intervals, separated with commas in the format * "X-Y,N-M". - * - * - * - * - * + * + * + * + * + * * CURLOPT_REFERER - * + * * The contents of the "Referer: " header to be used * in a HTTP request. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SERVICE_NAME - * + * * The authentication service name. - * - * + * + * * Added in cURL 7.43.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 - * - * A string containing 32 hexadecimal digits. The string should be the - * MD5 checksum of the remote host's public key, and libcurl will reject - * the connection to the host unless the md5sums match. + * + * A string containing 32 hexadecimal digits. The string should be the + * MD5 checksum of the remote host's public key, and libcurl will reject + * the connection to the host unless the md5sums match. * This option is only for SCP and SFTP transfers. - * - * - * Added in cURL 7.17.1. - * - * - * + * + * + * Added in cURL 7.17.1. + * + * + * * CURLOPT_SSH_PUBLIC_KEYFILE - * - * The file name for your public key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set, + * + * The file name for your public key. If not used, libcurl defaults to + * $HOME/.ssh/id_dsa.pub if the HOME environment variable is set, * and just "id_dsa.pub" in the current directory if HOME is not set. - * - * - * Added in cURL 7.16.1. - * - * - * + * + * + * Added in cURL 7.16.1. + * + * + * * CURLOPT_SSH_PRIVATE_KEYFILE - * - * The file name for your private key. If not used, libcurl defaults to - * $HOME/.ssh/id_dsa if the HOME environment variable is set, - * and just "id_dsa" in the current directory if HOME is not set. - * If the file is password-protected, set the password with + * + * The file name for your private key. If not used, libcurl defaults to + * $HOME/.ssh/id_dsa if the HOME environment variable is set, + * and just "id_dsa" in the current directory if HOME is not set. + * If the file is password-protected, set the password with * CURLOPT_KEYPASSWD. - * - * - * Added in cURL 7.16.1. - * - * - * + * + * + * Added in cURL 7.16.1. + * + * + * * CURLOPT_SSL_CIPHER_LIST - * + * * A list of ciphers to use for SSL. For example, * RC4-SHA and TLSv1 are valid * cipher lists. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSLCERT - * + * * The name of a file containing a PEM formatted certificate. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSLCERTPASSWD - * + * * The password required to use the * CURLOPT_SSLCERT certificate. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSLCERTTYPE - * + * * The format of the certificate. Supported formats are * "PEM" (default), "DER", * and "ENG". - * - * + * + * * Added in cURL 7.9.3. - * - * - * + * + * + * * CURLOPT_SSLENGINE - * + * * The identifier for the crypto engine of the private SSL key * specified in CURLOPT_SSLKEY. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSLENGINE_DEFAULT - * + * * The identifier for the crypto engine used for asymmetric crypto * operations. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSLKEY - * + * * The name of a file containing a private SSL key. - * - * - * - * - * + * + * + * + * + * * CURLOPT_SSLKEYPASSWD - * + * * The secret password needed to use the private SSL key specified in * CURLOPT_SSLKEY. - * - * + * + * * Since this option contains a sensitive password, remember to keep * the PHP script it is contained within safe. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * CURLOPT_SSLKEYTYPE - * + * * The key type of the private SSL key specified in * CURLOPT_SSLKEY. Supported key types are * "PEM" (default), "DER", * and "ENG". - * - * - * - * - * + * + * + * + * + * * CURLOPT_UNIX_SOCKET_PATH - * + * * Enables the use of Unix domain sockets as connection endpoint and * sets the path to the given string. - * - * + * + * * Added in cURL 7.40.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_URL - * + * * The URL to fetch. This can also be set when initializing a * session with curl_init. - * - * - * - * - * + * + * + * + * + * * CURLOPT_USERAGENT - * + * * The contents of the "User-Agent: " header to be * used in a HTTP request. - * - * - * - * - * + * + * + * + * + * * CURLOPT_USERNAME - * + * * The user name to use in authentication. - * - * + * + * * Added in cURL 7.19.1. Available since PHP 5.5.0. - * - * - * + * + * + * * CURLOPT_USERPWD - * + * * A username and password formatted as * "[username]:[password]" to use for the * connection. - * - * - * - * - * + * + * + * + * + * * CURLOPT_XOAUTH2_BEARER - * + * * Specifies the OAuth 2.0 access token. - * - * + * + * * Added in cURL 7.33.0. Available since PHP 7.0.7. - * - * - * - * - * - * + * + * + * + * + * + * * A custom request method to use instead of * "GET" or "HEAD" when doing * a HTTP request. This is useful for doing @@ -1673,228 +1673,228 @@ function curl_multi_errno($mh): int * i.e. Do not enter a whole HTTP request line here. For instance, * entering "GET /index.html HTTP/1.0\r\n\r\n" * would be incorrect. - * - * + * + * * Don't do this without making sure the server supports the custom * request method first. - * - * - * + * + * + * * Don't do this without making sure the server supports the custom * request method first. - * + * * The default protocol to use if the URL is missing a scheme name. - * + * * Set the name of the network interface that the DNS resolver should bind to. * This must be an interface name (not an address). - * + * * Set the local IPv4 address that the resolver should bind to. The argument * should contain a single numerical IPv4 address as a string. - * + * * Set the local IPv6 address that the resolver should bind to. The argument * should contain a single numerical IPv6 address as a string. - * + * * The secret password needed to use the private SSL key specified in * CURLOPT_SSLKEY. - * - * + * + * * Since this option contains a sensitive password, remember to keep * the PHP script it is contained within safe. - * - * - * + * + * + * * Since this option contains a sensitive password, remember to keep * the PHP script it is contained within safe. - * + * * value should be an array for the * following values of the option parameter: - * - * - * - * + * + * + * + * * Option * Set value to * Notes - * - * - * - * + * + * + * + * * CURLOPT_CONNECT_TO - * + * * Connect to a specific host and port instead of the URL's host and port. * Accepts an array of strings with the format * HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT. - * - * + * + * * Added in cURL 7.49.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_HTTP200ALIASES - * + * * An array of HTTP 200 responses that will be treated as valid * responses and not as errors. - * - * + * + * * Added in cURL 7.10.3. - * - * - * + * + * + * * CURLOPT_HTTPHEADER - * + * * An array of HTTP header fields to set, in the format - * + * * array('Content-type: text/plain', 'Content-length: 100') - * - * - * - * - * - * + * + * + * + * + * + * * CURLOPT_POSTQUOTE - * + * * An array of FTP commands to execute on the server after the FTP * request has been performed. - * - * - * - * - * + * + * + * + * + * * CURLOPT_PROXYHEADER - * + * * An array of custom HTTP headers to pass to proxies. - * - * + * + * * Added in cURL 7.37.0. Available since PHP 7.0.7. - * - * - * + * + * + * * CURLOPT_QUOTE - * + * * An array of FTP commands to execute on the server prior to the FTP * request. - * - * - * - * - * + * + * + * + * + * * CURLOPT_RESOLVE - * + * * Provide a custom address for a specific host and port pair. An array * of hostname, port, and IP address strings, each element separated by * a colon. In the format: - * + * * array("example.com:80:127.0.0.1") - * - * - * + * + * + * * Added in cURL 7.21.3. Available since PHP 5.5.0. - * - * - * - * - * - * + * + * + * + * + * + * * value should be a stream resource (using * fopen, for example) for the following values of the * option parameter: - * - * - * - * + * + * + * + * * Option * Set value to - * - * - * - * + * + * + * + * * CURLOPT_FILE - * + * * The file that the transfer should be written to. The default * is STDOUT (the browser window). - * - * - * + * + * + * * CURLOPT_INFILE - * + * * The file that the transfer should be read from when uploading. - * - * - * + * + * + * * CURLOPT_STDERR - * + * * An alternative location to output errors to instead of * STDERR. - * - * - * + * + * + * * CURLOPT_WRITEHEADER - * + * * The file that the header part of the transfer is written to. - * - * - * - * - * - * - * value should be the name of a valid function or a Closure + * + * + * + * + * + * + * value should be the name of a valid function or a Closure * for the following values of the option parameter: - * - * - * - * + * + * + * + * * Option * Set value to - * - * - * - * + * + * + * + * * CURLOPT_HEADERFUNCTION - * + * * A callback accepting two parameters. * The first is the cURL resource, the second is a * string with the header data to be written. The header data must - * be written by this callback. Return the number of + * be written by this callback. Return the number of * bytes written. - * - * - * + * + * + * * CURLOPT_PASSWDFUNCTION - * - * A callback accepting three parameters. + * + * A callback accepting three parameters. * The first is the cURL resource, the second is a * string containing a password prompt, and the third is the maximum * password length. Return the string containing the password. - * - * - * + * + * + * * CURLOPT_PROGRESSFUNCTION - * - * + * + * * A callback accepting five parameters. * The first is the cURL resource, the second is the total number of * bytes expected to be downloaded in this transfer, the third is * the number of bytes downloaded so far, the fourth is the total * number of bytes expected to be uploaded in this transfer, and the * fifth is the number of bytes uploaded so far. - * - * - * + * + * + * * The callback is only called when the CURLOPT_NOPROGRESS * option is set to FALSE. - * - * - * + * + * + * * Return a non-zero value to abort the transfer. In which case, the * transfer will set a CURLE_ABORTED_BY_CALLBACK * error. - * - * - * - * + * + * + * + * * CURLOPT_READFUNCTION - * - * A callback accepting three parameters. + * + * A callback accepting three parameters. * The first is the cURL resource, the second is a * stream resource provided to cURL through the option * CURLOPT_INFILE, and the third is the maximum @@ -1902,64 +1902,64 @@ function curl_multi_errno($mh): int * with a length equal or smaller than the amount of data requested, * typically by reading it from the passed stream resource. It should * return an empty string to signal EOF. - * - * - * + * + * + * * CURLOPT_WRITEFUNCTION - * - * A callback accepting two parameters. + * + * A callback accepting two parameters. * The first is the cURL resource, and the second is a * string with the data to be written. The data must be saved by - * this callback. It must return the exact number of bytes written + * this callback. It must return the exact number of bytes written * or the transfer will be aborted with an error. - * - * - * - * - * - * + * + * + * + * + * + * * A callback accepting five parameters. * The first is the cURL resource, the second is the total number of * bytes expected to be downloaded in this transfer, the third is * the number of bytes downloaded so far, the fourth is the total * number of bytes expected to be uploaded in this transfer, and the * fifth is the number of bytes uploaded so far. - * + * * The callback is only called when the CURLOPT_NOPROGRESS * option is set to FALSE. - * + * * Return a non-zero value to abort the transfer. In which case, the * transfer will set a CURLE_ABORTED_BY_CALLBACK * error. - * + * * Other values: - * - * - * - * + * + * + * + * * Option * Set value to - * - * - * - * + * + * + * + * * CURLOPT_SHARE - * + * * A result of curl_share_init. Makes the cURL * handle to use the data from the shared handle. - * - * - * - * - * + * + * + * + * + * * @throws CurlException - * + * */ function curl_setopt($ch, int $option, $value): void { error_clear_last(); $result = \curl_setopt($ch, $option, $value); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromCurlResource($ch); } } @@ -1967,18 +1967,18 @@ function curl_setopt($ch, int $option, $value): void /** * Return an integer containing the last share curl error number. - * + * * @param resource $sh A cURL share handle returned by curl_share_init. * @return int Returns an integer containing the last share curl error number, * . * @throws CurlException - * + * */ function curl_share_errno($sh): int { error_clear_last(); $result = \curl_share_errno($sh); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromPhpError(); } return $result; @@ -1987,74 +1987,74 @@ function curl_share_errno($sh): int /** * Sets an option on the given cURL share handle. - * + * * @param resource $sh A cURL share handle returned by curl_share_init. - * @param int $option - * - * - * + * @param int $option + * + * + * * Option * Description - * - * - * - * + * + * + * + * * CURLSHOPT_SHARE - * + * * Specifies a type of data that should be shared. - * - * - * + * + * + * * CURLSHOPT_UNSHARE - * + * * Specifies a type of data that will be no longer shared. - * - * - * - * - * - * @param string $value - * - * - * + * + * + * + * + * + * @param string $value + * + * + * * Value * Description - * - * - * - * + * + * + * + * * CURL_LOCK_DATA_COOKIE - * + * * Shares cookie data. - * - * - * + * + * + * * CURL_LOCK_DATA_DNS - * + * * Shares DNS cache. Note that when you use cURL multi handles, * all handles added to the same multi handle will share DNS cache * by default. - * - * - * + * + * + * * CURL_LOCK_DATA_SSL_SESSION - * + * * Shares SSL session IDs, reducing the time spent on the SSL * handshake when reconnecting to the same server. Note that SSL * session IDs are reused within the same handle by default. - * - * - * - * - * + * + * + * + * + * * @throws CurlException - * + * */ function curl_share_setopt($sh, int $option, string $value): void { error_clear_last(); $result = \curl_share_setopt($sh, $option, $value); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromPhpError(); } } @@ -2062,22 +2062,20 @@ function curl_share_setopt($sh, int $option, string $value): void /** * This function decodes the given URL encoded string. - * + * * @param resource $ch A cURL handle returned by * curl_init. * @param string $str The URL encoded string to be decoded. * @return string Returns decoded string . * @throws CurlException - * + * */ function curl_unescape($ch, string $str): string { error_clear_last(); $result = \curl_unescape($ch, $str); - if ($result === FALSE) { + if ($result === false) { throw CurlException::createFromCurlResource($ch); } return $result; } - - diff --git a/generated/datetime.php b/generated/datetime.php index 9b51dbe4..1f2121c9 100644 --- a/generated/datetime.php +++ b/generated/datetime.php @@ -5,19 +5,19 @@ use Safe\Exceptions\DatetimeException; /** - * - * + * + * * @param string $date Date in format accepted by strtotime. * @return array Returns array with information about the parsed date * on success . * @throws DatetimeException - * + * */ function date_parse(string $date): array { error_clear_last(); $result = \date_parse($date); - if ($result === FALSE) { + if ($result === false) { throw DatetimeException::createFromPhpError(); } return $result; @@ -25,105 +25,105 @@ function date_parse(string $date): array /** - * - * + * + * * @param int $time Timestamp. * @param float $latitude Latitude in degrees. * @param float $longitude Longitude in degrees. * @return array Returns array on success . * The structure of the array is detailed in the following list: - * - * - * + * + * + * * sunrise - * - * + * + * * The time of the sunrise (zenith angle = 90°35'). - * - * - * - * + * + * + * + * * sunset - * - * + * + * * The time of the sunset (zenith angle = 90°35'). - * - * - * - * + * + * + * + * * transit - * - * + * + * * The time when the sun is at its zenith, i.e. has reached its topmost * point. - * - * - * - * + * + * + * + * * civil_twilight_begin - * - * + * + * * The start of the civil dawn (zenith angle = 96°). It ends at sunrise. - * - * - * - * + * + * + * + * * civil_twilight_end - * - * + * + * * The end of the civil dusk (zenith angle = 96°). It starts at sunset. - * - * - * - * + * + * + * + * * nautical_twilight_begin - * - * + * + * * The start of the nautical dawn (zenith angle = 102°). It ends at * civil_twilight_begin. - * - * - * - * + * + * + * + * * nautical_twilight_end - * - * + * + * * The end of the nautical dusk (zenith angle = 102°). It starts at * civil_twilight_end. - * - * - * - * + * + * + * + * * astronomical_twilight_begin - * - * + * + * * The start of the astronomical dawn (zenith angle = 108°). It ends at * nautical_twilight_begin. - * - * - * - * + * + * + * + * * astronomical_twilight_end - * - * + * + * * The end of the astronomical dusk (zenith angle = 108°). It starts at * nautical_twilight_end. - * - * - * - * - * + * + * + * + * + * * The values of the array elements are either UNIX timestamps, FALSE if the * sun is below the respective zenith for the whole day, or TRUE if the sun is * above the respective zenith for the whole day. * @throws DatetimeException - * + * */ function date_sun_info(int $time, float $latitude, float $longitude): array { error_clear_last(); $result = \date_sun_info($time, $latitude, $longitude); - if ($result === FALSE) { + if ($result === false) { throw DatetimeException::createFromPhpError(); } return $result; @@ -133,38 +133,38 @@ function date_sun_info(int $time, float $latitude, float $longitude): array /** * date_sunrise returns the sunrise time for a given * day (specified as a timestamp) and location. - * + * * @param int $timestamp The timestamp of the day from which the sunrise * time is taken. - * @param int $format + * @param int $format * format constants - * - * - * + * + * + * * constant * description * example - * - * - * - * + * + * + * + * * SUNFUNCS_RET_STRING * returns the result as string * 16:46 - * - * + * + * * SUNFUNCS_RET_DOUBLE * returns the result as float * 16.78243132 - * - * + * + * * SUNFUNCS_RET_TIMESTAMP * returns the result as integer (timestamp) * 1095034606 - * - * - * - * + * + * + * + * * @param float $latitude Defaults to North, pass in a negative value for South. * See also: date.default_latitude * @param float $longitude Defaults to East, pass in a negative value for West. @@ -172,35 +172,35 @@ function date_sun_info(int $time, float $latitude, float $longitude): array * @param float $zenith zenith is the angle between the center of the sun * and a line perpendicular to earth's surface. It defaults to * date.sunrise_zenith - * + * * Common zenith angles - * - * - * + * + * + * * Angle * Description - * - * - * - * + * + * + * + * * 90°50' * Sunrise: the point where the sun becomes visible. - * - * + * + * * 96° * Civil twilight: conventionally used to signify the start of dawn. - * - * + * + * * 102° * Nautical twilight: the point at which the horizon starts being visible at sea. - * - * + * + * * 108° * Astronomical twilight: the point at which the sun starts being the source of any illumination. - * - * - * - * + * + * + * + * * @param float $gmt_offset Specified in hours. * The gmtoffset is ignored, if * format is @@ -210,13 +210,13 @@ function date_sun_info(int $time, float $latitude, float $longitude): array * sun does not rise at all, which happens inside the polar circles for part of * the year. * @throws DatetimeException - * + * */ function date_sunrise(int $timestamp, int $format = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $gmt_offset = 0) { error_clear_last(); $result = \date_sunrise($timestamp, $format, $latitude, $longitude, $zenith, $gmt_offset); - if ($result === FALSE) { + if ($result === false) { throw DatetimeException::createFromPhpError(); } return $result; @@ -226,38 +226,38 @@ function date_sunrise(int $timestamp, int $format = SUNFUNCS_RET_STRING, float $ /** * date_sunset returns the sunset time for a given * day (specified as a timestamp) and location. - * + * * @param int $timestamp The timestamp of the day from which the sunset * time is taken. - * @param int $format + * @param int $format * format constants - * - * - * + * + * + * * constant * description * example - * - * - * - * + * + * + * + * * SUNFUNCS_RET_STRING * returns the result as string * 16:46 - * - * + * + * * SUNFUNCS_RET_DOUBLE * returns the result as float * 16.78243132 - * - * + * + * * SUNFUNCS_RET_TIMESTAMP * returns the result as integer (timestamp) * 1095034606 - * - * - * - * + * + * + * + * * @param float $latitude Defaults to North, pass in a negative value for South. * See also: date.default_latitude * @param float $longitude Defaults to East, pass in a negative value for West. @@ -265,35 +265,35 @@ function date_sunrise(int $timestamp, int $format = SUNFUNCS_RET_STRING, float $ * @param float $zenith zenith is the angle between the center of the sun * and a line perpendicular to earth's surface. It defaults to * date.sunset_zenith - * + * * Common zenith angles - * - * - * + * + * + * * Angle * Description - * - * - * - * + * + * + * + * * 90°50' * Sunset: the point where the sun becomes invisible. - * - * + * + * * 96° * Civil twilight: conventionally used to signify the end of dusk. - * - * + * + * * 102° * Nautical twilight: the point at which the horizon ends being visible at sea. - * - * + * + * * 108° * Astronomical twilight: the point at which the sun ends being the source of any illumination. - * - * - * - * + * + * + * + * * @param float $gmt_offset Specified in hours. * The gmtoffset is ignored, if * format is @@ -303,13 +303,13 @@ function date_sunrise(int $timestamp, int $format = SUNFUNCS_RET_STRING, float $ * sun does not set at all, which happens inside the polar circles for part of * the year. * @throws DatetimeException - * + * */ function date_sunset(int $timestamp, int $format = SUNFUNCS_RET_STRING, float $latitude = null, float $longitude = null, float $zenith = null, float $gmt_offset = 0) { error_clear_last(); $result = \date_sunset($timestamp, $format, $latitude, $longitude, $zenith, $gmt_offset); - if ($result === FALSE) { + if ($result === false) { throw DatetimeException::createFromPhpError(); } return $result; @@ -321,11 +321,11 @@ function date_sunset(int $timestamp, int $format = SUNFUNCS_RET_STRING, float $l * given. This timestamp is a long integer containing the number of * seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time * specified. - * + * * Arguments may be left out in order from right to left; any * arguments thus omitted will be set to the current value according * to the local date and time. - * + * * @param int $hour The number of the hour relative to the start of the day determined by * month, day and year. * Negative values reference the hour before midnight of the day in question. @@ -347,36 +347,36 @@ function date_sunset(int $timestamp, int $format = SUNFUNCS_RET_STRING, float $l * @param int $year The number of the year, may be a two or four digit value, * with values between 0-69 mapping to 2000-2069 and 70-100 to * 1970-2000. On systems where time_t is a 32bit signed integer, as - * most common today, the valid range for year + * most common today, the valid range for year * is somewhere between 1901 and 2038. However, before PHP 5.1.0 this * range was limited from 1970 to 2038 on some systems (e.g. Windows). - * @param int $is_dst This parameter can be set to 1 if the time is during daylight savings time (DST), - * 0 if it is not, or -1 (the default) if it is unknown whether the time is within + * @param int $is_dst This parameter can be set to 1 if the time is during daylight savings time (DST), + * 0 if it is not, or -1 (the default) if it is unknown whether the time is within * daylight savings time or not. If it's unknown, PHP tries to figure it out itself. * This can cause unexpected (but not incorrect) results. - * Some times are invalid if DST is enabled on the system PHP is running on or - * is_dst is set to 1. If DST is enabled in e.g. 2:00, all times - * between 2:00 and 3:00 are invalid and mktime returns an undefined - * (usually negative) value. - * Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST + * Some times are invalid if DST is enabled on the system PHP is running on or + * is_dst is set to 1. If DST is enabled in e.g. 2:00, all times + * between 2:00 and 3:00 are invalid and mktime returns an undefined + * (usually negative) value. + * Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST * is enabled is evaluated as 23:30 of the previous day. - * + * * As of PHP 5.1.0, this parameter became deprecated. As a result, the * new timezone handling features should be used instead. - * + * * This parameter has been removed in PHP 7.0.0. * @return int mktime returns the Unix timestamp of the arguments * given. * If the arguments are invalid, the function returns FALSE (before PHP 5.1 * it returned -1). * @throws DatetimeException - * + * */ function mktime(int $hour = null, int $minute = null, int $second = null, int $month = null, int $day = null, int $year = null, int $is_dst = -1): int { error_clear_last(); $result = \mktime($hour, $minute, $second, $month, $day, $year, $is_dst); - if ($result === FALSE) { + if ($result === false) { throw DatetimeException::createFromPhpError(); } return $result; @@ -384,8 +384,8 @@ function mktime(int $hour = null, int $minute = null, int $second = null, int $m /** - * - * + * + * * @param string $abbr Time zone abbreviation. * @param int $gmtOffset Offset from GMT in seconds. Defaults to -1 which means that first found * time zone corresponding to abbr is returned. @@ -402,16 +402,14 @@ function mktime(int $hour = null, int $minute = null, int $second = null, int $m * isdst. * @return string Returns time zone name on success . * @throws DatetimeException - * + * */ function timezone_name_from_abbr(string $abbr, int $gmtOffset = -1, int $isdst = -1): string { error_clear_last(); $result = \timezone_name_from_abbr($abbr, $gmtOffset, $isdst); - if ($result === FALSE) { + if ($result === false) { throw DatetimeException::createFromPhpError(); } return $result; } - - diff --git a/generated/dir.php b/generated/dir.php index 907650af..834e4c12 100644 --- a/generated/dir.php +++ b/generated/dir.php @@ -5,18 +5,18 @@ use Safe\Exceptions\DirException; /** - * Changes PHP's current directory to + * Changes PHP's current directory to * directory. - * + * * @param string $directory The new current directory * @throws DirException - * + * */ function chdir(string $directory): void { error_clear_last(); $result = \chdir($directory); - if ($result === FALSE) { + if ($result === false) { throw DirException::createFromPhpError(); } } @@ -26,20 +26,20 @@ function chdir(string $directory): void * Changes the root directory of the current process to * directory, and changes the current * working directory to "/". - * + * * This function is only available to GNU and BSD systems, and * only when using the CLI, CGI or Embed SAPI. Also, this function * requires root privileges. - * + * * @param string $directory The path to change the root directory to. * @throws DirException - * + * */ function chroot(string $directory): void { error_clear_last(); $result = \chroot($directory); - if ($result === FALSE) { + if ($result === false) { throw DirException::createFromPhpError(); } } @@ -49,24 +49,24 @@ function chroot(string $directory): void * Returns the name of the next entry in the directory. The * entries are returned in the order in which they are stored by * the filesystem. - * + * * @param resource $dir_handle The directory handle resource previously opened - * with opendir. If the directory handle is - * not specified, the last link opened by opendir + * with opendir. If the directory handle is + * not specified, the last link opened by opendir * is assumed. * @return string Returns the entry name on success . * @throws DirException - * + * */ function readdir($dir_handle = null): string { error_clear_last(); if ($dir_handle !== null) { $result = \readdir($dir_handle); - }else { + } else { $result = \readdir(); } - if ($result === FALSE) { + if ($result === false) { throw DirException::createFromPhpError(); } return $result; @@ -77,25 +77,23 @@ function readdir($dir_handle = null): string * Resets the directory stream indicated by * dir_handle to the beginning of the * directory. - * + * * @param resource $dir_handle The directory handle resource previously opened - * with opendir. If the directory handle is - * not specified, the last link opened by opendir + * with opendir. If the directory handle is + * not specified, the last link opened by opendir * is assumed. * @throws DirException - * + * */ function rewinddir($dir_handle = null): void { error_clear_last(); if ($dir_handle !== null) { $result = \rewinddir($dir_handle); - }else { + } else { $result = \rewinddir(); } - if ($result === FALSE) { + if ($result === false) { throw DirException::createFromPhpError(); } } - - diff --git a/generated/eio.php b/generated/eio.php index 414b20aa..6b9a8536 100644 --- a/generated/eio.php +++ b/generated/eio.php @@ -8,7 +8,7 @@ * eio_busy artificially increases load taking * delay seconds to execute. May be used for debugging, * or benchmarking. - * + * * @param int $delay Delay in seconds * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to @@ -17,13 +17,13 @@ * @param mixed $data Arbitrary variable passed to callback. * @return resource eio_busy returns request resource on success . * @throws EioException - * + * */ -function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_busy($delay, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -33,7 +33,7 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = N /** * eio_chmod changes file, or direcrory permissions. The * new permissions are specified by mode. - * + * * @param string $path Path to the target file or directory * Avoid relative * paths @@ -41,41 +41,41 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = N * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_chmod returns request resource on success . * @throws EioException - * + * */ -function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_chmod($path, $mode, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -84,7 +84,7 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable /** * Changes file, or directory permissions. - * + * * @param string $path Path to file or directory. * Avoid relative * paths @@ -93,41 +93,41 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_chown returns request resource on success . * @throws EioException - * + * */ -function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_chown($path, $uid, $gid, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -137,46 +137,46 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF /** * eio_close closes file specified by * fd. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_close returns request resource on success . * @throws EioException - * + * */ -function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_close($fd, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -186,14 +186,14 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $ /** * eio_custom executes custom function specified by * execute processing it just like any other eio_* call. - * + * * @param callable $execute Specifies the request function that should match the following prototype: - * - * + * + * * callback is event completion callback that should match the following * prototype: - * - * + * + * * data is the data passed to * execute via data argument * without modifications @@ -201,41 +201,41 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $ * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_custom returns request resource on success . * @throws EioException - * + * */ -function eio_custom(callable $execute, int $pri, callable $callback, $data = NULL) +function eio_custom(callable $execute, int $pri, callable $callback, $data = null) { error_clear_last(); $result = \eio_custom($execute, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -244,47 +244,47 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = NUL /** * eio_dup2 duplicates file descriptor. - * + * * @param mixed $fd Source stream, Socket resource, or numeric file descriptor * @param mixed $fd2 Target stream, Socket resource, or numeric file descriptor * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_dup2 returns request resource on success . * @throws EioException - * + * */ -function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_dup2($fd, $fd2, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -293,15 +293,15 @@ function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = NU /** * eio_event_loop polls libeio until all requests proceeded. - * + * * @throws EioException - * + * */ function eio_event_loop(): void { error_clear_last(); $result = \eio_event_loop(); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } } @@ -312,7 +312,7 @@ function eio_event_loop(): void * file specified by fd file descriptor for the byte * range starting at offset and continuing for * length bytes. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. * @param int $mode Currently only one flag is supported for mode: * EIO_FALLOC_FL_KEEP_SIZE (the same as POSIX constant @@ -322,41 +322,41 @@ function eio_event_loop(): void * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_fallocate returns request resource on success . * @throws EioException - * + * */ -function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_fallocate($fd, $mode, $offset, $length, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -366,47 +366,47 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ /** * eio_fchmod changes permissions for the file specified * by fd file descriptor. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. * @param int $mode The new permissions. E.g. 0644. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_fchmod returns request resource on success . * @throws EioException - * + * */ -function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_fchmod($fd, $mode, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -415,46 +415,46 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callba /** * eio_fdatasync synchronizes a file's in-core state with storage device. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_fdatasync returns request resource on success . * @throws EioException - * + * */ -function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_fdatasync($fd, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -464,50 +464,50 @@ function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NUL /** * eio_fstat returns file status information in * result argument of callback - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_busy returns request resource on success . * @throws EioException - * + * */ function eio_fstat($fd, int $pri, callable $callback, $data = null) { error_clear_last(); if ($data !== null) { $result = \eio_fstat($fd, $pri, $callback, $data); - }else { + } else { $result = \eio_fstat($fd, $pri, $callback); } - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -517,50 +517,50 @@ function eio_fstat($fd, int $pri, callable $callback, $data = null) /** * eio_fstatvfs returns file system statistics in * result of callback. - * + * * @param mixed $fd A file descriptor of a file within the mounted file system. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_fstatvfs returns request resource on success . * @throws EioException - * + * */ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) { error_clear_last(); if ($data !== null) { $result = \eio_fstatvfs($fd, $pri, $callback, $data); - }else { + } else { $result = \eio_fstatvfs($fd, $pri, $callback); } - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -569,46 +569,46 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) /** * Synchronize a file's in-core state with storage device - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_fsync returns request resource on success . * @throws EioException - * + * */ -function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_fsync($fd, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -619,47 +619,47 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $ * eio_ftruncate causes a regular file referenced by * fd file descriptor to be truncated to precisely * length bytes. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor. * @param int $offset Offset from beginning of the file * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_ftruncate returns request resource on success . * @throws EioException - * + * */ -function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_ftruncate($fd, $offset, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -669,48 +669,48 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callabl /** * eio_futime changes file last access and modification * times. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open * @param float $atime Access time * @param float $mtime Modification time * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_futime returns request resource on success . * @throws EioException - * + * */ -function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_futime($fd, $atime, $mtime, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -719,42 +719,42 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, /** * eio_grp creates a request group. - * - * @param callable $callback + * + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param string $data is custom data passed to the request. * @return resource eio_grp returns request group resource on success . * @throws EioException - * + * */ -function eio_grp(callable $callback, string $data = NULL) +function eio_grp(callable $callback, string $data = null) { error_clear_last(); $result = \eio_grp($callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -764,46 +764,46 @@ function eio_grp(callable $callback, string $data = NULL) /** * eio_lstat returns file status information in * result argument of callback - * + * * @param string $path The file path * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_lstat returns request resource on success . * @throws EioException - * + * */ -function eio_lstat(string $path, int $pri, callable $callback, $data = NULL) +function eio_lstat(string $path, int $pri, callable $callback, $data = null) { error_clear_last(); $result = \eio_lstat($path, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -813,47 +813,47 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = NULL) /** * eio_mkdir creates directory with specified access * mode. - * + * * @param string $path Path for the new directory. * @param int $mode Access mode, e.g. 0755 * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_mkdir returns request resource on success . * @throws EioException - * + * */ -function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_mkdir($path, $mode, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -862,18 +862,18 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable /** * eio_mknod creates ordinary or special(often) file. - * + * * @param string $path Path for the new node(file). * @param int $mode Specifies both the permissions to use and the type of node to be * created. It should be a combination (using bitwise OR) of one of the * file types listed below and the permissions for the new node(e.g. 0640). - * + * * Possible file types are: EIO_S_IFREG(regular file), * EIO_S_IFCHR(character file), * EIO_S_IFBLK(block special file), * EIO_S_IFIFO(FIFO - named pipe) and * EIO_S_IFSOCK(UNIX domain socket). - * + * * To specify permissions EIO_S_I* constants could be * used. * @param int $dev If the file type is EIO_S_IFCHR or @@ -884,41 +884,41 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_mknod returns request resource on success . * @throws EioException - * + * */ -function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_mknod($path, $mode, $dev, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -928,45 +928,45 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT /** * eio_nop does nothing, except go through the whole * request cycle. Could be useful in debugging. - * + * * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_nop returns request resource on success . * @throws EioException - * + * */ -function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_nop($pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -976,48 +976,48 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = /** * eio_readahead populates the page cache with data from a file so that subsequent reads from * that file will not block on disk I/O. See READAHEAD(2) man page for details. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor * @param int $offset Starting point from which data is to be read. * @param int $length Number of bytes to be read. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_readahead returns request resource on success . * @throws EioException - * + * */ -function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_readahead($fd, $offset, $length, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1029,52 +1029,52 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT * closedir system calls) and returns either the names or an array in * result argument of callback * function, depending on the flags argument. - * + * * @param string $path Directory path. * @param int $flags Combination of EIO_READDIR_* constants. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param string $data is custom data passed to the request. * @return resource eio_readdir returns request resource on success, . Sets result argument of * callback function according to * flags: - * - * - * - * - * - * + * + * + * + * + * + * * EIO_READDIR_DENTS * (integer) - * - * - * + * + * + * * eio_readdir flag. If specified, the result argument of the callback * becomes an array with the following keys: * 'names' - array of directory names @@ -1085,242 +1085,242 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT * constants; * 'inode' - the inode number, if available, otherwise * unspecified; - * - * - * - * - * + * + * + * + * + * * EIO_READDIR_DIRS_FIRST * (integer) - * - * - * + * + * + * * When this flag is specified, the names will be returned in an order * where likely directories come first, in optimal stat order. - * - * - * - * - * + * + * + * + * + * * EIO_READDIR_STAT_ORDER * (integer) - * - * - * + * + * + * * When this flag is specified, then the names will be returned in an order * suitable for stat'ing each one. When planning to * stat all files in the given directory, the * returned order will likely be * fastest. - * - * - * - * - * + * + * + * + * + * * EIO_READDIR_FOUND_UNKNOWN * (integer) - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * * Node types: - * - * - * - * - * + * + * + * + * + * * EIO_DT_UNKNOWN * (integer) - * - * - * + * + * + * * Unknown node type(very common). Further stat needed. - * - * - * - * - * + * + * + * + * + * * EIO_DT_FIFO * (integer) - * - * - * + * + * + * * FIFO node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_CHR * (integer) - * - * - * + * + * + * * Node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_MPC * (integer) - * - * - * + * + * + * * Multiplexed char device (v7+coherent) node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_DIR * (integer) - * - * - * + * + * + * * Directory node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_NAM * (integer) - * - * - * + * + * + * * Xenix special named file node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_BLK * (integer) - * - * - * + * + * + * * Node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_MPB * (integer) - * - * - * + * + * + * * Multiplexed block device (v7+coherent) - * - * - * - * - * + * + * + * + * + * * EIO_DT_REG * (integer) - * - * - * + * + * + * * Node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_NWK * (integer) - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * * EIO_DT_CMP * (integer) - * - * - * + * + * + * * HP-UX network special node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_LNK * (integer) - * - * - * + * + * + * * Link node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_SOCK * (integer) - * - * - * + * + * + * * Socket node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_DOOR * (integer) - * - * - * + * + * + * * Solaris door node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_WHT * (integer) - * - * - * + * + * + * * Node type - * - * - * - * - * + * + * + * + * + * * EIO_DT_MAX * (integer) - * - * - * + * + * + * * Highest node type value - * - * - * - * - * - * - * + * + * + * + * + * + * + * * @throws EioException - * + * */ -function eio_readdir(string $path, int $flags, int $pri, callable $callback, string $data = NULL) +function eio_readdir(string $path, int $flags, int $pri, callable $callback, string $data = null) { error_clear_last(); $result = \eio_readdir($path, $flags, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1328,47 +1328,47 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, str /** - * - * + * + * * @param string $path Source symbolic link path * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param string $data is custom data passed to the request. * @return resource eio_readlink returns request resource on success . * @throws EioException - * + * */ -function eio_readlink(string $path, int $pri, callable $callback, string $data = NULL) +function eio_readlink(string $path, int $pri, callable $callback, string $data = null) { error_clear_last(); $result = \eio_readlink($path, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1377,47 +1377,47 @@ function eio_readlink(string $path, int $pri, callable $callback, string $data = /** * eio_rename renames or moves a file to new location. - * + * * @param string $path Source path * @param string $new_path Target path * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_rename returns request resource on success . * @throws EioException - * + * */ -function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_rename($path, $new_path, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1426,46 +1426,46 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** * eio_rmdir removes a directory. - * + * * @param string $path Directory path * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_rmdir returns request resource on success . * @throws EioException - * + * */ -function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_rmdir($path, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1473,55 +1473,55 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback /** - * eio_seek repositions the offset of the open file associated with + * eio_seek repositions the offset of the open file associated with * stream, Socket resource, or file descriptor specified by fd to the argument offset according to the directive whence as follows: - * + * * EIO_SEEK_SET - Set position equal to offset bytes. * EIO_SEEK_CUR - Set position to current location plus offset. * EIO_SEEK_END - Set position to end-of-file plus offset. - * - * + * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor * @param int $offset Starting point from which data is to be read. * @param int $whence Number of bytes to be read. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_seek returns request resource on success . * @throws EioException - * + * */ -function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_seek($fd, $offset, $whence, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1531,7 +1531,7 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, cal /** * eio_sendfile copies data between one file descriptor * and another. See SENDFILE(2) man page for details. - * + * * @param mixed $out_fd Output stream, Socket resource, or file descriptor. Should be opened for writing. * @param mixed $in_fd Input stream, Socket resource, or file descriptor. Should be opened for reading. * @param int $offset Offset within the source file. @@ -1539,35 +1539,35 @@ function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, cal * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param string $data is custom data passed to the request. * @return resource eio_sendfile returns request resource on success . * @throws EioException - * + * */ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null, callable $callback = null, string $data = null) { @@ -1578,10 +1578,10 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback); } elseif ($pri !== null) { $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri); - }else { + } else { $result = \eio_sendfile($out_fd, $in_fd, $offset, $length); } - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1591,47 +1591,47 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null /** * eio_stat returns file status information in * result argument of callback - * + * * @param string $path The file path * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_stat returns request resource on success . On success assigns result argument of * callback to an array. * @throws EioException - * + * */ -function eio_stat(string $path, int $pri, callable $callback, $data = NULL) +function eio_stat(string $path, int $pri, callable $callback, $data = null) { error_clear_last(); $result = \eio_stat($path, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1641,51 +1641,51 @@ function eio_stat(string $path, int $pri, callable $callback, $data = NULL) /** * eio_statvfs returns file system statistics information in * result argument of callback - * + * * @param string $path Pathname of any file within the mounted file system * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_statvfs returns request resource on success . On success assigns result argument of * callback to an array. * @throws EioException - * + * */ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) { error_clear_last(); if ($data !== null) { $result = \eio_statvfs($path, $pri, $callback, $data); - }else { + } else { $result = \eio_statvfs($path, $pri, $callback); } - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1695,47 +1695,47 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) /** * eio_symlink creates a symbolic link * new_path to path. - * + * * @param string $path Source path * @param string $new_path Target path * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_symlink returns request resource on success . * @throws EioException - * + * */ -function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_symlink($path, $new_path, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1745,7 +1745,7 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, /** * eio_sync_file_range permits fine control when synchronizing the open file referred to by the file * descriptor fd with disk. - * + * * @param mixed $fd File descriptor * @param int $offset The starting byte of the file range to be synchronized * @param int $nbytes Specifies the length of the range to be synchronized, in bytes. If @@ -1760,41 +1760,41 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_sync_file_range returns request resource on success . * @throws EioException - * + * */ -function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_sync_file_range($fd, $offset, $nbytes, $flags, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1802,20 +1802,20 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri /** - * - * - * @param int $pri - * @param callable $callback - * @param mixed $data + * + * + * @param int $pri + * @param callable $callback + * @param mixed $data * @return resource eio_sync returns request resource on success . * @throws EioException - * + * */ -function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_sync($pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1823,47 +1823,47 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = /** - * - * + * + * * @param mixed $fd File descriptor * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_syncfs returns request resource on success . * @throws EioException - * + * */ -function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_syncfs($fd, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1873,47 +1873,47 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, /** * eio_truncate causes the regular file named by path to be truncated to * a size of precisely length bytes - * + * * @param string $path File path * @param int $offset Offset from beginning of the file. * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_busy returns request resource on success . * @throws EioException - * + * */ -function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_truncate($path, $offset, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1922,46 +1922,46 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, /** * eio_unlink deletes a name from the file system. - * + * * @param string $path Path to file * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_unlink returns request resource on success . * @throws EioException - * + * */ -function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_unlink($path, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -1969,49 +1969,49 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback /** - * - * + * + * * @param string $path Path to the file. * @param float $atime Access time * @param float $mtime Modification time * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_utime returns request resource on success . * @throws EioException - * + * */ -function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_utime($path, $atime, $mtime, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; @@ -2022,7 +2022,7 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ * eio_write writes up to length * bytes from str at offset * offset from the beginning of the file. - * + * * @param mixed $fd Stream, Socket resource, or numeric file descriptor, e.g. returned by eio_open * @param string $str Source string * @param int $length Maximum number of bytes to write. @@ -2030,44 +2030,42 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ * @param int $pri The request priority: EIO_PRI_DEFAULT, EIO_PRI_MIN, EIO_PRI_MAX, or NULL. * If NULL passed, pri internally is set to * EIO_PRI_DEFAULT. - * @param callable $callback + * @param callable $callback * callback function is called when the request is done. - * It should match the following prototype: - * - * + * It should match the following prototype: + * + * * data * is custom data passed to the request. - * - * + * + * * result * request-specific result value; basically, the value returned by corresponding * system call. - * - * + * + * * req * is optional request resource which can be used with functions like eio_get_last_error - * - * - * + * + * + * * is custom data passed to the request. - * + * * request-specific result value; basically, the value returned by corresponding * system call. - * + * * is optional request resource which can be used with functions like eio_get_last_error * @param mixed $data is custom data passed to the request. * @return resource eio_write returns request resource on success . * @throws EioException - * + * */ -function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $result = \eio_write($fd, $str, $length, $offset, $pri, $callback, $data); - if ($result === FALSE) { + if ($result === false) { throw EioException::createFromPhpError(); } return $result; } - - diff --git a/generated/errorfunc.php b/generated/errorfunc.php index e50d5b4c..ac64a7d8 100644 --- a/generated/errorfunc.php +++ b/generated/errorfunc.php @@ -6,65 +6,65 @@ /** * Sends an error message to the web server's error log or to a file. - * + * * @param string $message The error message that should be logged. - * @param int $message_type Says where the error should go. The possible message types are as + * @param int $message_type Says where the error should go. The possible message types are as * follows: - * - * + * + * * error_log log types - * - * - * + * + * + * * 0 - * + * * message is sent to PHP's system logger, using * the Operating System's system logging mechanism or a file, depending * on what the error_log * configuration directive is set to. This is the default option. - * - * - * + * + * + * * 1 - * + * * message is sent by email to the address in * the destination parameter. This is the only * message type where the fourth parameter, * extra_headers is used. - * - * - * + * + * + * * 2 - * + * * No longer an option. - * - * - * + * + * + * * 3 - * + * * message is appended to the file - * destination. A newline is not automatically + * destination. A newline is not automatically * added to the end of the message string. - * - * - * + * + * + * * 4 - * + * * message is sent directly to the SAPI logging * handler. - * - * - * - * - * - * @param string $destination The destination. Its meaning depends on the + * + * + * + * + * + * @param string $destination The destination. Its meaning depends on the * message_type parameter as described above. * @param string $extra_headers The extra headers. It's used when the message_type * parameter is set to 1. - * This message type uses the same internal function as + * This message type uses the same internal function as * mail does. * @throws ErrorfuncException - * + * */ function error_log(string $message, int $message_type = 0, string $destination = null, string $extra_headers = null): void { @@ -73,12 +73,10 @@ function error_log(string $message, int $message_type = 0, string $destination = $result = \error_log($message, $message_type, $destination, $extra_headers); } elseif ($destination !== null) { $result = \error_log($message, $message_type, $destination); - }else { + } else { $result = \error_log($message, $message_type); } - if ($result === FALSE) { + if ($result === false) { throw ErrorfuncException::createFromPhpError(); } } - - diff --git a/generated/exec.php b/generated/exec.php index f7eb66cb..b3f4a7b0 100644 --- a/generated/exec.php +++ b/generated/exec.php @@ -10,27 +10,25 @@ * positive increment will lower the priority of the * current process, whereas a negative increment * will raise the priority. - * + * * proc_nice is not related to * proc_open and its associated functions in any way. - * + * * @param int $increment The new priority value, the value of this may differ on platforms. - * - * On Unix, a low value, such as -20 means high priority + * + * On Unix, a low value, such as -20 means high priority * wheras a positive value have a lower priority. - * - * For Windows the increment parameter have the + * + * For Windows the increment parameter have the * following meanings: * @throws ExecException - * + * */ function proc_nice(int $increment): void { error_clear_last(); $result = \proc_nice($increment); - if ($result === FALSE) { + if ($result === false) { throw ExecException::createFromPhpError(); } } - - diff --git a/generated/fileinfo.php b/generated/fileinfo.php index 1c2e590f..660a1cd8 100644 --- a/generated/fileinfo.php +++ b/generated/fileinfo.php @@ -6,16 +6,16 @@ /** * This function closes the resource opened by finfo_open. - * + * * @param resource $finfo Fileinfo resource returned by finfo_open. * @throws FileinfoException - * + * */ function finfo_close($finfo): void { error_clear_last(); $result = \finfo_close($finfo); - if ($result === FALSE) { + if ($result === false) { throw FileinfoException::createFromPhpError(); } } @@ -24,22 +24,20 @@ function finfo_close($finfo): void /** * Returns the MIME content type for a file as determined by using * information from the magic.mime file. - * + * * @param string $filename Path to the tested file. - * @return string Returns the content type in MIME format, like + * @return string Returns the content type in MIME format, like * text/plain or application/octet-stream, * . * @throws FileinfoException - * + * */ function mime_content_type(string $filename): string { error_clear_last(); $result = \mime_content_type($filename); - if ($result === FALSE) { + if ($result === false) { throw FileinfoException::createFromPhpError(); } return $result; } - - diff --git a/generated/filesystem.php b/generated/filesystem.php index 40e8a251..6879773d 100644 --- a/generated/filesystem.php +++ b/generated/filesystem.php @@ -7,20 +7,20 @@ /** * Attempts to change the group of the file filename * to group. - * + * * Only the superuser may change the group of a file arbitrarily; other users * may change the group of a file to any group of which that user is a member. - * + * * @param string $filename Path to the file. * @param string|int $group A group name or number. * @throws FilesystemException - * + * */ function chgrp(string $filename, $group): void { error_clear_last(); $result = \chgrp($filename, $group); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -29,20 +29,20 @@ function chgrp(string $filename, $group): void /** * Attempts to change the mode of the specified file to that given in * mode. - * + * * @param string $filename Path to the file. * @param int $mode Note that mode is not automatically * assumed to be an octal value, so to ensure the expected operation, - * you need to prefix mode with a zero (0). + * you need to prefix mode with a zero (0). * Strings such as "g+w" will not work properly. - * - * - * - * + * + * + * + * * ]]> - * - * - * + * + * + * * The mode parameter consists of three octal * number components specifying access restrictions for the owner, * the user group in which the owner is in, and to everybody else in @@ -53,16 +53,16 @@ function chgrp(string $filename, $group): void * up these numbers to specify needed rights. You can also read more * about modes on Unix systems with 'man 1 chmod' * and 'man 2 chmod'. - * - * - * - * + * + * + * + * */ function chmod(string $filename, int $mode): void { error_clear_last(); $result = \chmod($filename, $mode); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -72,17 +72,17 @@ function chmod(string $filename, int $mode): void * Attempts to change the owner of the file filename * to user user. Only the superuser may change the * owner of a file. - * + * * @param string $filename Path to the file. * @param string|int $user A user name or number. * @throws FilesystemException - * + * */ function chown(string $filename, $user): void { error_clear_last(); $result = \chown($filename, $user); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -91,29 +91,29 @@ function chown(string $filename, $user): void /** * Makes a copy of the file source to * dest. - * + * * If you wish to move a file, use the rename function. - * + * * @param string $source Path to the source file. * @param string $dest The destination path. If dest is a URL, the * copy operation may fail if the wrapper does not support overwriting of * existing files. - * + * * If the destination file already exists, it will be overwritten. - * @param resource $context A valid context resource created with + * @param resource $context A valid context resource created with * stream_context_create. * @throws FilesystemException - * + * */ function copy(string $source, string $dest, $context = null): void { error_clear_last(); if ($context !== null) { $result = \copy($source, $dest, $context); - }else { + } else { $result = \copy($source, $dest); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -123,22 +123,22 @@ function copy(string $source, string $dest, $context = null): void * Given a string containing a directory, this function will return the * number of bytes available on the corresponding filesystem or disk * partition. - * + * * @param string $directory A directory of the filesystem or disk partition. - * + * * Given a file name instead of a directory, the behaviour of the * function is unspecified and may differ between operating systems and * PHP versions. * @return float Returns the number of available bytes as a float * . * @throws FilesystemException - * + * */ function disk_free_space(string $directory): float { error_clear_last(); $result = \disk_free_space($directory); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -148,18 +148,18 @@ function disk_free_space(string $directory): float /** * Given a string containing a directory, this function will return the total * number of bytes on the corresponding filesystem or disk partition. - * + * * @param string $directory A directory of the filesystem or disk partition. * @return float Returns the total number of bytes as a float * . * @throws FilesystemException - * + * */ function disk_total_space(string $directory): float { error_clear_last(); $result = \disk_total_space($directory); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -168,17 +168,17 @@ function disk_total_space(string $directory): float /** * The file pointed to by handle is closed. - * + * * @param resource $handle The file pointer must be valid, and must point to a file successfully * opened by fopen or fsockopen. * @throws FilesystemException - * + * */ function fclose($handle): void { error_clear_last(); $result = \fclose($handle); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -187,19 +187,19 @@ function fclose($handle): void /** * This function forces a write of all buffered output to the resource * pointed to by the file handle. - * + * * @param resource $handle The file pointer must be valid, and must point to * a file successfully opened by fopen or * fsockopen (and not yet closed by * fclose). * @throws FilesystemException - * + * */ function fflush($handle): void { error_clear_last(); $result = \fflush($handle); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -207,15 +207,15 @@ function fflush($handle): void /** * This function is similar to file, except that - * file_get_contents returns the file in a - * string, starting at the specified offset - * up to maxlen bytes. On failure, + * file_get_contents returns the file in a + * string, starting at the specified offset + * up to maxlen bytes. On failure, * file_get_contents will return FALSE. - * + * * file_get_contents is the preferred way to read the * contents of a file into a string. It will use memory mapping techniques if * supported by your OS to enhance performance. - * + * * @param string $filename Name of the file to read. * @param bool $use_include_path As of PHP 5 the FILE_USE_INCLUDE_PATH constant can be used * to trigger include path @@ -223,21 +223,21 @@ function fflush($handle): void * This is not possible if strict typing * is enabled, since FILE_USE_INCLUDE_PATH is an * int. Use TRUE instead. - * @param resource|null $context A valid context resource created with + * @param resource|null $context A valid context resource created with * stream_context_create. If you don't need to use a * custom context, you can skip this parameter by NULL. * @param int $offset The offset where the reading starts on the original stream. * Negative offsets count from the end of the stream. - * + * * Seeking (offset) is not supported with remote files. * Attempting to seek on non-local files may work with small offsets, but this * is unpredictable because it works on the buffered stream. * @param int $maxlen Maximum length of data read. The default is to read until end - * of file is reached. Note that this parameter is applied to the + * of file is reached. Note that this parameter is applied to the * stream processed by the filters. * @return string The function returns the read data . * @throws FilesystemException - * + * */ function file_get_contents(string $filename, bool $use_include_path = false, $context = null, int $offset = 0, int $maxlen = null): string { @@ -248,10 +248,10 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co $result = \file_get_contents($filename, $use_include_path, $context, $offset); } elseif ($context !== null) { $result = \file_get_contents($filename, $use_include_path, $context); - }else { + } else { $result = \file_get_contents($filename, $use_include_path); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -259,19 +259,19 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co /** - * - * + * + * * @param string $filename Path to the file. * @return int Returns the time the file was last accessed, . * The time is returned as a Unix timestamp. * @throws FilesystemException - * + * */ function fileatime(string $filename): int { error_clear_last(); $result = \fileatime($filename); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -280,18 +280,18 @@ function fileatime(string $filename): int /** * Gets the inode change time of a file. - * + * * @param string $filename Path to the file. * @return int Returns the time the file was last changed, . * The time is returned as a Unix timestamp. * @throws FilesystemException - * + * */ function filectime(string $filename): int { error_clear_last(); $result = \filectime($filename); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -300,17 +300,17 @@ function filectime(string $filename): int /** * Gets the file inode. - * + * * @param string $filename Path to the file. * @return int Returns the inode number of the file, . * @throws FilesystemException - * + * */ function fileinode(string $filename): int { error_clear_last(); $result = \fileinode($filename); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -320,19 +320,19 @@ function fileinode(string $filename): int /** * This function returns the time when the data blocks of a file were being * written to, that is, the time when the content of the file was changed. - * + * * @param string $filename Path to the file. * @return int Returns the time the file was last modified, . * The time is returned as a Unix timestamp, which is * suitable for the date function. * @throws FilesystemException - * + * */ function filemtime(string $filename): int { error_clear_last(); $result = \filemtime($filename); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -341,19 +341,19 @@ function filemtime(string $filename): int /** * Gets the file owner. - * + * * @param string $filename Path to the file. * @return int Returns the user ID of the owner of the file, . * The user ID is returned in numerical format, use * posix_getpwuid to resolve it to a username. * @throws FilesystemException - * + * */ function fileowner(string $filename): int { error_clear_last(); $result = \fileowner($filename); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -363,14 +363,14 @@ function fileowner(string $filename): int /** * fopen binds a named resource, specified by * filename, to a stream. - * + * * @param string $filename If filename is of the form "scheme://...", it * is assumed to be a URL and PHP will search for a protocol handler * (also known as a wrapper) for that scheme. If no wrappers for that * protocol are registered, PHP will emit a notice to help you track * potential problems in your script and then continue as though * filename specifies a regular file. - * + * * If PHP has decided that filename specifies * a local file, then it will try to open a stream on that file. * The file must be accessible to PHP, so you need to ensure that @@ -378,113 +378,113 @@ function fileowner(string $filename): int * If you have enabled safe mode * or open_basedir further * restrictions may apply. - * + * * If PHP has decided that filename specifies * a registered protocol, and that protocol is registered as a * network URL, PHP will check to make sure that * allow_url_fopen is * enabled. If it is switched off, PHP will emit a warning and * the fopen call will fail. - * + * * The list of supported protocols can be found in . Some protocols (also referred to as * wrappers) support context * and/or php.ini options. Refer to the specific page for the * protocol in use for a list of options which can be set. (e.g. * php.ini value user_agent used by the * http wrapper). - * + * * On the Windows platform, be careful to escape any backslashes * used in the path to the file, or use forward slashes. - * - * - * + * + * + * * ]]> - * - * + * + * * @param string $mode The mode parameter specifies the type of access * you require to the stream. It may be any of the following: - * - * + * + * * A list of possible modes for fopen * using mode - * - * - * - * + * + * + * + * * mode * Description - * - * - * - * + * + * + * + * * 'r' - * + * * Open for reading only; place the file pointer at the * beginning of the file. - * - * - * + * + * + * * 'r+' - * + * * Open for reading and writing; place the file pointer at * the beginning of the file. - * - * - * + * + * + * * 'w' - * + * * Open for writing only; place the file pointer at the * beginning of the file and truncate the file to zero length. * If the file does not exist, attempt to create it. - * - * - * + * + * + * * 'w+' - * + * * Open for reading and writing; place the file pointer at * the beginning of the file and truncate the file to zero * length. If the file does not exist, attempt to create it. - * - * - * + * + * + * * 'a' - * + * * Open for writing only; place the file pointer at the end of * the file. If the file does not exist, attempt to create it. * In this mode, fseek has no effect, writes are always appended. - * - * - * + * + * + * * 'a+' - * + * * Open for reading and writing; place the file pointer at * the end of the file. If the file does not exist, attempt to * create it. In this mode, fseek only affects * the reading position, writes are always appended. - * - * - * + * + * + * * 'x' - * + * * Create and open for writing only; place the file pointer at the * beginning of the file. If the file already exists, the * fopen call will fail by returning FALSE and * generating an error of level E_WARNING. If * the file does not exist, attempt to create it. This is equivalent * to specifying O_EXCL|O_CREAT flags for the - * underlying open(2) system call. - * - * - * + * underlying open(2) system call. + * + * + * * 'x+' - * + * * Create and open for reading and writing; otherwise it has the * same behavior as 'x'. - * - * - * + * + * + * * 'c' - * + * * Open the file for writing only. If the file does not exist, it is * created. If it exists, it is neither truncated (as opposed to * 'w'), nor the call to this function fails (as is @@ -496,26 +496,26 @@ function fileowner(string $filename): int * was obtained (if truncation is desired, * ftruncate can be used after the lock is * requested). - * - * - * + * + * + * * 'c+' - * + * * Open the file for reading and writing; otherwise it has the same * behavior as 'c'. - * - * - * + * + * + * * 'e' - * + * * Set close-on-exec flag on the opened file descriptor. Only * available in PHP compiled on POSIX.1-2008 conform systems. - * - * - * - * - * - * + * + * + * + * + * + * * Different operating system families have different line-ending * conventions. When you write a text file and want to insert a line * break, you need to use the correct line-ending character(s) for your @@ -523,11 +523,11 @@ function fileowner(string $filename): int * line ending character, Windows based systems use \r\n * as the line ending characters and Macintosh based systems use * \r as the line ending character. - * + * * If you use the wrong line ending characters when writing your files, you * might find that other applications that open those files will "look * funny". - * + * * Windows offers a text-mode translation flag ('t') * which will transparently translate \n to * \r\n when working with the file. In contrast, you @@ -535,7 +535,7 @@ function fileowner(string $filename): int * translate your data. To use these flags, specify either * 'b' or 't' as the last character * of the mode parameter. - * + * * The default translation mode depends on the SAPI and version of PHP that * you are using, so you are encouraged to always specify the appropriate * flag for portability reasons. You should use the 't' @@ -543,14 +543,14 @@ function fileowner(string $filename): int * \n to delimit your line endings in your script, but * expect your files to be readable with applications such as notepad. You * should use the 'b' in all other cases. - * + * * If you do not specify the 'b' flag when working with binary files, you * may experience strange problems with your data, including broken image * files and strange problems with \r\n characters. - * + * * For portability, it is strongly recommended that you always * use the 'b' flag when opening files with fopen. - * + * * Again, for portability, it is also strongly recommended that * you re-write code that uses or relies upon the 't' * mode so that it uses the correct line endings and @@ -558,20 +558,20 @@ function fileowner(string $filename): int * @param bool $use_include_path The optional third use_include_path parameter * can be set to '1' or TRUE if you want to search for the file in the * include_path, too. - * @param resource $context + * @param resource $context * @return resource Returns a file pointer resource on success, . * @throws FilesystemException - * + * */ function fopen(string $filename, string $mode, bool $use_include_path = false, $context = null) { error_clear_last(); if ($context !== null) { $result = \fopen($filename, $mode, $use_include_path, $context); - }else { + } else { $result = \fopen($filename, $mode, $use_include_path); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -582,7 +582,7 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ * fputcsv formats a line (passed as a * fields array) as CSV and write it (terminated by a * newline) to the specified file handle. - * + * * @param resource $handle The file pointer must be valid, and must point to * a file successfully opened by fopen or * fsockopen (and not yet closed by @@ -596,13 +596,13 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ * escape character (one character only). * @return int Returns the length of the written string . * @throws FilesystemException - * + * */ function fputcsv($handle, array $fields, string $delimiter = ",", string $enclosure = '"', string $escape_char = "\\"): int { error_clear_last(); $result = \fputcsv($handle, $fields, $delimiter, $enclosure, $escape_char); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -614,45 +614,45 @@ function fputcsv($handle, array $fields, string $delimiter = ",", string $enclos * length bytes from the file pointer * referenced by handle. Reading stops as soon as one * of the following conditions is met: - * - * - * + * + * + * * length bytes have been read - * - * - * - * + * + * + * + * * EOF (end of file) is reached - * - * - * - * - * a packet becomes available or the + * + * + * + * + * a packet becomes available or the * socket timeout occurs (for network streams) - * - * - * - * + * + * + * + * * if the stream is read buffered and it does not represent a plain file, at * most one read of up to a number of bytes equal to the chunk size (usually * 8192) is made; depending on the previously buffered data, the size of the * returned data may be larger than the chunk size. - * - * - * - * + * + * + * + * * @param resource $handle A file system pointer resource * that is typically created using fopen. * @param int $length Up to length number of bytes read. * @return string Returns the read string . * @throws FilesystemException - * + * */ function fread($handle, int $length): string { error_clear_last(); $result = \fread($handle, $length); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -662,33 +662,33 @@ function fread($handle, int $length): string /** * Takes the filepointer, handle, and truncates the file to * length, size. - * + * * @param resource $handle The file pointer. - * + * * The handle must be open for writing. * @param int $size The size to truncate to. - * + * * If size is larger than the file then the file * is extended with null bytes. - * + * * If size is smaller than the file then the file * is truncated to that size. * @throws FilesystemException - * + * */ function ftruncate($handle, int $size): void { error_clear_last(); $result = \ftruncate($handle, $size); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } /** - * - * + * + * * @param resource $handle A file system pointer resource * that is typically created using fopen. * @param string $string The string that is to be written. @@ -696,24 +696,24 @@ function ftruncate($handle, int $size): void * stop after length bytes have been written or * the end of string is reached, whichever comes * first. - * + * * Note that if the length argument is given, * then the magic_quotes_runtime * configuration option will be ignored and no slashes will be * stripped from string. - * @return int + * @return int * @throws FilesystemException - * + * */ function fwrite($handle, string $string, int $length = null): int { error_clear_last(); if ($length !== null) { $result = \fwrite($handle, $string, $length); - }else { + } else { $result = \fwrite($handle, $string); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -725,63 +725,63 @@ function fwrite($handle, string $string, int $length = null): int * matching pattern according to the rules used by * the libc glob() function, which is similar to the rules used by common * shells. - * + * * @param string $pattern The pattern. No tilde expansion or parameter substitution is done. * @param int $flags Valid flags: - * - * - * + * + * + * * GLOB_MARK - Adds a slash to each directory returned - * - * - * - * + * + * + * + * * GLOB_NOSORT - Return files as they appear in the * directory (no sorting). When this flag is not used, the pathnames are * sorted alphabetically - * - * - * - * + * + * + * + * * GLOB_NOCHECK - Return the search pattern if no * files matching it were found - * - * - * - * + * + * + * + * * GLOB_NOESCAPE - Backslashes do not quote * metacharacters - * - * - * - * + * + * + * + * * GLOB_BRACE - Expands {a,b,c} to match 'a', 'b', * or 'c' - * - * - * - * + * + * + * + * * GLOB_ONLYDIR - Return only directory entries * which match the pattern - * - * - * - * + * + * + * + * * GLOB_ERR - Stop on read errors (like unreadable * directories), by default errors are ignored. - * - * - * + * + * + * * @return array Returns an array containing the matched files/directories, an empty array * if no file matched . * @throws FilesystemException - * + * */ function glob(string $pattern, int $flags = 0): array { error_clear_last(); $result = \glob($pattern, $flags); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -790,16 +790,16 @@ function glob(string $pattern, int $flags = 0): array /** * Tells whether the filename is executable. - * + * * @param string $filename Path to the file. * @throws FilesystemException - * + * */ function is_executable(string $filename): void { error_clear_last(); $result = \is_executable($filename); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -811,25 +811,25 @@ function is_executable(string $filename): void * malicious user hasn't tried to trick the script into working on * files upon which it should not be working--for instance, * /etc/passwd. - * + * * This sort of check is especially important if there is any chance * that anything done with uploaded files could reveal their * contents to the user, or even to other users on the same * system. - * + * * For proper working, the function is_uploaded_file needs * an argument like $_FILES['userfile']['tmp_name'], - the name of the uploaded * file on the client's machine $_FILES['userfile']['name'] does not work. - * + * * @param string $filename The filename being checked. * @throws FilesystemException - * + * */ function is_uploaded_file(string $filename): void { error_clear_last(); $result = \is_uploaded_file($filename); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -838,21 +838,21 @@ function is_uploaded_file(string $filename): void /** * Attempts to change the group of the symlink filename * to group. - * + * * Only the superuser may change the group of a symlink arbitrarily; other * users may change the group of a symlink to any group of which that user is * a member. - * + * * @param string $filename Path to the symlink. * @param string|int $group The group specified by name or number. * @throws FilesystemException - * + * */ function lchgrp(string $filename, $group): void { error_clear_last(); $result = \lchgrp($filename, $group); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -861,19 +861,19 @@ function lchgrp(string $filename, $group): void /** * Attempts to change the owner of the symlink filename * to user user. - * + * * Only the superuser may change the owner of a symlink. - * + * * @param string $filename Path to the file. * @param string|int $user User name or number. * @throws FilesystemException - * + * */ function lchown(string $filename, $user): void { error_clear_last(); $result = \lchown($filename, $user); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -881,17 +881,17 @@ function lchown(string $filename, $user): void /** * link creates a hard link. - * + * * @param string $target Target of the link. * @param string $link The link name. * @throws FilesystemException - * + * */ function link(string $target, string $link): void { error_clear_last(); $result = \link($target, $link); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -899,33 +899,33 @@ function link(string $target, string $link): void /** * Attempts to create the directory specified by pathname. - * + * * @param string $pathname The directory path. * @param int $mode The mode is 0777 by default, which means the widest possible * access. For more information on modes, read the details * on the chmod page. - * + * * mode is ignored on Windows. - * + * * Note that you probably want to specify the mode as an octal number, * which means it should have a leading zero. The mode 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 + * @param bool $recursive Allows the creation of nested directories specified in the * pathname. - * @param resource $context + * @param resource $context * @throws FilesystemException - * + * */ function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $context = null): void { error_clear_last(); if ($context !== null) { $result = \mkdir($pathname, $mode, $recursive, $context); - }else { + } else { $result = \mkdir($pathname, $mode, $recursive); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -933,17 +933,17 @@ function mkdir(string $pathname, int $mode = 0777, bool $recursive = false, $con /** * readlink does the same as the readlink C function. - * + * * @param string $path The symbolic link path. * @return string Returns the contents of the symbolic link path . * @throws FilesystemException - * + * */ function readlink(string $path): string { error_clear_last(); $result = \readlink($path); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -957,26 +957,26 @@ function readlink(string $path): string * it will be overwritten. If renaming a directory and * newname exists, * this function will emit a warning. - * + * * @param string $oldname The old name. - * + * * The wrapper used in oldname * must match the wrapper used in * newname. * @param string $newname The new name. - * @param resource $context + * @param resource $context * @throws FilesystemException - * + * */ function rename(string $oldname, string $newname, $context = null): void { error_clear_last(); if ($context !== null) { $result = \rename($oldname, $newname, $context); - }else { + } else { $result = \rename($oldname, $newname); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -985,17 +985,17 @@ function rename(string $oldname, string $newname, $context = null): void /** * Sets the file position indicator for handle * to the beginning of the file stream. - * + * * @param resource $handle The file pointer must be valid, and must point to a file * successfully opened by fopen. * @throws FilesystemException - * + * */ function rewind($handle): void { error_clear_last(); $result = \rewind($handle); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -1005,21 +1005,21 @@ function rewind($handle): void * Attempts to remove the directory named by dirname. * The directory must be empty, and the relevant permissions must permit this. * A E_WARNING level error will be generated on failure. - * + * * @param string $dirname Path to the directory. - * @param resource $context + * @param resource $context * @throws FilesystemException - * + * */ function rmdir(string $dirname, $context = null): void { error_clear_last(); if ($context !== null) { $result = \rmdir($dirname, $context); - }else { + } else { $result = \rmdir($dirname); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -1029,17 +1029,17 @@ function rmdir(string $dirname, $context = null): void * symlink creates a symbolic link to the existing * target with the specified name * link. - * + * * @param string $target Target of the link. * @param string $link The link name. * @throws FilesystemException - * + * */ function symlink(string $target, string $link): void { error_clear_last(); $result = \symlink($target, $link); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -1048,26 +1048,26 @@ function symlink(string $target, string $link): void /** * Creates a temporary file with a unique name in read-write (w+) mode and * returns a file handle . - * + * * The file is automatically removed when closed (for example, by calling * fclose, or when there are no remaining references to * the file handle returned by tmpfile), or when the * script ends. - * + * * For details, consult your system documentation on the * tmpfile(3) function, as well as the * stdio.h header file. - * + * * @return resource Returns a file handle, similar to the one returned by * fopen, for the new file . * @throws FilesystemException - * + * */ function tmpfile() { error_clear_last(); $result = \tmpfile(); - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } return $result; @@ -1077,31 +1077,31 @@ function tmpfile() /** * Attempts to set the access and modification times of the file named in the * filename parameter to the value given in - * time. + * time. * Note that the access time is always modified, regardless of the number * of parameters. - * + * * If the file does not exist, it will be created. - * + * * @param string $filename The name of the file being touched. - * @param int $time The touch time. If time is not supplied, + * @param int $time The touch time. If time is not supplied, * the current system time is used. - * @param int $atime If present, the access time of the given filename is set to + * @param int $atime If present, the access time of the given filename is set to * the value of atime. Otherwise, it is set to * the value passed to the time parameter. * If neither are present, the current system time is used. * @throws FilesystemException - * + * */ function touch(string $filename, int $time = null, int $atime = null): void { error_clear_last(); if ($atime !== null) { $result = \touch($filename, $time, $atime); - }else { + } else { $result = \touch($filename, $time); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } @@ -1111,23 +1111,21 @@ function touch(string $filename, int $time = null, int $atime = null): void * Deletes filename. Similar to the Unix C unlink() * function. An E_WARNING level error will be generated on * failure. - * + * * @param string $filename Path to the file. - * @param resource $context + * @param resource $context * @throws FilesystemException - * + * */ function unlink(string $filename, $context = null): void { error_clear_last(); if ($context !== null) { $result = \unlink($filename, $context); - }else { + } else { $result = \unlink($filename); } - if ($result === FALSE) { + if ($result === false) { throw FilesystemException::createFromPhpError(); } } - - diff --git a/generated/filter.php b/generated/filter.php index 5a567ef9..9f1d1b2e 100644 --- a/generated/filter.php +++ b/generated/filter.php @@ -5,22 +5,20 @@ use Safe\Exceptions\FilterException; /** - * - * + * + * * @param int $type One of INPUT_GET, INPUT_POST, * INPUT_COOKIE, INPUT_SERVER, or * INPUT_ENV. * @param string $variable_name Name of a variable to check. * @throws FilterException - * + * */ function filter_has_var(int $type, string $variable_name): void { error_clear_last(); $result = \filter_has_var($type, $variable_name); - if ($result === FALSE) { + if ($result === false) { throw FilterException::createFromPhpError(); } } - - diff --git a/generated/fpm.php b/generated/fpm.php index f1d92153..08b39410 100644 --- a/generated/fpm.php +++ b/generated/fpm.php @@ -8,17 +8,15 @@ * This function flushes all response data to the client and finishes the * request. This allows for time consuming tasks to be performed without * leaving the connection to the client open. - * + * * @throws FpmException - * + * */ function fastcgi_finish_request(): void { error_clear_last(); $result = \fastcgi_finish_request(); - if ($result === FALSE) { + if ($result === false) { throw FpmException::createFromPhpError(); } } - - diff --git a/generated/ftp.php b/generated/ftp.php index c539c0eb..be900c20 100644 --- a/generated/ftp.php +++ b/generated/ftp.php @@ -5,45 +5,45 @@ use Safe\Exceptions\FtpException; /** - * Sends an ALLO command to the remote FTP server to + * Sends an ALLO command to the remote FTP server to * allocate space for a file to be uploaded. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param int $filesize The number of bytes to allocate. - * @param string $result A textual representation of the servers response will be returned by + * @param string $result A textual representation of the servers response will be returned by * reference in result if a variable is provided. * @throws FtpException - * + * */ function ftp_alloc($ftp_stream, int $filesize, string &$result = null): void { error_clear_last(); if ($result !== null) { $result = \ftp_alloc($ftp_stream, $filesize, $result); - }else { + } else { $result = \ftp_alloc($ftp_stream, $filesize); } - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } /** - * - * - * @param resource $ftp - * @param string $remote_file - * @param string $local_file - * @param int $mode + * + * + * @param resource $ftp + * @param string $remote_file + * @param string $local_file + * @param int $mode * @throws FtpException - * + * */ function ftp_append($ftp, string $remote_file, string $local_file, int $mode = FTP_IMAGE): void { error_clear_last(); $result = \ftp_append($ftp, $remote_file, $local_file, $mode); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -51,16 +51,16 @@ function ftp_append($ftp, string $remote_file, string $local_file, int $mode = F /** * Changes to the parent directory. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @throws FtpException - * + * */ function ftp_cdup($ftp_stream): void { error_clear_last(); $result = \ftp_cdup($ftp_stream); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -68,38 +68,38 @@ function ftp_cdup($ftp_stream): void /** * Changes the current directory to the specified one. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $directory The target directory. * @throws FtpException - * + * */ function ftp_chdir($ftp_stream, string $directory): void { error_clear_last(); $result = \ftp_chdir($ftp_stream, $directory); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } /** - * Sets the permissions on the specified remote file to + * Sets the permissions on the specified remote file to * mode. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param int $mode The new permissions, given as an octal value. * @param string $filename The remote file. * @return int Returns the new file permissions on success . * @throws FtpException - * + * */ function ftp_chmod($ftp_stream, int $mode, string $filename): int { error_clear_last(); $result = \ftp_chmod($ftp_stream, $mode, $filename); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; @@ -109,16 +109,16 @@ function ftp_chmod($ftp_stream, int $mode, string $filename): int /** * ftp_close closes the given link identifier * and releases the resource. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @throws FtpException - * + * */ function ftp_close($ftp_stream): void { error_clear_last(); $result = \ftp_close($ftp_stream); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -127,8 +127,8 @@ function ftp_close($ftp_stream): void /** * ftp_connect opens an FTP connection to the * specified host. - * - * @param string $host The FTP server address. This parameter shouldn't have any trailing + * + * @param string $host The FTP server address. This parameter shouldn't have any trailing * slashes and shouldn't be prefixed with ftp://. * @param int $port This parameter specifies an alternate port to connect to. If it is * omitted or set to zero, then the default FTP port, 21, will be used. @@ -138,13 +138,13 @@ function ftp_close($ftp_stream): void * ftp_get_option. * @return resource Returns a FTP stream on success . * @throws FtpException - * + * */ function ftp_connect(string $host, int $port = 21, int $timeout = 90) { error_clear_last(); $result = \ftp_connect($host, $port, $timeout); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; @@ -154,17 +154,17 @@ function ftp_connect(string $host, int $port = 21, int $timeout = 90) /** * ftp_delete deletes the file specified by * path from the FTP server. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $path The file to delete. * @throws FtpException - * + * */ function ftp_delete($ftp_stream, string $path): void { error_clear_last(); $result = \ftp_delete($ftp_stream, $path); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -173,7 +173,7 @@ function ftp_delete($ftp_stream, string $path): void /** * ftp_fget retrieves remote_file * from the FTP server, and writes it to the given file pointer. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param resource $handle An open file pointer in which we store the data. * @param string $remote_file The remote file path. @@ -181,13 +181,13 @@ function ftp_delete($ftp_stream, string $path): void * FTP_BINARY. * @param int $resumepos The position in the remote file to start downloading from. * @throws FtpException - * + * */ function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_IMAGE, int $resumepos = 0): void { error_clear_last(); $result = \ftp_fget($ftp_stream, $handle, $remote_file, $mode, $resumepos); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -196,7 +196,7 @@ function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_IMA /** * ftp_fput uploads the data from a file pointer * to a remote file on the FTP server. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $remote_file The remote file path. * @param resource $handle An open file pointer on the local file. Reading stops at end of file. @@ -204,13 +204,13 @@ function ftp_fget($ftp_stream, $handle, string $remote_file, int $mode = FTP_IMA * FTP_BINARY. * @param int $startpos The position in the remote file to start uploading to. * @throws FtpException - * + * */ function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_IMAGE, int $startpos = 0): void { error_clear_last(); $result = \ftp_fput($ftp_stream, $remote_file, $handle, $mode, $startpos); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -219,7 +219,7 @@ function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_IMA /** * ftp_get retrieves a remote file from the FTP server, * and saves it into a local file. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $local_file The local file path (will be overwritten if the file already exists). * @param string $remote_file The remote file path. @@ -227,13 +227,13 @@ function ftp_fput($ftp_stream, string $remote_file, $handle, int $mode = FTP_IMA * FTP_BINARY. * @param int $resumepos The position in the remote file to start downloading from. * @throws FtpException - * + * */ function ftp_get($ftp_stream, string $local_file, string $remote_file, int $mode = FTP_BINARY, int $resumepos = 0): void { error_clear_last(); $result = \ftp_get($ftp_stream, $local_file, $remote_file, $mode, $resumepos); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -241,18 +241,18 @@ function ftp_get($ftp_stream, string $local_file, string $remote_file, int $mode /** * Logs in to the given FTP stream. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $username The username (USER). * @param string $password The password (PASS). * @throws FtpException - * + * */ function ftp_login($ftp_stream, string $username, string $password): void { error_clear_last(); $result = \ftp_login($ftp_stream, $username, $password); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -260,18 +260,18 @@ function ftp_login($ftp_stream, string $username, string $password): void /** * Creates the specified directory on the FTP server. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $directory The name of the directory that will be created. * @return string Returns the newly created directory name on success . * @throws FtpException - * + * */ function ftp_mkdir($ftp_stream, string $directory): string { error_clear_last(); $result = \ftp_mkdir($ftp_stream, $directory); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; @@ -279,19 +279,19 @@ function ftp_mkdir($ftp_stream, string $directory): string /** - * - * + * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $directory The directory to be listed. * @return array Returns an array of arrays with file infos from the specified directory on success . * @throws FtpException - * + * */ function ftp_mlsd($ftp_stream, string $directory): array { error_clear_last(); $result = \ftp_mlsd($ftp_stream, $directory); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; @@ -299,8 +299,8 @@ function ftp_mlsd($ftp_stream, string $directory): array /** - * - * + * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $directory The directory to be listed. This parameter can also include arguments, eg. * ftp_nlist($conn_id, "-la /your/dir"); @@ -308,13 +308,13 @@ function ftp_mlsd($ftp_stream, string $directory): array * filenames containing spaces and other characters. * @return array Returns an array of filenames from the specified directory on success . * @throws FtpException - * + * */ function ftp_nlist($ftp_stream, string $directory): array { error_clear_last(); $result = \ftp_nlist($ftp_stream, $directory); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; @@ -326,20 +326,20 @@ function ftp_nlist($ftp_stream, string $directory): array * passive mode, data connections are initiated by the client, * rather than by the server. * It may be needed if the client is behind firewall. - * + * * Please note that ftp_pasv can only be called after a * successful login or otherwise it will fail. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param bool $pasv If TRUE, the passive mode is turned on, else it's turned off. * @throws FtpException - * + * */ function ftp_pasv($ftp_stream, bool $pasv): void { error_clear_last(); $result = \ftp_pasv($ftp_stream, $pasv); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -347,7 +347,7 @@ function ftp_pasv($ftp_stream, bool $pasv): void /** * ftp_put stores a local file on the FTP server. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $remote_file The remote file path. * @param string $local_file The local file path. @@ -355,31 +355,31 @@ function ftp_pasv($ftp_stream, bool $pasv): void * FTP_BINARY. * @param int $startpos The position in the remote file to start uploading to. * @throws FtpException - * + * */ function ftp_put($ftp_stream, string $remote_file, string $local_file, int $mode = FTP_IMAGE, int $startpos = 0): void { error_clear_last(); $result = \ftp_put($ftp_stream, $remote_file, $local_file, $mode, $startpos); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } /** - * - * + * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @return string Returns the current directory name . * @throws FtpException - * + * */ function ftp_pwd($ftp_stream): string { error_clear_last(); $result = \ftp_pwd($ftp_stream); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; @@ -389,18 +389,18 @@ function ftp_pwd($ftp_stream): string /** * ftp_rename renames a file or a directory on the FTP * server. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $oldname The old file/directory name. * @param string $newname The new name. * @throws FtpException - * + * */ function ftp_rename($ftp_stream, string $oldname, string $newname): void { error_clear_last(); $result = \ftp_rename($ftp_stream, $oldname, $newname); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -408,42 +408,42 @@ function ftp_rename($ftp_stream, string $oldname, string $newname): void /** * Removes the specified directory on the FTP server. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $directory The directory to delete. This must be either an absolute or relative * path to an empty directory. * @throws FtpException - * + * */ function ftp_rmdir($ftp_stream, string $directory): void { error_clear_last(); $result = \ftp_rmdir($ftp_stream, $directory); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } /** - * ftp_site sends the given SITE + * ftp_site sends the given SITE * command to the FTP server. - * + * * SITE commands are not standardized, and vary from server - * to server. They are useful for handling such things as file permissions and + * to server. They are useful for handling such things as file permissions and * group membership. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @param string $command The SITE command. Note that this parameter isn't escaped so there may * be some issues with filenames containing spaces and other characters. * @throws FtpException - * + * */ function ftp_site($ftp_stream, string $command): void { error_clear_last(); $result = \ftp_site($ftp_stream, $command); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } } @@ -457,8 +457,8 @@ function ftp_site($ftp_stream, string $command): void * ftp_login is called, the client will send the * appropriate AUTH FTP command, so ftp_login will fail in * the mentioned cases. - * - * @param string $host The FTP server address. This parameter shouldn't have any trailing + * + * @param string $host The FTP server address. This parameter shouldn't have any trailing * slashes and shouldn't be prefixed with ftp://. * @param int $port This parameter specifies an alternate port to connect to. If it is * omitted or set to zero, then the default FTP port, 21, will be used. @@ -468,13 +468,13 @@ function ftp_site($ftp_stream, string $command): void * ftp_get_option. * @return resource Returns a SSL-FTP stream on success . * @throws FtpException - * + * */ function ftp_ssl_connect(string $host, int $port = 21, int $timeout = 90) { error_clear_last(); $result = \ftp_ssl_connect($host, $port, $timeout); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; @@ -483,20 +483,18 @@ function ftp_ssl_connect(string $host, int $port = 21, int $timeout = 90) /** * Returns the system type identifier of the remote FTP server. - * + * * @param resource $ftp_stream The link identifier of the FTP connection. * @return string Returns the remote system type, . * @throws FtpException - * + * */ function ftp_systype($ftp_stream): string { error_clear_last(); $result = \ftp_systype($ftp_stream); - if ($result === FALSE) { + if ($result === false) { throw FtpException::createFromPhpError(); } return $result; } - - diff --git a/generated/funchand.php b/generated/funchand.php index fe74960b..a6379920 100644 --- a/generated/funchand.php +++ b/generated/funchand.php @@ -7,18 +7,18 @@ /** * Creates an anonymous function from the parameters passed, and * returns a unique name for it. - * + * * @param string $args The function arguments. * @param string $code The function code. * @return string Returns a unique function name as a string, . * @throws FunchandException - * + * */ function create_function(string $args, string $code): string { error_clear_last(); $result = \create_function($args, $code); - if ($result === FALSE) { + if ($result === false) { throw FunchandException::createFromPhpError(); } return $result; @@ -27,22 +27,22 @@ function create_function(string $args, string $code): string /** * Gets the specified argument from a user-defined function's argument list. - * - * This function may be used in conjunction with + * + * This function may be used in conjunction with * func_get_args and func_num_args * to allow user-defined functions to accept variable-length argument lists. - * + * * @param int $arg_num The argument offset. Function arguments are counted starting from * zero. * @return mixed Returns the specified argument, . * @throws FunchandException - * + * */ function func_get_arg(int $arg_num) { error_clear_last(); $result = \func_get_arg($arg_num); - if ($result === FALSE) { + if ($result === false) { throw FunchandException::createFromPhpError(); } return $result; @@ -50,28 +50,26 @@ function func_get_arg(int $arg_num) /** - * - * + * + * * @param callable $function The function name as a string, or an array consisting of an object and * a method. - * @param mixed $arg - * @param mixed $params + * @param mixed $arg + * @param mixed $params * @throws FunchandException - * + * */ -function register_tick_function(callable $function, $arg = null, ...$params): void +function register_tick_function(callable $function, $arg = null, ...$params): void { error_clear_last(); if ($params !== null) { $result = \register_tick_function($function, $arg, $params); } elseif ($arg !== null) { $result = \register_tick_function($function, $arg); - }else { + } else { $result = \register_tick_function($function); } - if ($result === FALSE) { + if ($result === false) { throw FunchandException::createFromPhpError(); } } - - diff --git a/generated/gmp.php b/generated/gmp.php index 1e19a057..9bfe2ba9 100644 --- a/generated/gmp.php +++ b/generated/gmp.php @@ -6,19 +6,19 @@ /** * Export a GMP number to a binary string - * + * * @param GMP|string|int $gmpnumber The GMP number being exported * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter. * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. * @return string Returns a string . * @throws GmpException - * + * */ function gmp_export(GMP $gmpnumber, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): string { error_clear_last(); $result = \gmp_export($gmpnumber, $word_size, $options); - if ($result === FALSE) { + if ($result === false) { throw GmpException::createFromPhpError(); } return $result; @@ -27,19 +27,19 @@ function gmp_export(GMP $gmpnumber, int $word_size = 1, int $options = GMP_MSW_F /** * Import a GMP number from a binary string - * + * * @param string $data The binary string being imported * @param int $word_size Default value is 1. The number of bytes in each chunk of binary data. This is mainly used in conjunction with the options parameter. * @param int $options Default value is GMP_MSW_FIRST | GMP_NATIVE_ENDIAN. * @return GMP Returns a GMP number . * @throws GmpException - * + * */ function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIRST | GMP_NATIVE_ENDIAN): GMP { error_clear_last(); $result = \gmp_import($data, $word_size, $options); - if ($result === FALSE) { + if ($result === false) { throw GmpException::createFromPhpError(); } return $result; @@ -47,24 +47,22 @@ function gmp_import(string $data, int $word_size = 1, int $options = GMP_MSW_FIR /** - * - * + * + * * @param GMP|string|int $seed The seed to be set for the gmp_random, * gmp_random_bits, and * gmp_random_range functions. - * + * * Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. * @return GMP Returns NULL on success . * @throws GmpException - * + * */ function gmp_random_seed($seed): void { error_clear_last(); $result = \gmp_random_seed($seed); - if ($result === FALSE) { + if ($result === false) { throw GmpException::createFromPhpError(); } } - - diff --git a/generated/gnupg.php b/generated/gnupg.php index b9efebe9..cf4c81c6 100644 --- a/generated/gnupg.php +++ b/generated/gnupg.php @@ -5,117 +5,117 @@ use Safe\Exceptions\GnupgException; /** - * - * + * + * * @param resource $identifier The gnupg identifier, from a call to * gnupg_init or gnupg. * @param string $fingerprint The fingerprint key. * @param string $passphrase The pass phrase. * @throws GnupgException - * + * */ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphrase): void { error_clear_last(); $result = \gnupg_adddecryptkey($identifier, $fingerprint, $passphrase); - if ($result === FALSE) { + if ($result === false) { throw GnupgException::createFromPhpError(); } } /** - * - * + * + * * @param resource $identifier The gnupg identifier, from a call to * gnupg_init or gnupg. * @param string $fingerprint The fingerprint key. * @throws GnupgException - * + * */ function gnupg_addencryptkey($identifier, string $fingerprint): void { error_clear_last(); $result = \gnupg_addencryptkey($identifier, $fingerprint); - if ($result === FALSE) { + if ($result === false) { throw GnupgException::createFromPhpError(); } } /** - * - * + * + * * @param resource $identifier The gnupg identifier, from a call to * gnupg_init or gnupg. * @param string $fingerprint The fingerprint key. * @param string $passphrase The pass phrase. * @throws GnupgException - * + * */ function gnupg_addsignkey($identifier, string $fingerprint, string $passphrase = null): void { error_clear_last(); if ($passphrase !== null) { $result = \gnupg_addsignkey($identifier, $fingerprint, $passphrase); - }else { + } else { $result = \gnupg_addsignkey($identifier, $fingerprint); } - if ($result === FALSE) { + if ($result === false) { throw GnupgException::createFromPhpError(); } } /** - * - * + * + * * @param resource $identifier The gnupg identifier, from a call to * gnupg_init or gnupg. * @throws GnupgException - * + * */ function gnupg_cleardecryptkeys($identifier): void { error_clear_last(); $result = \gnupg_cleardecryptkeys($identifier); - if ($result === FALSE) { + if ($result === false) { throw GnupgException::createFromPhpError(); } } /** - * - * + * + * * @param resource $identifier The gnupg identifier, from a call to * gnupg_init or gnupg. * @throws GnupgException - * + * */ function gnupg_clearencryptkeys($identifier): void { error_clear_last(); $result = \gnupg_clearencryptkeys($identifier); - if ($result === FALSE) { + if ($result === false) { throw GnupgException::createFromPhpError(); } } /** - * - * + * + * * @param resource $identifier The gnupg identifier, from a call to * gnupg_init or gnupg. * @throws GnupgException - * + * */ function gnupg_clearsignkeys($identifier): void { error_clear_last(); $result = \gnupg_clearsignkeys($identifier); - if ($result === FALSE) { + if ($result === false) { throw GnupgException::createFromPhpError(); } } @@ -123,22 +123,20 @@ function gnupg_clearsignkeys($identifier): void /** * Toggle the armored output. - * + * * @param resource $identifier The gnupg identifier, from a call to * gnupg_init or gnupg. * @param int $armor Pass a non-zero integer-value to this function to enable armored-output * (default). * Pass 0 to disable armored output. * @throws GnupgException - * + * */ function gnupg_setarmor($identifier, int $armor): void { error_clear_last(); $result = \gnupg_setarmor($identifier, $armor); - if ($result === FALSE) { + if ($result === false) { throw GnupgException::createFromPhpError(); } } - - diff --git a/generated/hash.php b/generated/hash.php index 8b089037..f67ad168 100644 --- a/generated/hash.php +++ b/generated/hash.php @@ -5,21 +5,19 @@ use Safe\Exceptions\HashException; /** - * - * + * + * * @param HashContext $hcontext Hashing context returned by hash_init. * @param string $filename URL describing location of file to be hashed; Supports fopen wrappers. * @param HashContext|null $scontext Stream context as returned by stream_context_create. * @throws HashException - * + * */ function hash_update_file(HashContext $hcontext, string $filename, $scontext = null): void { error_clear_last(); $result = \hash_update_file($hcontext, $filename, $scontext); - if ($result === FALSE) { + if ($result === false) { throw HashException::createFromPhpError(); } } - - diff --git a/generated/ibase.php b/generated/ibase.php index a44a0df8..b3a05b28 100644 --- a/generated/ibase.php +++ b/generated/ibase.php @@ -5,8 +5,8 @@ use Safe\Exceptions\IbaseException; /** - * - * + * + * * @param resource $service_handle The handle on the database server service. * @param string $user_name The login name of the new database user. * @param string $password The password of the new user. @@ -14,7 +14,7 @@ * @param string $middle_name The middle name of the new database user. * @param string $last_name The last name of the new database user. * @throws IbaseException - * + * */ function ibase_add_user($service_handle, string $user_name, string $password, string $first_name = null, string $middle_name = null, string $last_name = null): void { @@ -25,10 +25,10 @@ function ibase_add_user($service_handle, string $user_name, string $password, st $result = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name); } elseif ($first_name !== null) { $result = \ibase_add_user($service_handle, $user_name, $password, $first_name); - }else { + } else { $result = \ibase_add_user($service_handle, $user_name, $password); } - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -37,16 +37,16 @@ function ibase_add_user($service_handle, string $user_name, string $password, st /** * This function will discard a BLOB if it has not yet been closed by * ibase_blob_close. - * + * * @param resource $blob_handle A BLOB handle opened with ibase_blob_create. * @throws IbaseException - * + * */ function ibase_blob_cancel($blob_handle): void { error_clear_last(); $result = \ibase_blob_cancel($blob_handle); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -55,19 +55,19 @@ function ibase_blob_cancel($blob_handle): void /** * ibase_blob_create creates a new BLOB for filling with * data. - * + * * @param resource $link_identifier An InterBase link identifier. If omitted, the last opened link is * assumed. * @return resource Returns a BLOB handle for later use with * ibase_blob_add . * @throws IbaseException - * + * */ function ibase_blob_create($link_identifier = null) { error_clear_last(); $result = \ibase_blob_create($link_identifier); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } return $result; @@ -79,18 +79,18 @@ function ibase_blob_create($link_identifier = null) * a connection id returned from ibase_connect. * Default transaction on link is committed, other transactions are * rolled back. - * + * * @param resource $connection_id An InterBase link identifier returned from * ibase_connect. If omitted, the last opened link * is assumed. * @throws IbaseException - * + * */ function ibase_close($connection_id = null): void { error_clear_last(); $result = \ibase_close($connection_id); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -98,7 +98,7 @@ function ibase_close($connection_id = null): void /** * Commits a transaction without closing it. - * + * * @param resource $link_or_trans_identifier If called without an argument, this function commits the default * transaction of the default link. If the argument is a connection * identifier, the default transaction of the corresponding connection @@ -107,13 +107,13 @@ function ibase_close($connection_id = null): void * will be retained, so statements executed from within this transaction * will not be invalidated. * @throws IbaseException - * + * */ function ibase_commit_ret($link_or_trans_identifier = null): void { error_clear_last(); $result = \ibase_commit_ret($link_or_trans_identifier); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -121,20 +121,20 @@ function ibase_commit_ret($link_or_trans_identifier = null): void /** * Commits a transaction. - * + * * @param resource $link_or_trans_identifier If called without an argument, this function commits the default * transaction of the default link. If the argument is a connection * identifier, the default transaction of the corresponding connection * will be committed. If the argument is a transaction identifier, the * corresponding transaction will be committed. * @throws IbaseException - * + * */ function ibase_commit($link_or_trans_identifier = null): void { error_clear_last(); $result = \ibase_commit($link_or_trans_identifier); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -142,13 +142,13 @@ function ibase_commit($link_or_trans_identifier = null): void /** * Establishes a connection to an Firebird/InterBase server. - * + * * In case a second call is made to ibase_connect with * the same arguments, no new link will be established, but instead, the link * identifier of the already opened link will be returned. The link to the * server will be closed as soon as the execution of the script ends, unless * it's closed earlier by explicitly calling ibase_close. - * + * * @param string $database The database argument has to be a valid path to * database file on the server it resides on. If the server is not local, * it must be prefixed with either 'hostname:' (TCP/IP), 'hostname/port:' @@ -168,10 +168,10 @@ function ibase_commit($link_or_trans_identifier = null): void * statement executed within a connection, and it defaults to the highest * one supported by client libraries. * @param string $role Functional only with InterBase 5 and up. - * @param int $sync + * @param int $sync * @return resource Returns an Firebird/InterBase link identifier on success, . * @throws IbaseException - * + * */ function ibase_connect(string $database = null, string $username = null, string $password = null, string $charset = null, int $buffers = null, int $dialect = null, string $role = null, int $sync = null) { @@ -192,10 +192,10 @@ function ibase_connect(string $database = null, string $username = null, string $result = \ibase_connect($database, $username); } elseif ($database !== null) { $result = \ibase_connect($database); - }else { + } else { $result = \ibase_connect(); } - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } return $result; @@ -203,18 +203,18 @@ function ibase_connect(string $database = null, string $username = null, string /** - * - * + * + * * @param resource $service_handle The handle on the database server service. * @param string $user_name The login name of the user you want to delete from the database. * @throws IbaseException - * + * */ function ibase_delete_user($service_handle, string $user_name): void { error_clear_last(); $result = \ibase_delete_user($service_handle, $user_name); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -223,17 +223,17 @@ function ibase_delete_user($service_handle, string $user_name): void /** * This functions drops a database that was opened by either ibase_connect * or ibase_pconnect. The database is closed and deleted from the server. - * + * * @param resource $connection An InterBase link identifier. If omitted, the last opened link is * assumed. * @throws IbaseException - * + * */ function ibase_drop_db($connection = null): void { error_clear_last(); $result = \ibase_drop_db($connection); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -243,17 +243,17 @@ function ibase_drop_db($connection = null): void * This function causes the registered event handler specified by * event to be cancelled. The callback function will * no longer be called for the events it was registered to handle. - * + * * @param resource $event An event resource, created by * ibase_set_event_handler. * @throws IbaseException - * + * */ function ibase_free_event_handler($event): void { error_clear_last(); $result = \ibase_free_event_handler($event); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -261,16 +261,16 @@ function ibase_free_event_handler($event): void /** * Frees a prepared query. - * + * * @param resource $query A query prepared with ibase_prepare. * @throws IbaseException - * + * */ function ibase_free_query($query): void { error_clear_last(); $result = \ibase_free_query($query); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -278,45 +278,45 @@ function ibase_free_query($query): void /** * Frees a result set. - * + * * @param resource $result_identifier A result set created by ibase_query or * ibase_execute. * @throws IbaseException - * + * */ function ibase_free_result($result_identifier): void { error_clear_last(); $result = \ibase_free_result($result_identifier); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } /** - * - * - * @param resource $service_handle - * @param string $db - * @param int $action - * @param int $argument + * + * + * @param resource $service_handle + * @param string $db + * @param int $action + * @param int $argument * @throws IbaseException - * + * */ function ibase_maintain_db($service_handle, string $db, int $action, int $argument = 0): void { error_clear_last(); $result = \ibase_maintain_db($service_handle, $db, $action, $argument); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } /** - * - * + * + * * @param resource $service_handle The handle on the database server service. * @param string $user_name The login name of the database user to modify. * @param string $password The user's new password. @@ -324,7 +324,7 @@ function ibase_maintain_db($service_handle, string $db, int $action, int $argume * @param string $middle_name The user's new middle name. * @param string $last_name The user's new last name. * @throws IbaseException - * + * */ function ibase_modify_user($service_handle, string $user_name, string $password, string $first_name = null, string $middle_name = null, string $last_name = null): void { @@ -335,10 +335,10 @@ function ibase_modify_user($service_handle, string $user_name, string $password, $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name); } elseif ($first_name !== null) { $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name); - }else { + } else { $result = \ibase_modify_user($service_handle, $user_name, $password); } - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -347,17 +347,17 @@ function ibase_modify_user($service_handle, string $user_name, string $password, /** * This function assigns a name to a result set. This name can be used later in * UPDATE|DELETE ... WHERE CURRENT OF name statements. - * + * * @param resource $result An InterBase result set. * @param string $name The name to be assigned. * @throws IbaseException - * + * */ function ibase_name_result($result, string $name): void { error_clear_last(); $result = \ibase_name_result($result, $name); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -365,20 +365,20 @@ function ibase_name_result($result, string $name): void /** * Opens a persistent connection to an InterBase database. - * + * * ibase_pconnect acts very much like * ibase_connect with two major differences. - * + * * First, when connecting, the function will first try to find a (persistent) * link that's already opened with the same parameters. If one is found, an * identifier for it will be returned instead of opening a new connection. - * + * * Second, the connection to the InterBase server will not be closed when the * execution of the script ends. Instead, the link will remain open for * future use (ibase_close will not close links * established by ibase_pconnect). This type of link is * therefore called 'persistent'. - * + * * @param string $database The database argument has to be a valid path to * database file on the server it resides on. If the server is not local, * it must be prefixed with either 'hostname:' (TCP/IP), '//hostname/' @@ -398,10 +398,10 @@ function ibase_name_result($result, string $name): void * one supported by client libraries. Functional only with InterBase 6 * and up. * @param string $role Functional only with InterBase 5 and up. - * @param int $sync + * @param int $sync * @return resource Returns an InterBase link identifier on success, . * @throws IbaseException - * + * */ function ibase_pconnect(string $database = null, string $username = null, string $password = null, string $charset = null, int $buffers = null, int $dialect = null, string $role = null, int $sync = null) { @@ -422,10 +422,10 @@ function ibase_pconnect(string $database = null, string $username = null, string $result = \ibase_pconnect($database, $username); } elseif ($database !== null) { $result = \ibase_pconnect($database); - }else { + } else { $result = \ibase_pconnect(); } - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } return $result; @@ -434,7 +434,7 @@ function ibase_pconnect(string $database = null, string $username = null, string /** * Rolls back a transaction without closing it. - * + * * @param resource $link_or_trans_identifier If called without an argument, this function rolls back the default * transaction of the default link. If the argument is a connection * identifier, the default transaction of the corresponding connection @@ -443,13 +443,13 @@ function ibase_pconnect(string $database = null, string $username = null, string * will be retained, so statements executed from within this transaction * will not be invalidated. * @throws IbaseException - * + * */ function ibase_rollback_ret($link_or_trans_identifier = null): void { error_clear_last(); $result = \ibase_rollback_ret($link_or_trans_identifier); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } @@ -457,39 +457,37 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void /** * Rolls back a transaction. - * + * * @param resource $link_or_trans_identifier If called without an argument, this function rolls back the default * transaction of the default link. If the argument is a connection * identifier, the default transaction of the corresponding connection * will be rolled back. If the argument is a transaction identifier, the * corresponding transaction will be rolled back. * @throws IbaseException - * + * */ function ibase_rollback($link_or_trans_identifier = null): void { error_clear_last(); $result = \ibase_rollback($link_or_trans_identifier); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } /** - * - * - * @param resource $service_handle + * + * + * @param resource $service_handle * @throws IbaseException - * + * */ function ibase_service_detach($service_handle): void { error_clear_last(); $result = \ibase_service_detach($service_handle); - if ($result === FALSE) { + if ($result === false) { throw IbaseException::createFromPhpError(); } } - - diff --git a/generated/ibmDb2.php b/generated/ibmDb2.php index b6a25cc4..3c522b32 100644 --- a/generated/ibmDb2.php +++ b/generated/ibmDb2.php @@ -6,55 +6,55 @@ /** * Sets or gets the AUTOCOMMIT behavior of the specified connection resource. - * + * * @param resource $connection A valid database connection resource variable as returned from * db2_connect or db2_pconnect. - * @param bool $value One of the following constants: - * - * + * @param bool $value One of the following constants: + * + * * DB2_AUTOCOMMIT_OFF - * - * + * + * * Turns AUTOCOMMIT off. - * - * - * - * + * + * + * + * * DB2_AUTOCOMMIT_ON - * - * + * + * * Turns AUTOCOMMIT on. - * - * - * - * - * + * + * + * + * + * * Turns AUTOCOMMIT off. - * + * * Turns AUTOCOMMIT on. * @return mixed When db2_autocommit receives only the * connection parameter, it returns the current state * of AUTOCOMMIT for the requested connection as an integer value. A value of * 0 indicates that AUTOCOMMIT is off, while a value of 1 indicates that * AUTOCOMMIT is on. - * + * * When db2_autocommit receives both the * connection parameter and * autocommit parameter, it attempts to set the * AUTOCOMMIT state of the requested connection to the corresponding state. * Returns TRUE on success . * @throws IbmDb2Exception - * + * */ function db2_autocommit($connection, bool $value = null) { error_clear_last(); if ($value !== null) { $result = \db2_autocommit($connection, $value); - }else { + } else { $result = \db2_autocommit($connection); } - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } return $result; @@ -67,7 +67,7 @@ function db2_autocommit($connection, bool $value = null) * control over the parameter type, data type, precision, and scale for the * parameter than simply passing the variable as part of the optional input * array to db2_execute. - * + * * @param resource $stmt A prepared statement returned from db2_prepare. * @param int $parameter_number Specifies the 1-indexed position of the parameter in the prepared * statement. @@ -86,15 +86,15 @@ function db2_autocommit($connection, bool $value = null) * DB2_CHAR, DB2_DOUBLE, or * DB2_LONG . * @param int $precision Specifies the precision with which the variable should be bound to the - * database. This parameter can also be used for retrieving XML output values - * from stored procedures. A non-negative value specifies the maximum size of - * the XML data that will be retrieved from the database. If this parameter - * is not used, a default of 1MB will be assumed for retrieving the XML + * database. This parameter can also be used for retrieving XML output values + * from stored procedures. A non-negative value specifies the maximum size of + * the XML data that will be retrieved from the database. If this parameter + * is not used, a default of 1MB will be assumed for retrieving the XML * output value from the stored procedure. * @param int $scale Specifies the scale with which the variable should be bound to the * database. * @throws IbmDb2Exception - * + * */ function db2_bind_param($stmt, int $parameter_number, string $variable_name, int $parameter_type = null, int $data_type = 0, int $precision = -1, int $scale = 0): void { @@ -107,10 +107,10 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, int $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type); } elseif ($parameter_type !== null) { $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type); - }else { + } else { $result = \db2_bind_param($stmt, $parameter_number, $variable_name); } - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -120,20 +120,20 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, int * This function closes a DB2 client connection created with * db2_connect and returns the corresponding * resources to the database server. - * + * * If you attempt to close a persistent DB2 client connection created with * db2_pconnect, the close request is ignored and the * persistent DB2 client connection remains available for the next caller. - * + * * @param resource $connection Specifies an active DB2 client connection. * @throws IbmDb2Exception - * + * */ function db2_close($connection): void { error_clear_last(); $result = \db2_close($connection); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -144,17 +144,17 @@ function db2_close($connection): void * begins a new transaction. PHP applications normally default to AUTOCOMMIT * mode, so db2_commit is not necessary unless AUTOCOMMIT * has been turned off for the connection resource. - * + * * @param resource $connection A valid database connection resource variable as returned from * db2_connect or db2_pconnect. * @throws IbmDb2Exception - * + * */ function db2_commit($connection): void { error_clear_last(); $result = \db2_commit($connection); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -163,7 +163,7 @@ function db2_commit($connection): void /** * db2_execute executes an SQL statement that was * prepared by db2_prepare. - * + * * If the SQL statement returns a result set, for example, a SELECT statement * or a CALL to a stored procedure that returns one or more result sets, you * can retrieve a row as an array from the stmt resource @@ -173,26 +173,26 @@ function db2_commit($connection): void * db2_fetch_row to move the result set pointer to the * next row and fetch a column at a time from that row with * db2_result. - * + * * Refer to db2_prepare for a brief discussion of the * advantages of using db2_prepare and * 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 * in the prepared statement. * @throws IbmDb2Exception - * + * */ function db2_execute($stmt, array $parameters = null): void { error_clear_last(); if ($parameters !== null) { $result = \db2_execute($stmt, $parameters); - }else { + } else { $result = \db2_execute($stmt); } - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -203,16 +203,16 @@ function db2_execute($stmt, array $parameters = null): void * set. These resources are freed implicitly when a script finishes, but you * can call db2_free_result to explicitly free the result * set resources before the end of the script. - * + * * @param resource $stmt A valid statement resource. * @throws IbmDb2Exception - * + * */ function db2_free_result($stmt): void { error_clear_last(); $result = \db2_free_result($stmt); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -223,177 +223,177 @@ function db2_free_result($stmt): void * resource. These resources are freed implicitly when a script finishes, but * you can call db2_free_stmt to explicitly free the * statement resources before the end of the script. - * + * * @param resource $stmt A valid statement resource. * @throws IbmDb2Exception - * + * */ function db2_free_stmt($stmt): void { error_clear_last(); $result = \db2_free_stmt($stmt); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } /** - * Retrieves the value of a specified option value for a statement resource + * Retrieves the value of a specified option value for a statement resource * or a connection resource. - * + * * @param resource $resource A valid statement resource as returned from * db2_prepare or a valid connection resource as * returned from db2_connect or * db2_pconnect. - * @param string $option A valid statement or connection options. The following new options are available - * as of ibm_db2 version 1.6.0. They provide useful tracking information + * @param string $option A valid statement or connection options. The following new options are available + * as of ibm_db2 version 1.6.0. They provide useful tracking information * that can be set during execution with db2_get_option. - * - * + * + * * Prior versions of ibm_db2 do not support these new options. - * - * - * When the value in each option is being set, some servers might not handle + * + * + * When the value in each option is being set, some servers might not handle * the entire length provided and might truncate the value. - * - * - * To ensure that the data specified in each option is converted correctly - * when transmitted to a host system, use only the characters A through Z, + * + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, * 0 through 9, and the underscore (_) or period (.). - * - * - * - * + * + * + * + * * userid - * - * - * SQL_ATTR_INFO_USERID - A pointer to a null-terminated - * character string used to identify the client user ID sent to the host + * + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host * database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. - * This user-id is not to be confused with the authentication user-id, it is for + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for * identification purposes only and is not used for any authorization. - * - * - * - * - * - * + * + * + * + * + * + * * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the + * + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * + * + * + * + * + * + * * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the + * + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * + * + * + * + * + * + * * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the + * + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * Prior versions of ibm_db2 do not support these new options. - * - * When the value in each option is being set, some servers might not handle + * + * When the value in each option is being set, some servers might not handle * the entire length provided and might truncate the value. - * - * To ensure that the data specified in each option is converted correctly - * when transmitted to a host system, use only the characters A through Z, + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, * 0 through 9, and the underscore (_) or period (.). - * - * SQL_ATTR_INFO_USERID - A pointer to a null-terminated - * character string used to identify the client user ID sent to the host + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host * database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. - * This user-id is not to be confused with the authentication user-id, it is for + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for * identification purposes only and is not used for any authorization. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. - * This user-id is not to be confused with the authentication user-id, it is for + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for * identification purposes only and is not used for any authorization. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * + * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * + * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * + * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * @return string Returns the current setting of the connection attribute provided on success + * @return string Returns the current setting of the connection attribute provided on success * . * @throws IbmDb2Exception - * + * */ function db2_get_option($resource, string $option): string { error_clear_last(); $result = \db2_get_option($resource, $option); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } return $result; @@ -401,32 +401,32 @@ function db2_get_option($resource, string $option): string /** - * This function closes a DB2 client connection created with - * db2_pconnect and returns the corresponding resources - * to the database server. - * - * - * This function is only available on i5/OS in response to i5/OS system + * This function closes a DB2 client connection created with + * db2_pconnect and returns the corresponding resources + * to the database server. + * + * + * This function is only available on i5/OS in response to i5/OS system * administration requests. - * - * - * - * If you have a persistent DB2 client connection created with - * db2_pconnect, you may use this function to close the - * connection. To avoid substantial connection performance penalties, this - * function should only be used in rare cases when the persistent connection - * has become unresponsive or the persistent connection will not be needed for + * + * + * + * If you have a persistent DB2 client connection created with + * db2_pconnect, you may use this function to close the + * connection. To avoid substantial connection performance penalties, this + * function should only be used in rare cases when the persistent connection + * has become unresponsive or the persistent connection will not be needed for * a long period of time. - * + * * @param resource $resource Specifies an active DB2 client connection. * @throws IbmDb2Exception - * + * */ function db2_pclose($resource): void { error_clear_last(); $result = \db2_pclose($resource); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -437,17 +437,17 @@ function db2_pclose($resource): void * begins a new transaction. PHP applications normally default to AUTOCOMMIT * mode, so db2_rollback normally has no effect unless * AUTOCOMMIT has been turned off for the connection resource. - * + * * @param resource $connection A valid database connection resource variable as returned from * db2_connect or db2_pconnect. * @throws IbmDb2Exception - * + * */ function db2_rollback($connection): void { error_clear_last(); $result = \db2_rollback($connection); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -456,7 +456,7 @@ function db2_rollback($connection): void /** * Sets options for a statement resource or a connection resource. You * cannot set options for result set resources. - * + * * @param resource $resource A valid statement resource as returned from * db2_prepare or a valid connection resource as * returned from db2_connect or @@ -466,377 +466,375 @@ function db2_rollback($connection): void * cursor types (scrollable or forward), and to specify the case of * the column names (lower, upper, or natural) that will appear in a * result set. - * - * + * + * * autocommit - * - * + * + * * Passing DB2_AUTOCOMMIT_ON turns * autocommit on for the specified connection resource. - * - * + * + * * Passing DB2_AUTOCOMMIT_OFF turns * autocommit off for the specified connection resource. - * - * - * - * + * + * + * + * * cursor - * - * + * + * * Passing DB2_FORWARD_ONLY specifies a * forward-only cursor for a statement resource. This is the * default cursor type, and is supported by all database * servers. - * - * + * + * * Passing DB2_SCROLLABLE specifies a * scrollable cursor for a statement resource. Scrollable * cursors enable result set rows to be accessed in * non-sequential order, but are only supported by * IBM DB2 Universal Database databases. - * - * - * - * + * + * + * + * * binmode - * - * + * + * * Passing DB2_BINARY specifies that * binary data will be returned as is. This is the default * mode. This is the equivalent of setting * ibm_db2.binmode=1 in php.ini. - * - * + * + * * Passing DB2_CONVERT specifies that * binary data will be converted to hexadecimal encoding, * and will be returned as such. This is the equivalent of * setting ibm_db2.binmode=2 in php.ini. - * - * + * + * * Passing DB2_PASSTHRU specifies that * binary data will be converted to NULL. This is the * equivalent of setting ibm_db2.binmode=3 * in php.ini. - * - * - * - * + * + * + * + * * db2_attr_case - * - * + * + * * Passing DB2_CASE_LOWER specifies that * column names of the result set are returned in lower case. - * - * + * + * * Passing DB2_CASE_UPPER specifies that * column names of the result set are returned in upper case. - * - * + * + * * Passing DB2_CASE_NATURAL specifies that * column names of the result set are returned in natural * case. - * - * - * - * + * + * + * + * * deferred_prepare - * - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred + * + * + * Passing DB2_DEFERRED_PREPARE_ON turns deferred * prepare on for the specified statement resource. - * - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred + * + * + * Passing DB2_DEFERRED_PREPARE_OFF turns deferred * prepare off for the specified statement resource. - * - * - * - * - * + * + * + * + * + * * Passing DB2_AUTOCOMMIT_ON turns * autocommit on for the specified connection resource. - * + * * Passing DB2_AUTOCOMMIT_OFF turns * autocommit off for the specified connection resource. - * + * * Passing DB2_FORWARD_ONLY specifies a * forward-only cursor for a statement resource. This is the * default cursor type, and is supported by all database * servers. - * + * * Passing DB2_SCROLLABLE specifies a * scrollable cursor for a statement resource. Scrollable * cursors enable result set rows to be accessed in * non-sequential order, but are only supported by * IBM DB2 Universal Database databases. - * + * * Passing DB2_BINARY specifies that * binary data will be returned as is. This is the default * mode. This is the equivalent of setting * ibm_db2.binmode=1 in php.ini. - * + * * Passing DB2_CONVERT specifies that * binary data will be converted to hexadecimal encoding, * and will be returned as such. This is the equivalent of * setting ibm_db2.binmode=2 in php.ini. - * + * * Passing DB2_PASSTHRU specifies that * binary data will be converted to NULL. This is the * equivalent of setting ibm_db2.binmode=3 * in php.ini. - * + * * Passing DB2_CASE_LOWER specifies that * column names of the result set are returned in lower case. - * + * * Passing DB2_CASE_UPPER specifies that * column names of the result set are returned in upper case. - * + * * Passing DB2_CASE_NATURAL specifies that * column names of the result set are returned in natural * case. - * - * Passing DB2_DEFERRED_PREPARE_ON turns deferred + * + * Passing DB2_DEFERRED_PREPARE_ON turns deferred * prepare on for the specified statement resource. - * - * Passing DB2_DEFERRED_PREPARE_OFF turns deferred + * + * Passing DB2_DEFERRED_PREPARE_OFF turns deferred * prepare off for the specified statement resource. - * - * The following new i5/OS options are available in ibm_db2 version 1.5.1 + * + * The following new i5/OS options are available in ibm_db2 version 1.5.1 * and later. These options apply only when running PHP and ibm_db2 natively on i5 systems. - * - * + * + * * i5_fetch_only - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY + * + * + * DB2_I5_FETCH_ON - Cursors are read-only + * and cannot be used for positioned updates or deletes. This + * is the default unless SQL_ATTR_FOR_FETCH_ONLY * environment has been set to SQL_FALSE. - * - * - * DB2_I5_FETCH_OFF - Cursors can be used + * + * + * DB2_I5_FETCH_OFF - Cursors can be used * for positioned updates and deletes. - * - * - * - * - * - * DB2_I5_FETCH_ON - Cursors are read-only - * and cannot be used for positioned updates or deletes. This - * is the default unless SQL_ATTR_FOR_FETCH_ONLY + * + * + * + * + * + * DB2_I5_FETCH_ON - Cursors are read-only + * and cannot be used for positioned updates or deletes. This + * is the default unless SQL_ATTR_FOR_FETCH_ONLY * environment has been set to SQL_FALSE. - * - * DB2_I5_FETCH_OFF - Cursors can be used + * + * DB2_I5_FETCH_OFF - Cursors can be used * for positioned updates and deletes. - * + * * The following new option is available in ibm_db2 version 1.8.0 and later. - * - * + * + * * rowcount - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected + * + * + * DB2_ROWCOUNT_PREFETCH_ON - Client can request + * the full row count prior to fetching, which means that + * db2_num_rows returns the number of rows selected * even when a ROLLFORWARD_ONLY cursor is used. - * - * + * + * * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request * the full row count prior to fetching. - * - * - * - * - * - * DB2_ROWCOUNT_PREFETCH_ON - Client can request - * the full row count prior to fetching, which means that - * db2_num_rows returns the number of rows selected + * + * + * + * + * + * DB2_ROWCOUNT_PREFETCH_ON - Client can request + * the full row count prior to fetching, which means that + * db2_num_rows returns the number of rows selected * even when a ROLLFORWARD_ONLY cursor is used. - * + * * DB2_ROWCOUNT_PREFETCH_OFF - Client cannot request * the full row count prior to fetching. - * + * * The following new options are available in ibm_db2 version 1.7.0 and later. - * - * + * + * * trusted_user - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can + * + * + * To switch the user to a trusted user, pass the User ID (String) + * of the trusted user as the value of this key. This option can * be set on a connection resource only. To use this option, trusted * context must be enabled on the connection resource. - * - * - * - * + * + * + * + * * trusted_password - * - * + * + * * The password (String) that corresponds to the user specified * by the trusted_user key. - * - * - * - * - * - * To switch the user to a trusted user, pass the User ID (String) - * of the trusted user as the value of this key. This option can + * + * + * + * + * + * To switch the user to a trusted user, pass the User ID (String) + * of the trusted user as the value of this key. This option can * be set on a connection resource only. To use this option, trusted * context must be enabled on the connection resource. - * + * * The password (String) that corresponds to the user specified * by the trusted_user key. - * - * The following new options are available in ibm_db2 version 1.6.0 and later. - * These options provide useful tracking information that can be accessed during + * + * The following new options are available in ibm_db2 version 1.6.0 and later. + * These options provide useful tracking information that can be accessed during * execution with db2_get_option. - * - * - * When the value in each option is being set, some servers might not handle + * + * + * When the value in each option is being set, some servers might not handle * the entire length provided and might truncate the value. - * - * - * To ensure that the data specified in each option is converted correctly - * when transmitted to a host system, use only the characters A through Z, + * + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, * 0 through 9, and the underscore (_) or period (.). - * - * - * - * + * + * + * + * * userid - * - * - * SQL_ATTR_INFO_USERID - A pointer to a null-terminated - * character string used to identify the client user ID sent to the host + * + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host * database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. - * This user-id is not to be confused with the authentication user-id, it is for + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for * identification purposes only and is not used for any authorization. - * - * - * - * - * - * + * + * + * + * + * + * * acctstr - * - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the + * + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * - * - * - * + * + * + * + * + * + * * applname - * - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the + * + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * - * - * - * + * + * + * + * + * + * * wrkstnname - * - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the + * + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * - * - * - * - * - * When the value in each option is being set, some servers might not handle + * + * + * + * + * + * + * + * When the value in each option is being set, some servers might not handle * the entire length provided and might truncate the value. - * - * To ensure that the data specified in each option is converted correctly - * when transmitted to a host system, use only the characters A through Z, + * + * To ensure that the data specified in each option is converted correctly + * when transmitted to a host system, use only the characters A through Z, * 0 through 9, and the underscore (_) or period (.). - * - * SQL_ATTR_INFO_USERID - A pointer to a null-terminated - * character string used to identify the client user ID sent to the host + * + * SQL_ATTR_INFO_USERID - A pointer to a null-terminated + * character string used to identify the client user ID sent to the host * database server when using DB2 Connect. - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. - * This user-id is not to be confused with the authentication user-id, it is for + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for * identification purposes only and is not used for any authorization. - * - * - * - * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. - * This user-id is not to be confused with the authentication user-id, it is for + * + * + * + * DB2 for z/OS and OS/390 servers support up to a length of 16 characters. + * This user-id is not to be confused with the authentication user-id, it is for * identification purposes only and is not used for any authorization. - * - * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated - * character string used to identify the client accounting string sent to the + * + * SQL_ATTR_INFO_ACCTSTR - A pointer to a null-terminated + * character string used to identify the client accounting string sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * - * + * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 200 characters. - * - * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated - * character string used to identify the client application name sent to the + * + * SQL_ATTR_INFO_APPLNAME - A pointer to a null-terminated + * character string used to identify the client application name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * - * + * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 32 characters. - * - * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated - * character string used to identify the client workstation name sent to the + * + * SQL_ATTR_INFO_WRKSTNNAME - A pointer to a null-terminated + * character string used to identify the client workstation name sent to the * host database server when using DB2 Connect. - * - * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. - * - * - * + * + * + * * DB2 for z/OS and OS/390 servers support up to a length of 18 characters. * @param int $type Passing DB2_AUTOCOMMIT_ON turns * autocommit on for the specified connection resource. - * + * * Passing DB2_AUTOCOMMIT_OFF turns * autocommit off for the specified connection resource. * @throws IbmDb2Exception - * + * */ function db2_set_option($resource, array $options, int $type): void { error_clear_last(); $result = \db2_set_option($resource, $options, $type); - if ($result === FALSE) { + if ($result === false) { throw IbmDb2Exception::createFromPhpError(); } } - - diff --git a/generated/iconv.php b/generated/iconv.php index 1f5d1c6c..6cf97875 100644 --- a/generated/iconv.php +++ b/generated/iconv.php @@ -6,28 +6,28 @@ /** * Retrieve internal configuration variables of iconv extension. - * + * * @param string $type The value of the optional type can be: - * + * * all * input_encoding * output_encoding * internal_encoding - * + * * @return mixed Returns the current value of the internal configuration variable if * successful . - * + * * If type is omitted or set to "all", * iconv_get_encoding returns an array that * stores all these variables. * @throws IconvException - * + * */ function iconv_get_encoding(string $type = "all") { error_clear_last(); $result = \iconv_get_encoding($type); - if ($result === FALSE) { + if ($result === false) { throw IconvException::createFromPhpError(); } return $result; @@ -37,22 +37,22 @@ function iconv_get_encoding(string $type = "all") /** * Changes the value of the internal configuration variable specified by * type to charset. - * + * * @param string $type The value of type can be any one of these: - * + * * input_encoding * output_encoding * internal_encoding - * + * * @param string $charset The character set. * @throws IconvException - * + * */ function iconv_set_encoding(string $type, string $charset): void { error_clear_last(); $result = \iconv_set_encoding($type, $charset); - if ($result === FALSE) { + if ($result === false) { throw IconvException::createFromPhpError(); } } @@ -62,10 +62,10 @@ function iconv_set_encoding(string $type, string $charset): void * Performs a character set conversion on the string * str from in_charset * to out_charset. - * + * * @param string $in_charset The input charset. * @param string $out_charset The output charset. - * + * * If you append the string //TRANSLIT to * out_charset transliteration is activated. This * means that when a character can't be represented in the target charset, @@ -74,7 +74,7 @@ function iconv_set_encoding(string $type, string $charset): void * characters that cannot be represented in the target charset are silently * discarded. Otherwise, E_NOTICE is generated and the function * will return FALSE. - * + * * If and how //TRANSLIT works exactly depends on the * system's iconv() implementation (cf. ICONV_IMPL). * Some implementations are known to ignore //TRANSLIT, @@ -83,16 +83,14 @@ function iconv_set_encoding(string $type, string $charset): void * @param string $str The string to be converted. * @return string Returns the converted string . * @throws IconvException - * + * */ function iconv(string $in_charset, string $out_charset, string $str): string { error_clear_last(); $result = \iconv($in_charset, $out_charset, $str); - if ($result === FALSE) { + if ($result === false) { throw IconvException::createFromPhpError(); } return $result; } - - diff --git a/generated/image.php b/generated/image.php index c2d518bc..189f45c7 100644 --- a/generated/image.php +++ b/generated/image.php @@ -7,7 +7,7 @@ /** * image2wbmp outputs or save a WBMP * version of the given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param string|null $filename Path to the saved file. If not given, the raw image stream will be @@ -16,7 +16,7 @@ * identifier obtained from imagecolorallocate. * The default foreground color is black. * @throws ImageException - * + * */ function image2wbmp($image, string $filename = null, int $foreground = null): void { @@ -25,35 +25,35 @@ function image2wbmp($image, string $filename = null, int $foreground = null): vo $result = \image2wbmp($image, $filename, $foreground); } elseif ($filename !== null) { $result = \image2wbmp($image, $filename); - }else { + } else { $result = \image2wbmp($image); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } /** - * - * + * + * * @param resource $image An image resource, 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". * @return resource Return affined image resource on success . * @throws ImageException - * + * */ function imageaffine($image, array $affine, array $clip = null) { error_clear_last(); if ($clip !== null) { $result = \imageaffine($image, $affine, $clip); - }else { + } else { $result = \imageaffine($image, $affine); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -64,7 +64,7 @@ function imageaffine($image, array $affine, array $clip = null) * Returns the concatenation of two affine transformation matrices, * what is useful if multiple transformations should be applied to the same * image in one go. - * + * * @param array $m1 An affine transformation matrix (an array with keys * 0 to 5 and float values). * @param array $m2 An affine transformation matrix (an array with keys @@ -73,13 +73,13 @@ function imageaffine($image, array $affine, array $clip = null) * 0 to 5 and float values) * . * @throws ImageException - * + * */ function imageaffinematrixconcat(array $m1, array $m2): array { error_clear_last(); $result = \imageaffinematrixconcat($m1, $m2); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -88,13 +88,13 @@ function imageaffinematrixconcat(array $m1, array $m2): array /** * Returns an affine transformation matrix. - * + * * @param int $type One of the IMG_AFFINE_* constants. * @param array $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. - * + * * If type is IMG_AFFINE_ROTATE, * IMG_AFFINE_SHEAR_HORIZONTAL or IMG_AFFINE_SHEAR_VERTICAL, * options has to be a float specifying the angle. @@ -102,17 +102,17 @@ function imageaffinematrixconcat(array $m1, array $m2): array * 0 to 5 and float values) * . * @throws ImageException - * + * */ function imageaffinematrixget(int $type, $options = null): array { error_clear_last(); if ($options !== null) { $result = \imageaffinematrixget($type, $options); - }else { + } else { $result = \imageaffinematrixget($type); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -130,19 +130,19 @@ function imageaffinematrixget(int $type, $options = null): array * non-blending mode, the drawing color is copied literally with its alpha channel * information, replacing the destination pixel. Blending mode is not available * when drawing on palette images. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. - * @param bool $blendmode Whether to enable the blending mode or not. On true color images + * @param bool $blendmode Whether to enable the blending mode or not. On true color images * the default value is TRUE otherwise the default value is FALSE * @throws ImageException - * + * */ function imagealphablending($image, bool $blendmode): void { error_clear_last(); $result = \imagealphablending($image, $blendmode); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -152,25 +152,25 @@ function imagealphablending($image, bool $blendmode): void * Activate the fast drawing antialiased methods for lines and wired polygons. * It does not support alpha components. It works using a direct blend * operation. It works only with truecolor images. - * + * * Thickness and styled are not supported. - * + * * Using antialiased primitives with transparent background color can end with * some unexpected results. The blend method uses the background color as any * other colors. The lack of alpha component support does not allow an alpha * based antialiasing method. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param bool $enabled Whether to enable antialiasing or not. * @throws ImageException - * + * */ function imageantialias($image, bool $enabled): void { error_clear_last(); $result = \imageantialias($image, $enabled); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -179,7 +179,7 @@ function imageantialias($image, bool $enabled): void /** * imagearc draws an arc of circle centered at the given * coordinates. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $cx x-coordinate of the center. @@ -192,13 +192,13 @@ function imageantialias($image, bool $enabled): void * clockwise. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagearc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color): void { error_clear_last(); $result = \imagearc($image, $cx, $cy, $width, $height, $start, $end, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -206,22 +206,22 @@ function imagearc($image, int $cx, int $cy, int $width, int $height, int $start, /** * Outputs or saves a BMP version of the given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. - * + * * NULL is invalid if the compressed arguments is * not used. * @param bool $compressed Whether the BMP should be compressed with run-length encoding (RLE), or not. * @throws ImageException - * + * */ function imagebmp($image, $to = null, bool $compressed = true): void { error_clear_last(); $result = \imagebmp($image, $to, $compressed); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -233,7 +233,7 @@ function imagebmp($image, $to = null, bool $compressed = true): void * image with its upper-left at * x,y (top left is 0, * 0) with the color color. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $font Can be 1, 2, 3, 4, 5 for built-in @@ -244,13 +244,13 @@ function imagebmp($image, $to = null, bool $compressed = true): void * @param string $c The character to draw. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagechar($image, int $font, int $x, int $y, string $c, int $color): void { error_clear_last(); $result = \imagechar($image, $font, $x, $y, $c, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -259,7 +259,7 @@ function imagechar($image, int $font, int $x, int $y, string $c, int $color): vo /** * Draws the character c vertically at the specified * coordinate on the given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $font Can be 1, 2, 3, 4, 5 for built-in @@ -270,13 +270,13 @@ function imagechar($image, int $font, int $x, int $y, string $c, int $color): vo * @param string $c The character to draw. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagecharup($image, int $font, int $x, int $y, string $c, int $color): void { error_clear_last(); $result = \imagecharup($image, $font, $x, $y, $c, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -285,25 +285,25 @@ function imagecharup($image, int $font, int $x, int $y, string $c, int $color): /** * Returns the index of the color of the pixel at the * specified location in the image specified by image. - * + * * If the image is a * truecolor image, this function returns the RGB value of that pixel as * integer. Use bitshifting and masking to access the distinct red, green and blue * component values: - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x x-coordinate of the point. * @param int $y y-coordinate of the point. * @return int Returns the index of the color . * @throws ImageException - * + * */ function imagecolorat($image, int $x, int $y): int { error_clear_last(); $result = \imagecolorat($image, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -311,21 +311,21 @@ function imagecolorat($image, int $x, int $y): int /** - * De-allocates a color previously allocated with + * De-allocates a color previously allocated with * imagecolorallocate or * imagecolorallocatealpha. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $color The color identifier. * @throws ImageException - * + * */ function imagecolordeallocate($image, int $color): void { error_clear_last(); $result = \imagecolordeallocate($image, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -333,18 +333,18 @@ function imagecolordeallocate($image, int $color): void /** * Makes the colors of the palette version of an image more closely match the true color version. - * + * * @param resource $image1 A truecolor image link resource. * @param resource $image2 A palette image link resource pointing to an image that has the same * size as image1. * @throws ImageException - * + * */ function imagecolormatch($image1, $image2): void { error_clear_last(); $result = \imagecolormatch($image1, $image2); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -353,7 +353,7 @@ function imagecolormatch($image1, $image2): void /** * Applies a convolution matrix on the image, using the given coefficient and * offset. - * + * * @param resource $image An image resource, 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. @@ -361,13 +361,13 @@ function imagecolormatch($image1, $image2): void * @param float $offset Color offset. * @return resource Returns TRUE on success . * @throws ImageException - * + * */ function imageconvolution($image, array $matrix, float $div, float $offset): void { error_clear_last(); $result = \imageconvolution($image, $matrix, $div, $offset); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -381,7 +381,7 @@ function imageconvolution($image, array $matrix, float $div, float $offset): voi * src_h. The portion defined will be copied * onto the x,y coordinates, dst_x and * dst_y. - * + * * @param resource $dst_im Destination image link resource. * @param resource $src_im Source image link resource. * @param int $dst_x x-coordinate of destination point. @@ -391,13 +391,13 @@ function imageconvolution($image, array $matrix, float $div, float $offset): voi * @param int $src_w Source width. * @param int $src_h Source height. * @throws ImageException - * + * */ function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h): void { error_clear_last(); $result = \imagecopy($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -411,7 +411,7 @@ function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $sr * src_h. The portion defined will be copied * onto the x,y coordinates, dst_x and * dst_y. - * + * * @param resource $dst_im Destination image link resource. * @param resource $src_im Source image link resource. * @param int $dst_x x-coordinate of destination point. @@ -427,13 +427,13 @@ function imagecopy($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $sr * ignoring alpha components, while it implements alpha transparency * for true colour images. * @throws ImageException - * + * */ function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void { error_clear_last(); $result = \imagecopymerge($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -447,11 +447,11 @@ function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, in * src_h. The portion defined will be copied * onto the x,y coordinates, dst_x and * dst_y. - * + * * This function is identical to imagecopymerge except * that when merging it preserves the hue of the source by converting * the destination pixels to gray scale before the copy operation. - * + * * @param resource $dst_im Destination image link resource. * @param resource $src_im Source image link resource. * @param int $dst_x x-coordinate of destination point. @@ -460,20 +460,20 @@ function imagecopymerge($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, in * @param int $src_y y-coordinate of source point. * @param int $src_w Source width. * @param int $src_h Source height. - * @param int $pct The src_im will be changed to grayscale according - * to pct where 0 is fully grayscale and 100 is - * unchanged. When pct = 100 this function behaves + * @param int $pct The src_im will be changed to grayscale according + * to pct where 0 is fully grayscale and 100 is + * unchanged. When pct = 100 this function behaves * identically to imagecopy for pallete images, except for * ignoring alpha components, while * it implements alpha transparency for true colour images. * @throws ImageException - * + * */ function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_w, int $src_h, int $pct): void { error_clear_last(); $result = \imagecopymergegray($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -484,15 +484,15 @@ function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x * portion of one image to another image, smoothly interpolating pixel * values so that, in particular, reducing the size of an image still * retains a great deal of clarity. - * - * In other words, imagecopyresampled will take a - * rectangular area from src_image of width - * src_w and height src_h at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image + * + * In other words, imagecopyresampled will take a + * rectangular area from src_image of width + * src_w and height src_h at + * position (src_x,src_y) + * and place it in a rectangular area of dst_image * of width dst_w and height dst_h * at position (dst_x,dst_y). - * + * * If the source and destination coordinates and width and heights * differ, appropriate stretching or shrinking of the image fragment * will be performed. The coordinates refer to the upper left @@ -500,7 +500,7 @@ function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x * same image (if dst_image is the same as * src_image) but if the regions overlap the * results will be unpredictable. - * + * * @param resource $dst_image Destination image link resource. * @param resource $src_image Source image link resource. * @param int $dst_x x-coordinate of destination point. @@ -512,13 +512,13 @@ function imagecopymergegray($dst_im, $src_im, int $dst_x, int $dst_y, int $src_x * @param int $src_w Source width. * @param int $src_h Source height. * @throws ImageException - * + * */ function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void { error_clear_last(); $result = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -529,15 +529,15 @@ function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int * portion of one image to another image. * dst_image is the destination image, * src_image is the source image identifier. - * - * In other words, imagecopyresized will take a - * rectangular area from src_image of width - * src_w and height src_h at - * position (src_x,src_y) - * and place it in a rectangular area of dst_image + * + * In other words, imagecopyresized will take a + * rectangular area from src_image of width + * src_w and height src_h at + * position (src_x,src_y) + * and place it in a rectangular area of dst_image * of width dst_w and height dst_h * at position (dst_x,dst_y). - * + * * If the source and destination coordinates and width and heights * differ, appropriate stretching or shrinking of the image fragment * will be performed. The coordinates refer to the upper left @@ -545,7 +545,7 @@ function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int * same image (if dst_image is the same as * src_image) but if the regions overlap the * results will be unpredictable. - * + * * @param resource $dst_image Destination image link resource. * @param resource $src_image Source image link resource. * @param int $dst_x x-coordinate of destination point. @@ -557,13 +557,13 @@ function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int * @param int $src_w Source width. * @param int $src_h Source height. * @throws ImageException - * + * */ function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_w, int $dst_h, int $src_w, int $src_h): void { error_clear_last(); $result = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -572,7 +572,7 @@ function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $s /** * Crops an image to the given rectangular area and returns the resulting image. * The given image is not modified. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param array $rect The cropping rectangle as array with keys @@ -580,13 +580,13 @@ function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $s * height. * @return resource Return cropped image resource on success . * @throws ImageException - * + * */ function imagecrop($image, array $rect) { error_clear_last(); $result = \imagecrop($image, $rect); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -596,23 +596,23 @@ function imagecrop($image, array $rect) /** * Automatically crops an image according to the given * mode. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $mode One of the following constants: - * @param float $threshold - * @param int $color + * @param float $threshold + * @param int $color * @return resource Returns a cropped image resource on success . * If no cropping would occur, or the complete image would be cropped, that is * treated as failure, i.e. imagecrop returns FALSE. * @throws ImageException - * + * */ function imagecropauto($image, int $mode = -1, float $threshold = .5, int $color = -1) { error_clear_last(); $result = \imagecropauto($image, $mode, $threshold, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -623,7 +623,7 @@ function imagecropauto($image, int $mode = -1, float $threshold = .5, int $color * This function is deprecated. Use combination of * imagesetstyle and imageline * instead. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x1 Upper left x coordinate. @@ -632,13 +632,13 @@ function imagecropauto($image, int $mode = -1, float $threshold = .5, int $color * @param int $y2 Bottom right y coordinate. * @param int $color The fill color. A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagedashedline($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); $result = \imagedashedline($image, $x1, $y1, $x2, $y2, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -647,17 +647,17 @@ function imagedashedline($image, int $x1, int $y1, int $x2, int $y2, int $color) /** * imagedestroy frees any memory associated * with image image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @throws ImageException - * + * */ function imagedestroy($image): void { error_clear_last(); $result = \imagedestroy($image); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -665,7 +665,7 @@ function imagedestroy($image): void /** * Draws an ellipse centered at the specified coordinates. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $cx x-coordinate of the center. @@ -674,13 +674,13 @@ function imagedestroy($image): void * @param int $height The ellipse height. * @param int $color The color of the ellipse. A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imageellipse($image, int $cx, int $cy, int $width, int $height, int $color): void { error_clear_last(); $result = \imageellipse($image, $cx, $cy, $width, $height, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -690,20 +690,20 @@ function imageellipse($image, int $cx, int $cy, int $width, int $height, int $co * Performs a flood fill starting at the given coordinate (top left is 0, 0) * with the given color in the * image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x x-coordinate of start point. * @param int $y y-coordinate of start point. * @param int $color The fill color. A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagefill($image, int $x, int $y, int $color): void { error_clear_last(); $result = \imagefill($image, $x, $y, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -712,7 +712,7 @@ function imagefill($image, int $x, int $y, int $color): void /** * Draws a partial arc centered at the specified coordinate in the * given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $cx x-coordinate of the center. @@ -725,12 +725,12 @@ function imagefill($image, int $x, int $y, int $color): void * clockwise. * @param int $color A color identifier created with imagecolorallocate. * @param int $style A bitwise OR of the following possibilities: - * + * * IMG_ARC_PIE * IMG_ARC_CHORD * IMG_ARC_NOFILL * IMG_ARC_EDGED - * + * * IMG_ARC_PIE and IMG_ARC_CHORD are * mutually exclusive; IMG_ARC_CHORD just * connects the starting and ending angles with a straight line, while @@ -741,13 +741,13 @@ function imagefill($image, int $x, int $y, int $color): void * beginning and ending angles should be connected to the center - this is a * good way to outline (rather than fill) a 'pie slice'. * @throws ImageException - * + * */ function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color, int $style): void { error_clear_last(); $result = \imagefilledarc($image, $cx, $cy, $width, $height, $start, $end, $color, $style); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -756,7 +756,7 @@ function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $ /** * Draws an ellipse centered at the specified coordinate on the given * image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $cx x-coordinate of the center. @@ -765,13 +765,13 @@ function imagefilledarc($image, int $cx, int $cy, int $width, int $height, int $ * @param int $height The ellipse height. * @param int $color The fill color. A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagefilledellipse($image, int $cx, int $cy, int $width, int $height, int $color): void { error_clear_last(); $result = \imagefilledellipse($image, $cx, $cy, $width, $height, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -780,7 +780,7 @@ function imagefilledellipse($image, int $cx, int $cy, int $width, int $height, i /** * imagefilledpolygon creates a filled polygon * in the given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param array $points An array containing the x and y @@ -788,13 +788,13 @@ function imagefilledellipse($image, int $cx, int $cy, int $width, int $height, i * @param int $num_points Total number of vertices, which must be at least 3. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagefilledpolygon($image, array $points, int $num_points, int $color): void { error_clear_last(); $result = \imagefilledpolygon($image, $points, $num_points, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -804,7 +804,7 @@ function imagefilledpolygon($image, array $points, int $num_points, int $color): * Creates a rectangle filled with color in the given * image starting at point 1 and ending at point 2. * 0, 0 is the top left corner of the image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x1 x-coordinate for point 1. @@ -813,13 +813,13 @@ function imagefilledpolygon($image, array $points, int $num_points, int $color): * @param int $y2 y-coordinate for point 2. * @param int $color The fill color. A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); $result = \imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -831,7 +831,7 @@ function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $c * The starting point for the fill is x, * y (top left is 0, 0) and the region is * filled with color color. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x x-coordinate of start. @@ -839,13 +839,13 @@ function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $c * @param int $border The border color. A color identifier created with imagecolorallocate. * @param int $color The fill color. A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagefilltoborder($image, int $x, int $y, int $border, int $color): void { error_clear_last(); $result = \imagefilltoborder($image, $x, $y, $border, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -854,42 +854,42 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi /** * imagefilter applies the given filter * filtertype on the image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $filtertype filtertype can be one of the following: - * - * - * + * + * + * * IMG_FILTER_NEGATE: Reverses all colors of * the image. - * - * - * - * + * + * + * + * * IMG_FILTER_GRAYSCALE: Converts the image into * grayscale by changing the red, green and blue components to their * weighted sum using the same coefficients as the REC.601 luma (Y') * calculation. The alpha components are retained. For palette images the * result may differ due to palette limitations. - * - * - * - * + * + * + * + * * IMG_FILTER_BRIGHTNESS: Changes the brightness * of the image. Use arg1 to set the level of * brightness. The range for the brightness is -255 to 255. - * - * - * - * + * + * + * + * * IMG_FILTER_CONTRAST: Changes the contrast of * the image. Use arg1 to set the level of * contrast. - * - * - * - * + * + * + * + * * IMG_FILTER_COLORIZE: Like * IMG_FILTER_GRAYSCALE, except you can specify the * color. Use arg1, arg2 and @@ -897,108 +897,108 @@ function imagefilltoborder($image, int $x, int $y, int $border, int $color): voi * red, green, * blue and arg4 for the * alpha channel. The range for each color is 0 to 255. - * - * - * - * + * + * + * + * * IMG_FILTER_EDGEDETECT: Uses edge detection to * highlight the edges in the image. - * - * - * - * + * + * + * + * * IMG_FILTER_EMBOSS: Embosses the image. - * - * - * - * + * + * + * + * * IMG_FILTER_GAUSSIAN_BLUR: Blurs the image using * the Gaussian method. - * - * - * - * + * + * + * + * * IMG_FILTER_SELECTIVE_BLUR: Blurs the image. - * - * - * - * + * + * + * + * * IMG_FILTER_MEAN_REMOVAL: Uses mean removal to * achieve a "sketchy" effect. - * - * - * - * + * + * + * + * * IMG_FILTER_SMOOTH: Makes the image smoother. * Use arg1 to set the level of smoothness. - * - * - * - * - * IMG_FILTER_PIXELATE: Applies pixelation effect - * to the image, use arg1 to set the block size + * + * + * + * + * IMG_FILTER_PIXELATE: Applies pixelation effect + * to the image, use arg1 to set the block size * and arg2 to set the pixelation effect mode. - * - * - * - * @param int $arg1 - * - * + * + * + * + * @param int $arg1 + * + * * IMG_FILTER_BRIGHTNESS: Brightness level. - * - * - * - * + * + * + * + * * IMG_FILTER_CONTRAST: Contrast level. - * - * - * - * + * + * + * + * * IMG_FILTER_COLORIZE: Value of red component. - * - * - * - * + * + * + * + * * IMG_FILTER_SMOOTH: Smoothness level. - * - * - * - * + * + * + * + * * IMG_FILTER_PIXELATE: Block size in pixels. - * - * - * - * @param int $arg2 - * - * + * + * + * + * @param int $arg2 + * + * * IMG_FILTER_COLORIZE: Value of green component. - * - * - * - * - * IMG_FILTER_PIXELATE: Whether to use advanced pixelation + * + * + * + * + * IMG_FILTER_PIXELATE: Whether to use advanced pixelation * effect or not (defaults to FALSE). - * - * - * - * @param int $arg3 - * - * + * + * + * + * @param int $arg3 + * + * * IMG_FILTER_COLORIZE: Value of blue component. - * - * - * - * @param int $arg4 - * - * - * IMG_FILTER_COLORIZE: Alpha channel, A value - * between 0 and 127. 0 indicates completely opaque while 127 indicates + * + * + * + * @param int $arg4 + * + * + * IMG_FILTER_COLORIZE: Alpha channel, A value + * between 0 and 127. 0 indicates completely opaque while 127 indicates * completely transparent. - * - * - * + * + * + * * @throws ImageException - * + * */ function imagefilter($image, int $filtertype, int $arg1 = null, int $arg2 = null, int $arg3 = null, int $arg4 = null): void { @@ -1011,10 +1011,10 @@ function imagefilter($image, int $filtertype, int $arg1 = null, int $arg2 = null $result = \imagefilter($image, $filtertype, $arg1, $arg2); } elseif ($arg1 !== null) { $result = \imagefilter($image, $filtertype, $arg1); - }else { + } else { $result = \imagefilter($image, $filtertype); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1023,70 +1023,70 @@ function imagefilter($image, int $filtertype, int $arg1 = null, int $arg2 = null /** * Flips the image image using the given * mode. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $mode Flip mode, this can be one of the IMG_FLIP_* constants: - * - * - * - * - * + * + * + * + * + * * Constant * Meaning - * - * - * - * + * + * + * + * * IMG_FLIP_HORIZONTAL - * + * * Flips the image horizontally. - * - * - * + * + * + * * IMG_FLIP_VERTICAL - * + * * Flips the image vertically. - * - * - * + * + * + * * IMG_FLIP_BOTH - * + * * Flips the image both horizontally and vertically. - * - * - * - * - * + * + * + * + * + * * @throws ImageException - * + * */ function imageflip($image, int $mode): void { error_clear_last(); $result = \imageflip($image, $mode); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } /** - * Applies gamma correction to the given gd image + * Applies gamma correction to the given gd image * given an input and an output gamma. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param float $inputgamma The input gamma. * @param float $outputgamma The output gamma. * @throws ImageException - * + * */ function imagegammacorrect($image, float $inputgamma, float $outputgamma): void { error_clear_last(); $result = \imagegammacorrect($image, $inputgamma, $outputgamma); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1094,18 +1094,18 @@ function imagegammacorrect($image, float $inputgamma, float $outputgamma): void /** * Outputs a GD image to the given to. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. * @throws ImageException - * + * */ -function imagegd($image, $to = NULL): void +function imagegd($image, $to = null): void { error_clear_last(); $result = \imagegd($image, $to); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1113,22 +1113,22 @@ function imagegd($image, $to = NULL): void /** * Outputs a GD2 image to the given to. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. * @param int $chunk_size Chunk size. - * @param int $type Either IMG_GD2_RAW or - * IMG_GD2_COMPRESSED. Default is + * @param int $type Either IMG_GD2_RAW or + * IMG_GD2_COMPRESSED. Default is * IMG_GD2_RAW. * @throws ImageException - * + * */ -function imagegd2($image, $to = NULL, int $chunk_size = 128, int $type = IMG_GD2_RAW): void +function imagegd2($image, $to = null, int $chunk_size = 128, int $type = IMG_GD2_RAW): void { error_clear_last(); $result = \imagegd2($image, $to, $chunk_size, $type); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1140,27 +1140,27 @@ function imagegd2($image, $to = NULL, int $chunk_size = 128, int $type = IMG_GD2 * image argument is the return from the * imagecreate or imagecreatefrom* * function. - * + * * The image format will be GIF87a unless the * image has been made transparent with * imagecolortransparent, in which case the * image format will be GIF89a. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. * @throws ImageException - * + * */ function imagegif($image, $to = null): void { error_clear_last(); if ($to !== null) { $result = \imagegif($image, $to); - }else { + } else { $result = \imagegif($image); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1169,18 +1169,18 @@ function imagegif($image, $to = null): void /** * imagejpeg creates a JPEG file from * the given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. - * - * To skip this argument in order to provide the + * + * To skip this argument in order to provide the * quality parameter, use NULL. * @param int $quality quality is optional, and ranges from 0 (worst - * quality, smaller file) to 100 (best quality, biggest file). The + * quality, smaller file) to 100 (best quality, biggest file). The * default is the default IJG quality value (about 75). * @throws ImageException - * + * */ function imagejpeg($image, $to = null, int $quality = null): void { @@ -1189,10 +1189,10 @@ function imagejpeg($image, $to = null, int $quality = null): void $result = \imagejpeg($image, $to, $quality); } elseif ($to !== null) { $result = \imagejpeg($image, $to); - }else { + } else { $result = \imagejpeg($image); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1200,64 +1200,64 @@ function imagejpeg($image, $to = null, int $quality = null): void /** * Set the alpha blending flag to use layering effects. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $effect One of the following constants: - * - * + * + * * IMG_EFFECT_REPLACE - * - * + * + * * Use pixel replacement (equivalent of passing TRUE to * imagealphablending) - * - * - * - * + * + * + * + * * IMG_EFFECT_ALPHABLEND - * - * + * + * * Use normal pixel blending (equivalent of passing FALSE to * imagealphablending) - * - * - * - * + * + * + * + * * IMG_EFFECT_NORMAL - * - * + * + * * Same as IMG_EFFECT_ALPHABLEND. - * - * - * - * + * + * + * + * * IMG_EFFECT_OVERLAY - * - * + * + * * Overlay has the effect that black background pixels will remain * black, white background pixels will remain white, but grey * background pixels will take the colour of the foreground pixel. - * - * - * - * + * + * + * + * * IMG_EFFECT_MULTIPLY - * - * + * + * * Overlays with a multiply effect. - * - * - * - * + * + * + * + * * @throws ImageException - * + * */ function imagelayereffect($image, int $effect): void { error_clear_last(); $result = \imagelayereffect($image, $effect); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1265,7 +1265,7 @@ function imagelayereffect($image, int $effect): void /** * Draws a line between the two given points. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x1 x-coordinate for first point. @@ -1274,13 +1274,13 @@ function imagelayereffect($image, int $effect): void * @param int $y2 y-coordinate for second point. * @param int $color The line color. A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); $result = \imageline($image, $x1, $y1, $x2, $y2, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1289,65 +1289,65 @@ function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void /** * imageloadfont loads a user-defined bitmap and returns * its identifier. - * + * * @param string $file The font file format is currently binary and architecture * dependent. This means you should generate the font files on the * same type of CPU as the machine you are running PHP on. - * - * + * + * * Font file format - * - * - * + * + * + * * byte position * C data type * description - * - * - * - * + * + * + * + * * byte 0-3 * int * number of characters in the font - * - * + * + * * byte 4-7 * int - * + * * value of first character in the font (often 32 for space) - * - * - * + * + * + * * byte 8-11 * int * pixel width of each character - * - * + * + * * byte 12-15 * int * pixel height of each character - * - * + * + * * byte 16- * char - * + * * array with character data, one byte per pixel in each * character, for a total of (nchars*width*height) bytes. - * - * - * - * - * + * + * + * + * + * * @return int The font identifier which is always bigger than 5 to avoid conflicts with * built-in fonts s. * @throws ImageException - * + * */ function imageloadfont(string $file): int { error_clear_last(); $result = \imageloadfont($file); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -1358,66 +1358,66 @@ function imageloadfont(string $file): int * imageopenpolygon draws an open polygon on the given * image. Contrary to imagepolygon, * no line is drawn between the last and the first point. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param array $points An array containing the polygon's vertices, e.g.: - * - * - * - * + * + * + * + * * points[0] * = x0 - * - * + * + * * points[1] * = y0 - * - * + * + * * points[2] * = x1 - * - * + * + * * points[3] * = y1 - * - * - * - * + * + * + * + * * @param int $num_points Total number of points (vertices). * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imageopenpolygon($image, array $points, int $num_points, int $color): void { error_clear_last(); $result = \imageopenpolygon($image, $points, $num_points, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } /** - * Outputs or saves a PNG image from the given + * Outputs or saves a PNG image from the given * image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. - * + * * NULL is invalid if the quality and * filters arguments are not used. * @param int $quality Compression level: from 0 (no compression) to 9. The current default is 6. * For more information see the zlib manual. * @param int $filters Allows reducing the PNG file size. It is a bitmask field which may be - * set to any combination of the PNG_FILTER_XXX - * constants. PNG_NO_FILTER or + * set to any combination of the PNG_FILTER_XXX + * constants. PNG_NO_FILTER or * PNG_ALL_FILTERS may also be used to respectively * disable or activate all filters. * @throws ImageException - * + * */ function imagepng($image, $to = null, int $quality = null, int $filters = null): void { @@ -1428,10 +1428,10 @@ function imagepng($image, $to = null, int $quality = null, int $filters = null): $result = \imagepng($image, $to, $quality); } elseif ($to !== null) { $result = \imagepng($image, $to); - }else { + } else { $result = \imagepng($image); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1440,72 +1440,72 @@ function imagepng($image, $to = null, int $quality = null, int $filters = null): /** * imagepolygon creates a polygon in the given * image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param array $points An array containing the polygon's vertices, e.g.: - * - * - * - * + * + * + * + * * points[0] * = x0 - * - * + * + * * points[1] * = y0 - * - * + * + * * points[2] * = x1 - * - * + * + * * points[3] * = y1 - * - * - * - * + * + * + * + * * @param int $num_points Total number of points (vertices). * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagepolygon($image, array $points, int $num_points, int $color): void { error_clear_last(); $result = \imagepolygon($image, $points, $num_points, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } /** - * Loads a character encoding vector from a file and changes the fonts + * Loads a character encoding vector from a file and changes the fonts * encoding vector to it. As a PostScript fonts default vector lacks most of * the character positions above 127, you'll definitely want to change this * if you use a language other than English. - * + * * If you find yourself using this function all the time, a much * better way to define the encoding is to set ps.default_encoding in * the configuration file * to point to the right encoding file and all fonts you load will * automatically have the right encoding. - * + * * @param resource $font_index A font resource, returned by imagepsloadfont. - * @param string $encodingfile The exact format of this file is described in T1libs documentation. - * T1lib comes with two ready-to-use files, - * IsoLatin1.enc and + * @param string $encodingfile The exact format of this file is described in T1libs documentation. + * T1lib comes with two ready-to-use files, + * IsoLatin1.enc and * IsoLatin2.enc. * @throws ImageException - * + * */ function imagepsencodefont($font_index, string $encodingfile): void { error_clear_last(); $result = \imagepsencodefont($font_index, $encodingfile); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1515,17 +1515,17 @@ function imagepsencodefont($font_index, string $encodingfile): void * Extend or condense a font (font_index), if * the value of the extend parameter is less * than one you will be condensing the font. - * + * * @param resource $font_index A font resource, returned by imagepsloadfont. * @param float $extend Extension value, must be greater than 0. * @throws ImageException - * + * */ function imagepsextendfont($font_index, float $extend): void { error_clear_last(); $result = \imagepsextendfont($font_index, $extend); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1534,16 +1534,16 @@ function imagepsextendfont($font_index, float $extend): void /** * imagepsfreefont frees memory used by a PostScript * Type 1 font. - * + * * @param resource $font_index A font resource, returned by imagepsloadfont. * @throws ImageException - * + * */ function imagepsfreefont($font_index): void { error_clear_last(); $result = \imagepsfreefont($font_index); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1551,17 +1551,17 @@ function imagepsfreefont($font_index): void /** * Slant a given font. - * + * * @param resource $font_index A font resource, returned by imagepsloadfont. * @param float $slant Slant level. * @throws ImageException - * + * */ function imagepsslantfont($font_index, float $slant): void { error_clear_last(); $result = \imagepsslantfont($font_index, $slant); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1570,7 +1570,7 @@ function imagepsslantfont($font_index, float $slant): void /** * imagerectangle creates a rectangle starting at * the specified coordinates. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x1 Upper left x coordinate. @@ -1580,13 +1580,13 @@ function imagepsslantfont($font_index, float $slant): void * @param int $y2 Bottom right y coordinate. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); $result = \imagerectangle($image, $x1, $y1, $x2, $y2, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1599,12 +1599,12 @@ function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): * res_x is given, the horizontal and vertical resolution * are set to this value. If both optional parameters are given, the horizontal * and vertical resolution are set to these values, respectively. - * + * * The resolution is only used as meta information when images are read from and * written to formats supporting this kind of information (curently PNG and * JPEG). It does not affect any drawing operations. The default resolution * for new images is 96 DPI. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $res_x The horizontal resolution in DPI. @@ -1615,7 +1615,7 @@ function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): * it returns an indexed array of the horizontal and vertical resolution on * success, . * @throws ImageException - * + * */ function imageresolution($image, int $res_x = null, int $res_y = null) { @@ -1624,10 +1624,10 @@ function imageresolution($image, int $res_x = null, int $res_y = null) $result = \imageresolution($image, $res_x, $res_y); } elseif ($res_x !== null) { $result = \imageresolution($image, $res_x); - }else { + } else { $result = \imageresolution($image); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -1637,10 +1637,10 @@ function imageresolution($image, int $res_x = null, int $res_y = null) /** * Rotates the image image using the given * angle in degrees. - * + * * The center of rotation is the center of the image, and the rotated * image may have different dimensions than the original image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param float $angle Rotation angle, in degrees. The rotation angle is interpreted as the @@ -1649,13 +1649,13 @@ function imageresolution($image, int $res_x = null, int $res_y = null) * @param int $ignore_transparent If set and non-zero, transparent colors are ignored (otherwise kept). * @return resource Returns an image resource for the rotated image, . * @throws ImageException - * + * */ function imagerotate($image, float $angle, int $bgd_color, int $ignore_transparent = 0) { error_clear_last(); $result = \imagerotate($image, $angle, $bgd_color, $ignore_transparent); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -1666,25 +1666,25 @@ function imagerotate($image, float $angle, int $bgd_color, int $ignore_transpare * imagesavealpha sets the flag to attempt to save * full alpha channel information (as opposed to single-color transparency) * when saving PNG images. - * + * * You have to unset alphablending * (imagealphablending($im, false)), to use it. - * + * * Alpha channel is not supported by all browsers, if you have problem with * your browser, try to load your script with an alpha channel compliant * browser, e.g. latest Mozilla. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param bool $saveflag Whether to save the alpha channel or not. Default to FALSE. * @throws ImageException - * + * */ function imagesavealpha($image, bool $saveflag): void { error_clear_last(); $result = \imagesavealpha($image, $saveflag); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1693,13 +1693,13 @@ function imagesavealpha($image, bool $saveflag): void /** * imagescale scales an image using the given * interpolation algorithm. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $new_width The width to scale the image to. * @param int $new_height The height to scale the image to. If omitted or negative, the aspect * ratio will be preserved. - * + * * You should always provide the height if using PHP 5.5.18 or earlier, or * PHP 5.6.2 or earlier, as the aspect ratio calculation was incorrect. * @param int $mode One of IMG_NEAREST_NEIGHBOUR, @@ -1707,20 +1707,20 @@ function imagesavealpha($image, bool $saveflag): void * IMG_BICUBIC, * IMG_BICUBIC_FIXED or anything else (will use two * pass). - * - * + * + * * IMG_WEIGHTED4 is not yet supported. - * - * + * + * * @return resource Return the scaled image resource on success . * @throws ImageException - * + * */ function imagescale($image, int $new_width, int $new_height = -1, int $mode = IMG_BILINEAR_FIXED) { error_clear_last(); $result = \imagescale($image, $new_width, $new_height, $mode); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -1733,18 +1733,18 @@ function imagescale($image, int $new_width, int $new_height = -1, int $mode = IM * and imagepolygon) when drawing with the special * colors IMG_COLOR_BRUSHED or * IMG_COLOR_STYLEDBRUSHED. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param resource $brush An image resource. * @throws ImageException - * + * */ function imagesetbrush($image, $brush): void { error_clear_last(); $result = \imagesetbrush($image, $brush); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1753,7 +1753,7 @@ function imagesetbrush($image, $brush): void /** * imagesetclip sets the current clipping rectangle, i.e. * the area beyond which no pixels will be drawn. - * + * * @param resource $im An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x1 The x-coordinate of the upper left corner. @@ -1761,140 +1761,140 @@ function imagesetbrush($image, $brush): void * @param int $x2 The x-coordinate of the lower right corner. * @param int $y2 The y-coordinate of the lower right corner. * @throws ImageException - * + * */ function imagesetclip($im, int $x1, int $y1, int $x2, int $y2): void { error_clear_last(); $result = \imagesetclip($im, $x1, $y1, $x2, $y2); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } /** - * Sets the interpolation method, setting an interpolation method affects the rendering + * Sets the interpolation method, setting an interpolation method affects the rendering * of various functions in GD, such as the imagerotate function. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $method The interpolation method, which can be one of the following: - * - * - * + * + * + * * IMG_BELL: Bell filter. - * - * - * - * + * + * + * + * * IMG_BESSEL: Bessel filter. - * - * - * - * + * + * + * + * * IMG_BICUBIC: Bicubic interpolation. - * - * - * - * + * + * + * + * * IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation. - * - * - * - * + * + * + * + * * IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation (default (also on image creation)). - * - * - * - * + * + * + * + * * IMG_BLACKMAN: Blackman window function. - * - * - * - * + * + * + * + * * IMG_BOX: Box blur filter. - * - * - * - * + * + * + * + * * IMG_BSPLINE: Spline interpolation. - * - * - * - * + * + * + * + * * IMG_CATMULLROM: Cubic Hermite spline interpolation. - * - * - * - * + * + * + * + * * IMG_GAUSSIAN: Gaussian function. - * - * - * - * + * + * + * + * * IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation. - * - * - * - * + * + * + * + * * IMG_HERMITE: Hermite interpolation. - * - * - * - * + * + * + * + * * IMG_HAMMING: Hamming filter. - * - * - * - * + * + * + * + * * IMG_HANNING: Hanning filter. - * - * - * - * + * + * + * + * * IMG_MITCHELL: Mitchell filter. - * - * - * - * + * + * + * + * * IMG_POWER: Power interpolation. - * - * - * - * + * + * + * + * * IMG_QUADRATIC: Inverse quadratic interpolation. - * - * - * - * + * + * + * + * * IMG_SINC: Sinc function. - * - * - * - * + * + * + * + * * IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation. - * - * - * - * + * + * + * + * * IMG_WEIGHTED4: Weighting filter. - * - * - * - * + * + * + * + * * IMG_TRIANGLE: Triangle interpolation. - * - * - * + * + * + * * @throws ImageException - * + * */ function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): void { error_clear_last(); $result = \imagesetinterpolation($image, $method); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1903,20 +1903,20 @@ function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): void /** * imagesetpixel draws a pixel at the specified * coordinate. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $x x-coordinate. * @param int $y y-coordinate. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagesetpixel($image, int $x, int $y, int $color): void { error_clear_last(); $result = \imagesetpixel($image, $x, $y, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1928,21 +1928,21 @@ function imagesetpixel($image, int $x, int $y, int $color): void * and imagepolygon) when drawing with the special * color IMG_COLOR_STYLED or lines of images with color * IMG_COLOR_STYLEDBRUSHED. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. - * @param array $style An array of pixel colors. You can use the - * IMG_COLOR_TRANSPARENT constant to add a + * @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. * @throws ImageException - * + * */ function imagesetstyle($image, array $style): void { error_clear_last(); $result = \imagesetstyle($image, $style); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1952,18 +1952,18 @@ function imagesetstyle($image, array $style): void * imagesetthickness sets the thickness of the lines * drawn when drawing rectangles, polygons, arcs etc. to * thickness pixels. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $thickness Thickness, in pixels. * @throws ImageException - * + * */ function imagesetthickness($image, int $thickness): void { error_clear_last(); $result = \imagesetthickness($image, $thickness); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1974,23 +1974,23 @@ function imagesetthickness($image, int $thickness): void * used by all region filling functions (such as imagefill * and imagefilledpolygon) when filling with the special * color IMG_COLOR_TILED. - * + * * A tile is an image used to fill an area with a repeated pattern. Any * GD image can be used as a tile, and by setting the transparent color index of the tile * image with imagecolortransparent, a tile allows certain parts * of the underlying area to shine through can be created. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param resource $tile The image resource to be used as a tile. * @throws ImageException - * + * */ function imagesettile($image, $tile): void { error_clear_last(); $result = \imagesettile($image, $tile); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -1998,7 +1998,7 @@ function imagesettile($image, $tile): void /** * Draws a string at the given coordinates. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $font Can be 1, 2, 3, 4, 5 for built-in @@ -2009,13 +2009,13 @@ function imagesettile($image, $tile): void * @param string $string The string to be written. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagestring($image, int $font, int $x, int $y, string $string, int $color): void { error_clear_last(); $result = \imagestring($image, $font, $x, $y, $string, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -2024,7 +2024,7 @@ function imagestring($image, int $font, int $x, int $y, string $string, int $col /** * Draws a string vertically at the given * coordinates. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param int $font Can be 1, 2, 3, 4, 5 for built-in @@ -2035,13 +2035,13 @@ function imagestring($image, int $font, int $x, int $y, string $string, int $col * @param string $string The string to be written. * @param int $color A color identifier created with imagecolorallocate. * @throws ImageException - * + * */ function imagestringup($image, int $font, int $x, int $y, string $string, int $color): void { error_clear_last(); $result = \imagestringup($image, $font, $x, $y, $string, $color); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -2049,18 +2049,18 @@ function imagestringup($image, int $font, int $x, int $y, string $string, int $c /** * Returns the width of the given image resource. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @return int Return the width of the image s. * @throws ImageException - * + * */ function imagesx($image): int { error_clear_last(); $result = \imagesx($image); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -2069,18 +2069,18 @@ function imagesx($image): int /** * Returns the height of the given image resource. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @return int Return the height of the image s. * @throws ImageException - * + * */ function imagesy($image): int { error_clear_last(); $result = \imagesy($image); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -2096,7 +2096,7 @@ function imagesy($image): int * well as possible. This does not work as well as might be hoped. It is * usually best to simply produce a truecolor output image instead, which * guarantees the highest output quality. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param bool $dither Indicates if the image should be dithered - if it is TRUE then @@ -2104,13 +2104,13 @@ function imagesy($image): int * with better color approximation. * @param int $ncolors Sets the maximum number of colors that should be retained in the palette. * @throws ImageException - * + * */ function imagetruecolortopalette($image, bool $dither, int $ncolors): void { error_clear_last(); $result = \imagetruecolortopalette($image, $dither, $ncolors); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -2119,92 +2119,92 @@ function imagetruecolortopalette($image, bool $dither, int $ncolors): void /** * This function calculates and returns the bounding box in pixels * for a TrueType text. - * + * * @param float $size The font size in points. * @param float $angle Angle in degrees in which text will be measured. * @param string $fontfile The path to the TrueType font you wish to use. - * + * * Depending on which version of the GD library PHP is using, when * fontfile does not begin with a leading * / then .ttf will be appended * to the filename and the library will attempt to search for that * filename along a library-defined font path. - * + * * When using versions of the GD library lower than 2.0.18, a space character, * rather than a semicolon, was used as the 'path separator' for different font files. * Unintentional use of this feature will result in the warning message: * Warning: Could not find/open font. For these affected versions, the * only solution is moving the font to a path which does not contain spaces. - * + * * In many cases where a font resides in the same directory as the script using it * the following trick will alleviate any include problems. - * - * + * + * * ]]> - * - * + * + * * Note that open_basedir does * not apply to fontfile. * @param string $text The string to be measured. * @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. - * - * - * - * + * + * + * + * * key * contents - * - * - * - * + * + * + * + * * 0 * lower left corner, X position - * - * + * + * * 1 * lower left corner, Y position - * - * + * + * * 2 * lower right corner, X position - * - * + * + * * 3 * lower right corner, Y position - * - * + * + * * 4 * upper right corner, X position - * - * + * + * * 5 * upper right corner, Y position - * - * + * + * * 6 * upper left corner, X position - * - * + * + * * 7 * upper left corner, Y position - * - * - * - * - * + * + * + * + * + * * The points are relative to the text regardless of the - * angle, so "upper left" means in the top left-hand + * angle, so "upper left" means in the top left-hand * corner seeing the text horizontally. * @throws ImageException - * + * */ function imagettfbbox(float $size, float $angle, string $fontfile, string $text): array { error_clear_last(); $result = \imagettfbbox($size, $angle, $fontfile, $text); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -2214,12 +2214,12 @@ function imagettfbbox(float $size, float $angle, string $fontfile, string $text) /** * Writes the given text into the image using TrueType * fonts. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param float $size The font size in points. * @param float $angle The angle in degrees, with 0 degrees being left-to-right reading text. - * Higher values represent a counter-clockwise rotation. For example, a + * Higher values represent a counter-clockwise rotation. For example, a * value of 90 would result in bottom-to-top reading text. * @param int $x The coordinates given by x and * y will define the basepoint of the first @@ -2233,55 +2233,55 @@ function imagettfbbox(float $size, float $angle, string $fontfile, string $text) * @param int $color The color index. Using the negative of a color index has the effect of * turning off antialiasing. See imagecolorallocate. * @param string $fontfile The path to the TrueType font you wish to use. - * + * * Depending on which version of the GD library PHP is using, when * fontfile does not begin with a leading * / then .ttf will be appended * to the filename and the library will attempt to search for that * filename along a library-defined font path. - * + * * When using versions of the GD library lower than 2.0.18, a space character, * rather than a semicolon, was used as the 'path separator' for different font files. * Unintentional use of this feature will result in the warning message: * Warning: Could not find/open font. For these affected versions, the * only solution is moving the font to a path which does not contain spaces. - * + * * In many cases where a font resides in the same directory as the script using it * the following trick will alleviate any include problems. - * - * + * + * * ]]> - * - * + * + * * Note that open_basedir does * not apply to fontfile. * @param string $text The text string in UTF-8 encoding. - * + * * May include decimal numeric character references (of the form: * &#8364;) to access characters in a font beyond position 127. * The hexadecimal format (like &#xA9;) is supported. * Strings in UTF-8 encoding can be passed directly. - * - * Named entities, such as &copy;, are not supported. Consider using + * + * Named entities, such as &copy;, are not supported. Consider using * html_entity_decode * to decode these named entities into UTF-8 strings. - * + * * If a character is used in the string which is not supported by the * font, a hollow rectangle will replace the character. * @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 + * 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 + * regardless of the angle, so "upper left" means in the top left-hand * corner when you see the text horizontally. * Returns FALSE on error. * @throws ImageException - * + * */ function imagettftext($image, float $size, float $angle, int $x, int $y, int $color, string $fontfile, string $text): array { error_clear_last(); $result = \imagettftext($image, $size, $angle, $x, $y, $color, $fontfile, $text); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -2291,7 +2291,7 @@ function imagettftext($image, float $size, float $angle, int $x, int $y, int $co /** * imagewbmp outputs or save a WBMP * version of the given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. @@ -2299,7 +2299,7 @@ function imagettftext($image, float $size, float $angle, int $x, int $y, int $co * identifier obtained from imagecolorallocate. * The default foreground color is black. * @throws ImageException - * + * */ function imagewbmp($image, $to = null, int $foreground = null): void { @@ -2308,10 +2308,10 @@ function imagewbmp($image, $to = null, int $foreground = null): void $result = \imagewbmp($image, $to, $foreground); } elseif ($to !== null) { $result = \imagewbmp($image, $to); - }else { + } else { $result = \imagewbmp($image); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -2319,33 +2319,33 @@ function imagewbmp($image, $to = null, int $foreground = null): void /** * Outputs or saves a WebP version of the given image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param mixed $to The path or an open stream resource (which is automatically being closed after this function returns) to save the file to. If not set or NULL, the raw image stream will be outputted directly. * @param int $quality quality ranges from 0 (worst * quality, smaller file) to 100 (best quality, biggest file). * @throws ImageException - * + * */ function imagewebp($image, $to = null, int $quality = 80): void { error_clear_last(); $result = \imagewebp($image, $to, $quality); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } /** - * Outputs or save an XBM version of the given + * Outputs or save an XBM version of the given * image. - * + * * @param resource $image An image resource, returned by one of the image creation functions, * such as imagecreatetruecolor. * @param string|null $filename The path to save the file to. If not set or NULL, the raw image stream will be outputted directly. - * + * * The filename (without the .xbm extension) is also * used for the C identifiers of the XBM, whereby non * alphanumeric characters of the current locale are substituted by @@ -2356,17 +2356,17 @@ function imagewebp($image, $to = null, int $quality = 80): void * The default foreground color is black. All other colors are treated as * background. * @throws ImageException - * + * */ function imagexbm($image, string $filename, int $foreground = null): void { error_clear_last(); if ($foreground !== null) { $result = \imagexbm($image, $filename, $foreground); - }else { + } else { $result = \imagexbm($image, $filename); } - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -2374,22 +2374,22 @@ function imagexbm($image, string $filename, int $foreground = null): void /** * Embeds binary IPTC data into a JPEG image. - * + * * @param string $iptcdata The data to be written. * @param string $jpeg_file_name Path to the JPEG image. - * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be + * @param int $spool Spool flag. If the spool flag is less than 2 then the JPEG will be * returned as a string. Otherwise the JPEG will be printed to STDOUT. * @return array If spool is less than 2, the JPEG will be returned, * . Otherwise returns TRUE on success * . * @throws ImageException - * + * */ function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0) { error_clear_last(); $result = \iptcembed($iptcdata, $jpeg_file_name, $spool); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -2398,18 +2398,18 @@ function iptcembed(string $iptcdata, string $jpeg_file_name, int $spool = 0) /** * Parses an IPTC block into its single tags. - * + * * @param string $iptcblock A binary IPTC block. * @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 - * + * */ function iptcparse(string $iptcblock): array { error_clear_last(); $result = \iptcparse($iptcblock); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } return $result; @@ -2418,20 +2418,20 @@ function iptcparse(string $iptcblock): array /** * Converts a JPEG file into a WBMP file. - * + * * @param string $jpegname Path to JPEG file. * @param string $wbmpname Path to destination WBMP file. * @param int $dest_height Destination image height. * @param int $dest_width Destination image width. * @param int $threshold Threshold value, between 0 and 8 (inclusive). * @throws ImageException - * + * */ function jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void { error_clear_last(); $result = \jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } @@ -2439,22 +2439,20 @@ function jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $de /** * Converts a PNG file into a WBMP file. - * + * * @param string $pngname Path to PNG file. * @param string $wbmpname Path to destination WBMP file. * @param int $dest_height Destination image height. * @param int $dest_width Destination image width. * @param int $threshold Threshold value, between 0 and 8 (inclusive). * @throws ImageException - * + * */ function png2wbmp(string $pngname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void { error_clear_last(); $result = \png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold); - if ($result === FALSE) { + if ($result === false) { throw ImageException::createFromPhpError(); } } - - diff --git a/generated/imap.php b/generated/imap.php index e3959d7e..c7b2ca85 100644 --- a/generated/imap.php +++ b/generated/imap.php @@ -6,13 +6,13 @@ /** * Appends a string message to the specified mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $mailbox The mailbox name, see imap_open for more * information * @param string $message The message to be append, as a string - * + * * When talking to the Cyrus IMAP server, you must use "\r\n" as * your end-of-line terminator instead of "\n" or the operation will * fail @@ -20,13 +20,13 @@ * to the mailbox * @param string $internal_date If this parameter is set, it will set the INTERNALDATE on the appended message. The parameter should be a date string that conforms to the rfc2060 specifications for a date_time value. * @throws ImapException - * + * */ function imap_append($imap_stream, string $mailbox, string $message, string $options = null, string $internal_date = null): void { error_clear_last(); $result = \imap_append($imap_stream, $mailbox, $message, $options, $internal_date); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -36,32 +36,32 @@ function imap_append($imap_stream, string $mailbox, string $message, string $opt * This function causes a store to delete the specified * flag to the flags set for the * messages in the specified sequence. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages + * with the X,Y syntax, or retrieve all messages * within an interval with the X:Y syntax * @param string $flag The flags which you can unset are "\\Seen", "\\Answered", "\\Flagged", * "\\Deleted", and "\\Draft" (as defined by RFC2060) * @param int $options options are a bit mask and may contain * the single option: - * - * - * + * + * + * * ST_UID - The sequence argument contains UIDs * instead of sequence numbers - * - * - * + * + * + * * @throws ImapException - * + * */ function imap_clearflag_full($imap_stream, string $sequence, string $flag, int $options = 0): void { error_clear_last(); $result = \imap_clearflag_full($imap_stream, $sequence, $flag, $options); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -69,7 +69,7 @@ function imap_clearflag_full($imap_stream, string $sequence, string $flag, int $ /** * Closes the imap stream. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param int $flag If set to CL_EXPUNGE, the function will silently @@ -77,13 +77,13 @@ function imap_clearflag_full($imap_stream, string $sequence, string $flag, int $ * deletion. You can achieve the same thing by using * imap_expunge * @throws ImapException - * + * */ function imap_close($imap_stream, int $flag = 0): void { error_clear_last(); $result = \imap_close($imap_stream, $flag); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -91,20 +91,20 @@ function imap_close($imap_stream, int $flag = 0): void /** * Creates a new mailbox specified by mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $mailbox The mailbox name, see imap_open for more * information. Names containing international characters should be * encoded by imap_utf7_encode * @throws ImapException - * + * */ function imap_createmailbox($imap_stream, string $mailbox): void { error_clear_last(); $result = \imap_createmailbox($imap_stream, $mailbox); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -112,19 +112,19 @@ function imap_createmailbox($imap_stream, string $mailbox): void /** * Deletes the specified mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $mailbox The mailbox name, see imap_open for more * information * @throws ImapException - * + * */ function imap_deletemailbox($imap_stream, string $mailbox): void { error_clear_last(); $result = \imap_deletemailbox($imap_stream, $mailbox); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -132,22 +132,22 @@ function imap_deletemailbox($imap_stream, string $mailbox): void /** * Purges the cache of entries of a specific type. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param int $caches Specifies the cache to purge. It may one or a combination - * of the following constants: - * IMAP_GC_ELT (message cache elements), + * of the following constants: + * IMAP_GC_ELT (message cache elements), * IMAP_GC_ENV (envelope and bodies), * IMAP_GC_TEXTS (texts). * @throws ImapException - * + * */ function imap_gc($imap_stream, int $caches): void { error_clear_last(); $result = \imap_gc($imap_stream, $caches); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -155,7 +155,7 @@ function imap_gc($imap_stream, int $caches): void /** * Gets information about the given message number by reading its headers. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param int $msg_number The message number @@ -163,217 +163,217 @@ function imap_gc($imap_stream, int $caches): void * Must be greater than or equal to zero. * @param int $subjectlength Number of characters for the fetchsubject property * Must be greater than or equal to zero. - * @param string $defaulthost + * @param string $defaulthost * @return object Returns FALSE on error or, if successful, the information in an object with following properties: - * - * - * + * + * + * * toaddress - full to: line, up to 1024 characters - * - * - * - * - * to - an array of objects from the To: line, with the following + * + * + * + * + * to - an array of objects from the To: line, with the following * properties: personal, adl, * mailbox, and host - * - * - * - * + * + * + * + * * fromaddress - full from: line, up to 1024 characters - * - * - * - * - * from - an array of objects from the From: line, with the following + * + * + * + * + * from - an array of objects from the From: line, with the following * properties: personal, adl, * mailbox, and host - * - * - * - * + * + * + * + * * ccaddress - full cc: line, up to 1024 characters - * - * - * - * - * cc - an array of objects from the Cc: line, with the following + * + * + * + * + * cc - an array of objects from the Cc: line, with the following * properties: personal, adl, * mailbox, and host - * - * - * - * + * + * + * + * * bccaddress - full bcc: line, up to 1024 characters - * - * - * - * - * bcc - an array of objects from the Bcc: line, with the following + * + * + * + * + * bcc - an array of objects from the Bcc: line, with the following * properties: personal, adl, * mailbox, and host - * - * - * - * + * + * + * + * * reply_toaddress - full Reply-To: line, up to 1024 characters - * - * - * - * + * + * + * + * * reply_to - an array of objects from the Reply-To: line, with the following * properties: personal, adl, * mailbox, and host - * - * - * - * + * + * + * + * * senderaddress - full sender: line, up to 1024 characters - * - * - * - * - * sender - an array of objects from the Sender: line, with the following + * + * + * + * + * sender - an array of objects from the Sender: line, with the following * properties: personal, adl, * mailbox, and host - * - * - * - * + * + * + * + * * return_pathaddress - full Return-Path: line, up to 1024 characters - * - * - * - * + * + * + * + * * return_path - an array of objects from the Return-Path: line, with the - * following properties: personal, - * adl, mailbox, and + * following properties: personal, + * adl, mailbox, and * host - * - * - * - * - * remail - - * - * - * - * + * + * + * + * + * remail - + * + * + * + * * date - The message date as found in its headers - * - * - * - * + * + * + * + * * Date - Same as date - * - * - * - * + * + * + * + * * subject - The message subject - * - * - * - * - * Subject - Same as subject - * - * - * - * - * in_reply_to - - * - * - * - * - * message_id - - * - * - * - * - * newsgroups - - * - * - * - * - * followup_to - - * - * - * - * - * references - - * - * - * - * + * + * + * + * + * Subject - Same as subject + * + * + * + * + * in_reply_to - + * + * + * + * + * message_id - + * + * + * + * + * newsgroups - + * + * + * + * + * followup_to - + * + * + * + * + * references - + * + * + * + * * Recent - R if recent and seen, N * if recent and not seen, ' ' if not recent. - * - * - * - * + * + * + * + * * Unseen - U if not seen AND not recent, ' ' if seen * OR not seen and recent - * - * - * - * + * + * + * + * * Flagged - F if flagged, ' ' if not flagged - * - * - * - * + * + * + * + * * Answered - A if answered, ' ' if unanswered - * - * - * - * + * + * + * + * * Deleted - D if deleted, ' ' if not deleted - * - * - * - * + * + * + * + * * Draft - X if draft, ' ' if not draft - * - * - * - * + * + * + * + * * Msgno - The message number - * - * - * - * - * MailDate - - * - * - * - * + * + * + * + * + * MailDate - + * + * + * + * * Size - The message size - * - * - * - * + * + * + * + * * udate - mail message date in Unix time - * - * - * - * + * + * + * + * * fetchfrom - from line formatted to fit fromlength * characters - * - * - * - * - * fetchsubject - subject line formatted to fit + * + * + * + * + * fetchsubject - subject line formatted to fit * subjectlength characters - * - * - * + * + * + * * @throws ImapException - * + * */ function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int $subjectlength = 0, string $defaulthost = null): object { error_clear_last(); $result = \imap_headerinfo($imap_stream, $msg_number, $fromlength, $subjectlength, $defaulthost); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } return $result; @@ -383,7 +383,7 @@ function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int /** * Copies mail messages specified by msglist * to specified mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $msglist msglist is a range not just message @@ -391,27 +391,27 @@ function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int * @param string $mailbox The mailbox name, see imap_open for more * information * @param int $options options is a bitmask of one or more of - * - * - * + * + * + * * CP_UID - the sequence numbers contain UIDS - * - * - * - * + * + * + * + * * CP_MOVE - Delete the messages from * the current mailbox after copying - * - * - * + * + * + * * @throws ImapException - * + * */ function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $options = 0): void { error_clear_last(); $result = \imap_mail_copy($imap_stream, $msglist, $mailbox, $options); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -420,7 +420,7 @@ function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $opt /** * Moves mail messages specified by msglist to the * specified mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $msglist msglist is a range not just message numbers @@ -428,21 +428,21 @@ function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $opt * @param string $mailbox The mailbox name, see imap_open for more * information * @param int $options options is a bitmask and may contain the single option: - * - * - * + * + * + * * CP_UID - the sequence numbers contain UIDS - * - * - * + * + * + * * @throws ImapException - * + * */ function imap_mail_move($imap_stream, string $msglist, string $mailbox, int $options = 0): void { error_clear_last(); $result = \imap_mail_move($imap_stream, $msglist, $mailbox, $options); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -451,28 +451,28 @@ function imap_mail_move($imap_stream, string $msglist, string $mailbox, int $opt /** * This function allows sending of emails with correct handling of * Cc and Bcc receivers. - * + * * The parameters to, cc * and bcc are all strings and are all parsed * as RFC822 address lists. - * + * * @param string $to The receiver * @param string $subject The mail subject * @param string $message The mail body, see imap_mail_compose * @param string $additional_headers As string with additional headers to be set on the mail - * @param string $cc + * @param string $cc * @param string $bcc The receivers specified in bcc will get the * mail, but are excluded from the headers. * @param string $rpath Use this parameter to specify return path upon mail delivery failure. * This is useful when using PHP as a mail client for multiple users. * @throws ImapException - * + * */ function imap_mail(string $to, string $subject, string $message, string $additional_headers = null, string $cc = null, string $bcc = null, string $rpath = null): void { error_clear_last(); $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $rpath); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -480,18 +480,18 @@ function imap_mail(string $to, string $subject, string $message, string $additio /** * Decode a modified UTF-7 (as specified in RFC 2060, section 5.1.3) string to UTF-8. - * + * * @param string $in A string encoded in modified UTF-7. * @return string Returns in converted to UTF-8, * . * @throws ImapException - * + * */ function imap_mutf7_to_utf8(string $in): string { error_clear_last(); $result = \imap_mutf7_to_utf8($in); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } return $result; @@ -500,18 +500,18 @@ function imap_mutf7_to_utf8(string $in): string /** * Gets the number of messages in the current mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @return int Return the number of messages in the current mailbox, as an integer, . * @throws ImapException - * + * */ function imap_num_msg($imap_stream): int { error_clear_last(); $result = \imap_num_msg($imap_stream); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } return $result; @@ -520,213 +520,213 @@ function imap_num_msg($imap_stream): int /** * Opens an IMAP stream to a mailbox. - * + * * This function can also be used to open streams to POP3 and * NNTP servers, but some functions and features are only * available on IMAP servers. - * + * * @param string $mailbox A mailbox name consists of a server and a mailbox path on this server. * The special name INBOX stands for the current users * personal mailbox. Mailbox names that contain international characters * besides those in the printable ASCII space have to be encoded with * imap_utf7_encode. - * + * * The server part, which is enclosed in '{' and '}', consists of the servers * name or ip address, an optional port (prefixed by ':'), and an optional * protocol specification (prefixed by '/'). - * + * * The server part is mandatory in all mailbox * parameters. - * + * * All names which start with { are remote names, and are * in the form "{" remote_system_name [":" port] [flags] "}" * [mailbox_name] where: - * - * - * + * + * + * * remote_system_name - Internet domain name or * bracketed IP address of server. - * - * - * - * + * + * + * + * * port - optional TCP port number, default is the * default port for that service - * - * - * - * + * + * + * + * * flags - optional flags, see following table. - * - * - * - * + * + * + * + * * mailbox_name - remote mailbox name, default is INBOX - * - * - * - * - * + * + * + * + * + * * Optional flags for names - * - * - * + * + * + * * Flag * Description - * - * - * - * + * + * + * + * * /service=service * mailbox access service, default is "imap" - * - * + * + * * /user=user * remote user name for login on the server - * - * + * + * * /authuser=user * remote authentication user; if specified this is the user name * whose password is used (e.g. administrator) - * - * + * + * * /anonymous * remote access as anonymous user - * - * + * + * * /debug * record protocol telemetry in application's debug log - * - * + * + * * /secure * do not transmit a plaintext password over the network - * - * + * + * * /imap, /imap2, * /imap2bis, /imap4, * /imap4rev1 * equivalent to /service=imap - * - * + * + * * /pop3 * equivalent to /service=pop3 - * - * + * + * * /nntp * equivalent to /service=nntp - * - * + * + * * /norsh * do not use rsh or ssh to establish a preauthenticated IMAP * session - * - * + * + * * /ssl * use the Secure Socket Layer to encrypt the session - * - * + * + * * /validate-cert * validate certificates from TLS/SSL server (this is the default * behavior) - * - * + * + * * /novalidate-cert * do not validate certificates from TLS/SSL server, needed if * server uses self-signed certificates - * - * + * + * * /tls * force use of start-TLS to encrypt the session, and reject * connection to servers that do not support it - * - * + * + * * /notls * do not do start-TLS to encrypt the session, even with servers * that support it - * - * + * + * * /readonly * request read-only mailbox open (IMAP only; ignored on NNTP, and * an error with SMTP and POP3) - * - * - * - * + * + * + * + * * @param string $username The user name * @param string $password The password associated with the username * @param int $options The options are a bit mask with one or more of * the following: - * - * - * + * + * + * * OP_READONLY - Open mailbox read-only - * - * - * - * + * + * + * + * * OP_ANONYMOUS - Don't use or update a * .newsrc for news (NNTP only) - * - * - * - * + * + * + * + * * OP_HALFOPEN - For IMAP * and NNTP names, open a connection but * don't open a mailbox. - * - * - * - * + * + * + * + * * CL_EXPUNGE - Expunge mailbox automatically upon mailbox close * (see also imap_delete and * imap_expunge) - * - * - * - * + * + * + * + * * OP_DEBUG - Debug protocol negotiations - * - * - * - * + * + * + * + * * OP_SHORTCACHE - Short (elt-only) caching - * - * - * - * + * + * + * + * * OP_SILENT - Don't pass up events (internal use) - * - * - * - * + * + * + * + * * OP_PROTOTYPE - Return driver prototype - * - * - * - * + * + * + * + * * OP_SECURE - Don't do non-secure authentication - * - * - * + * + * + * * @param int $n_retries Number of maximum connect attempts - * @param array|null $params Connection parameters, the following (string) keys maybe used + * @param array|null $params Connection parameters, the following (string) keys maybe used * to set one or more connection parameters: - * - * - * + * + * + * * DISABLE_AUTHENTICATOR - Disable authentication properties - * - * - * + * + * + * * @return resource Returns an IMAP stream on success . * @throws ImapException - * + * */ function imap_open(string $mailbox, string $username, string $password, int $options = 0, int $n_retries = 0, array $params = null) { error_clear_last(); $result = \imap_open($mailbox, $username, $password, $options, $n_retries, $params); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } return $result; @@ -737,7 +737,7 @@ function imap_open(string $mailbox, string $username, string $password, int $opt * This function renames on old mailbox to new mailbox (see * imap_open for the format of * mbox names). - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $old_mbox The old mailbox name, see imap_open for more @@ -745,13 +745,13 @@ function imap_open(string $mailbox, string $username, string $password, int $opt * @param string $new_mbox The new mailbox name, see imap_open for more * information * @throws ImapException - * + * */ function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): void { error_clear_last(); $result = \imap_renamemailbox($imap_stream, $old_mbox, $new_mbox); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -759,7 +759,7 @@ function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): v /** * Saves a part or the whole body of the specified message. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string|resource $file The path to the saved file as a string, or a valid file descriptor @@ -768,33 +768,33 @@ function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): v * @param string $part_number The part number. It is a string of integers delimited by period which * index into a body part list as per the IMAP4 specification * @param int $options A bitmask with one or more of the following: - * - * - * + * + * + * * FT_UID - The msg_number is a UID - * - * - * - * + * + * + * + * * FT_PEEK - Do not set the \Seen flag if * not already set - * - * - * - * + * + * + * + * * FT_INTERNAL - The return string is in * internal format, will not canonicalize to CRLF. - * - * - * + * + * + * * @throws ImapException - * + * */ function imap_savebody($imap_stream, $file, int $msg_number, string $part_number = "", int $options = 0): void { error_clear_last(); $result = \imap_savebody($imap_stream, $file, $msg_number, $part_number, $options); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -802,20 +802,20 @@ function imap_savebody($imap_stream, $file, int $msg_number, string $part_number /** * Sets an upper limit quota on a per mailbox basis. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $quota_root The mailbox to have a quota set. This should follow the IMAP standard * format for a mailbox: user.name. * @param int $quota_limit The maximum size (in KB) for the quota_root * @throws ImapException - * + * */ function imap_set_quota($imap_stream, string $quota_root, int $quota_limit): void { error_clear_last(); $result = \imap_set_quota($imap_stream, $quota_root, $quota_limit); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -823,7 +823,7 @@ function imap_set_quota($imap_stream, string $quota_root, int $quota_limit): voi /** * Sets the ACL for a giving mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $mailbox The mailbox name, see imap_open for more @@ -832,13 +832,13 @@ function imap_set_quota($imap_stream, string $quota_root, int $quota_limit): voi * @param string $rights The rights to give to the user. Passing an empty string will delete * acl. * @throws ImapException - * + * */ function imap_setacl($imap_stream, string $mailbox, string $id, string $rights): void { error_clear_last(); $result = \imap_setacl($imap_stream, $mailbox, $id, $rights); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -846,35 +846,35 @@ function imap_setacl($imap_stream, string $mailbox, string $id, string $rights): /** * Causes a store to add the specified flag to the - * flags set for the messages in the specified + * flags set for the messages in the specified * sequence. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $sequence A sequence of message numbers. You can enumerate desired messages - * with the X,Y syntax, or retrieve all messages + * with the X,Y syntax, or retrieve all messages * within an interval with the X:Y syntax - * @param string $flag The flags which you can set are \Seen, + * @param string $flag The flags which you can set are \Seen, * \Answered, \Flagged, * \Deleted, and \Draft as * defined by RFC2060. * @param int $options A bit mask that may contain the single option: - * - * - * + * + * + * * ST_UID - The sequence argument contains UIDs * instead of sequence numbers - * - * - * + * + * + * * @throws ImapException - * + * */ function imap_setflag_full($imap_stream, string $sequence, string $flag, int $options = NIL): void { error_clear_last(); $result = \imap_setflag_full($imap_stream, $sequence, $flag, $options); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -882,19 +882,19 @@ function imap_setflag_full($imap_stream, string $sequence, string $flag, int $op /** * Subscribe to a new mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $mailbox The mailbox name, see imap_open for more * information * @throws ImapException - * + * */ function imap_subscribe($imap_stream, string $mailbox): void { error_clear_last(); $result = \imap_subscribe($imap_stream, $mailbox); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -902,34 +902,34 @@ function imap_subscribe($imap_stream, string $mailbox): void /** * Gets a tree of a threaded message. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. - * @param int $options + * @param int $options * @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 * in the resulting array: - * - * + * + * * $thread["XX.num"] - current message number - * - * + * + * * $thread["XX.next"] - * - * + * + * * $thread["XX.branch"] - * - * + * + * * @throws ImapException - * + * */ function imap_thread($imap_stream, int $options = SE_FREE): array { error_clear_last(); $result = \imap_thread($imap_stream, $options); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } return $result; @@ -939,19 +939,19 @@ function imap_thread($imap_stream, int $options = SE_FREE): array /** * Removes the deletion flag for a specified message, which is set by * imap_delete or imap_mail_move. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param int $msg_number The message number - * @param int $flags + * @param int $flags * @throws ImapException - * + * */ function imap_undelete($imap_stream, int $msg_number, int $flags = 0): void { error_clear_last(); $result = \imap_undelete($imap_stream, $msg_number, $flags); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -959,19 +959,19 @@ function imap_undelete($imap_stream, int $msg_number, int $flags = 0): void /** * Unsubscribe from the specified mailbox. - * + * * @param resource $imap_stream An IMAP stream returned by * imap_open. * @param string $mailbox The mailbox name, see imap_open for more * information * @throws ImapException - * + * */ function imap_unsubscribe($imap_stream, string $mailbox): void { error_clear_last(); $result = \imap_unsubscribe($imap_stream, $mailbox); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } } @@ -979,21 +979,19 @@ function imap_unsubscribe($imap_stream, string $mailbox): void /** * Encode a UTF-8 string to modified UTF-7 (as specified in RFC 2060, section 5.1.3). - * + * * @param string $in A UTF-8 encoded string. * @return string Returns in converted to modified UTF-7, * . * @throws ImapException - * + * */ function imap_utf8_to_mutf7(string $in): string { error_clear_last(); $result = \imap_utf8_to_mutf7($in); - if ($result === FALSE) { + if ($result === false) { throw ImapException::createFromPhpError(); } return $result; } - - diff --git a/generated/info.php b/generated/info.php index f61b0c1d..c5052653 100644 --- a/generated/info.php +++ b/generated/info.php @@ -7,69 +7,69 @@ /** * Set the various assert control options or just query * their current settings. - * - * @param int $what + * + * @param int $what * Assert Options - * - * - * + * + * + * * Option * INI Setting * Default value * Description - * - * - * - * + * + * + * + * * ASSERT_ACTIVE * assert.active * 1 * enable assert evaluation - * - * + * + * * ASSERT_WARNING * assert.warning * 1 * issue a PHP warning for each failed assertion - * - * + * + * * ASSERT_BAIL * assert.bail * 0 * terminate execution on failed assertions - * - * + * + * * ASSERT_QUIET_EVAL * assert.quiet_eval * 0 - * + * * disable error_reporting during assertion expression * evaluation - * - * - * + * + * + * * ASSERT_CALLBACK * assert.callback * (NULL) * Callback to call on failed assertions - * - * - * - * + * + * + * + * * @param mixed $value An optional new value for the option. * @return mixed Returns the original setting of any option s. * @throws InfoException - * + * */ function assert_options(int $what, $value = null) { error_clear_last(); if ($value !== null) { $result = \assert_options($what, $value); - }else { + } else { $result = \assert_options($what); } - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } return $result; @@ -80,16 +80,16 @@ function assert_options(int $what, $value = null) * Sets the process title visible in tools such as top and * ps. This function is available only in * CLI mode. - * + * * @param string $title The new title. * @throws InfoException - * + * */ function cli_set_process_title(string $title): void { error_clear_last(); $result = \cli_set_process_title($title); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } } @@ -98,48 +98,48 @@ function cli_set_process_title(string $title): void /** * Loads the PHP extension given by the parameter * library. - * + * * Use extension_loaded to test whether a given * extension is already available or not. This works on both built-in * extensions and dynamically loaded ones (either through php.ini or * dl). - * + * * @param string $library This parameter is only the filename of the * extension to load which also depends on your platform. For example, * the sockets extension (if compiled - * as a shared module, not the default!) would be called + * as a shared module, not the default!) would be called * sockets.so on Unix platforms whereas it is called * php_sockets.dll on the Windows platform. - * + * * The directory where the extension is loaded from depends on your * platform: - * + * * Windows - If not explicitly set in the php.ini, the extension is * loaded from C:\php5\ by default. - * + * * Unix - If not explicitly set in the php.ini, the default extension * directory depends on - * - * - * + * + * + * * whether PHP has been built with --enable-debug * or not - * - * - * - * + * + * + * + * * whether PHP has been built with (experimental) ZTS (Zend Thread Safety) * support or not - * - * - * - * + * + * + * + * * the current internal ZEND_MODULE_API_NO (Zend * internal module API number, which is basically the date on which a * major module API change happened, e.g. 20010901) - * - * - * + * + * + * * Taking into account the above, the directory then defaults to * <install-dir>/lib/php/extensions/ <debug-or-not>-<zts-or-not>-ZEND_MODULE_API_NO, * e.g. @@ -154,13 +154,13 @@ function cli_set_process_title(string $title): void * specified library couldn't be loaded, in addition to FALSE an * E_WARNING message is emitted. * @throws InfoException - * + * */ function dl(string $library): void { error_clear_last(); $result = \dl($library); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } } @@ -168,21 +168,21 @@ function dl(string $library): void /** * Gets the time of the last modification of the main script of execution. - * + * * If you're interested in getting the last modification time * of a different file, consider using filemtime. - * + * * @return int Returns the time of the last modification of the current * page. The value returned is a Unix timestamp, suitable for * feeding to date. Returns FALSE on error. * @throws InfoException - * + * */ function getlastmod(): int { error_clear_last(); $result = \getlastmod(); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } return $result; @@ -190,17 +190,17 @@ function getlastmod(): int /** - * - * + * + * * @return int Returns the group ID of the current script, . * @throws InfoException - * + * */ function getmygid(): int { error_clear_last(); $result = \getmygid(); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } return $result; @@ -209,16 +209,16 @@ function getmygid(): int /** * Gets the inode of the current script. - * + * * @return int Returns the current script's inode as an integer, . * @throws InfoException - * + * */ function getmyinode(): int { error_clear_last(); $result = \getmyinode(); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } return $result; @@ -227,16 +227,16 @@ function getmyinode(): int /** * Gets the current PHP process ID. - * + * * @return int Returns the current PHP process ID, . * @throws InfoException - * + * */ function getmypid(): int { error_clear_last(); $result = \getmypid(); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } return $result; @@ -244,17 +244,17 @@ function getmypid(): int /** - * - * + * + * * @return int Returns the user ID of the current script, . * @throws InfoException - * + * */ function getmyuid(): int { error_clear_last(); $result = \getmyuid(); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } return $result; @@ -265,186 +265,186 @@ function getmyuid(): int * This function prints out the credits listing the PHP developers, * modules, etc. It generates the appropriate HTML codes to insert * the information in a page. - * + * * @param int $flag To generate a custom credits page, you may want to use the * flag parameter. - * - * + * + * * Pre-defined phpcredits flags - * - * - * + * + * + * * name * description - * - * - * - * + * + * + * + * * CREDITS_ALL - * + * * All the credits, equivalent to using: CREDITS_DOCS + * CREDITS_GENERAL + CREDITS_GROUP + * CREDITS_MODULES + CREDITS_FULLPAGE. * It generates a complete stand-alone HTML page with the appropriate tags. - * - * - * + * + * + * * CREDITS_DOCS * The credits for the documentation team - * - * + * + * * CREDITS_FULLPAGE - * + * * Usually used in combination with the other flags. Indicates * that a complete stand-alone HTML page needs to be * printed including the information indicated by the other * flags. - * - * - * + * + * + * * CREDITS_GENERAL - * - * General credits: Language design and concept, PHP authors + * + * General credits: Language design and concept, PHP authors * and SAPI module. - * - * - * + * + * + * * CREDITS_GROUP * A list of the core developers - * - * + * + * * CREDITS_MODULES - * + * * A list of the extension modules for PHP, and their authors - * - * - * + * + * + * * CREDITS_SAPI - * + * * A list of the server API modules for PHP, and their authors - * - * - * - * - * + * + * + * + * + * * @throws InfoException - * + * */ function phpcredits(int $flag = CREDITS_ALL): void { error_clear_last(); $result = \phpcredits($flag); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } } /** - * Outputs a large amount of information about the current state of PHP. + * Outputs a large amount of information about the current state of PHP. * This includes information about PHP compilation options and extensions, * the PHP version, server information and environment (if compiled as a * module), the PHP environment, OS version information, paths, master and * local values of configuration options, HTTP headers, and the PHP License. - * + * * Because every system is setup differently, phpinfo is * commonly used to check configuration settings and for available * predefined variables * on a given system. - * + * * phpinfo is also a valuable debugging tool as it * contains all EGPCS (Environment, GET, POST, Cookie, Server) data. - * + * * @param int $what The output may be customized by passing one or more of the * following constants bitwise values summed * together in the optional what parameter. * One can also combine the respective constants or bitwise values * together with the bitwise or operator. - * - * + * + * * phpinfo options - * - * - * + * + * + * * Name (constant) * Value * Description - * - * - * - * + * + * + * + * * INFO_GENERAL * 1 - * + * * The configuration line, php.ini location, build date, Web * Server, System and more. - * - * - * + * + * + * * INFO_CREDITS * 2 - * + * * PHP Credits. See also phpcredits. - * - * - * + * + * + * * INFO_CONFIGURATION * 4 - * + * * Current Local and Master values for PHP directives. See * also ini_get. - * - * - * + * + * + * * INFO_MODULES * 8 - * + * * Loaded modules and their respective settings. See also * get_loaded_extensions. - * - * - * + * + * + * * INFO_ENVIRONMENT * 16 - * + * * Environment Variable information that's also available in * $_ENV. - * - * - * + * + * + * * INFO_VARIABLES * 32 - * - * Shows all + * + * Shows all * predefined variables from EGPCS (Environment, GET, * POST, Cookie, Server). - * - * - * + * + * + * * INFO_LICENSE * 64 - * + * * PHP License information. See also the license FAQ. - * - * - * + * + * + * * INFO_ALL * -1 - * + * * Shows all of the above. - * - * - * - * - * + * + * + * + * + * * @throws InfoException - * + * */ function phpinfo(int $what = INFO_ALL): void { error_clear_last(); $result = \phpinfo($what); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } } @@ -455,7 +455,7 @@ function phpinfo(int $what = INFO_ALL): void * environment variable will only exist for the duration of the current * request. At the end of the request the environment is restored to its * original state. - * + * * Setting certain environment variables may be a potential security breach. * The safe_mode_allowed_env_vars directive contains a * comma-delimited list of prefixes. In Safe Mode, the user may only alter @@ -464,22 +464,22 @@ function phpinfo(int $what = INFO_ALL): void * variables that begin with PHP_ (e.g. * PHP_FOO=BAR). Note: if this directive is empty, PHP * will let the user modify ANY environment variable! - * + * * The safe_mode_protected_env_vars directive contains a * comma-delimited list of environment variables, that the end user won't be * able to change using putenv. These variables will * be protected even if safe_mode_allowed_env_vars is set * to allow to change them. - * + * * @param string $setting The setting, like "FOO=BAR" * @throws InfoException - * + * */ function putenv(string $setting): void { error_clear_last(); $result = \putenv($setting); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } } @@ -488,18 +488,18 @@ function putenv(string $setting): void /** * Sets the include_path * configuration option for the duration of the script. - * + * * @param string $new_include_path The new value for the include_path * @return string Returns the old include_path on * success . * @throws InfoException - * + * */ function set_include_path(string $new_include_path): string { error_clear_last(); $result = \set_include_path($new_include_path); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } return $result; @@ -508,18 +508,16 @@ function set_include_path(string $new_include_path): string /** * Set the current active configuration setting of magic_quotes_runtime. - * + * * @param bool $new_setting FALSE for off, TRUE for on. * @throws InfoException - * + * */ function set_magic_quotes_runtime(bool $new_setting): void { error_clear_last(); $result = \set_magic_quotes_runtime($new_setting); - if ($result === FALSE) { + if ($result === false) { throw InfoException::createFromPhpError(); } } - - diff --git a/generated/ingres-ii.php b/generated/ingres-ii.php index c6139d64..45c97fe6 100644 --- a/generated/ingres-ii.php +++ b/generated/ingres-ii.php @@ -12,26 +12,26 @@ * ingres_commit) to switch the * autocommit mode of the server on or off (when the script begins * the autocommit mode is off). - * + * * When autocommit mode is on, every query is automatically * committed by the server, as if ingres_commit * was called after every call to ingres_query. - * To see if autocommit is enabled use, + * To see if autocommit is enabled use, * ingres_autocommit_state. - * + * * By default Ingres will rollback any uncommitted transactions at the end of * a request. Use this function or ingres_commit to * ensure your data is committed to the database. - * + * * @param resource $link The connection link identifier * @throws IngresiiException - * + * */ function ingres_autocommit($link): void { error_clear_last(); $result = \ingres_autocommit($link); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } @@ -40,20 +40,20 @@ function ingres_autocommit($link): void /** * ingres_close closes the connection to * the Ingres server that is associated with the specified link. - * + * * ingres_close is usually unnecessary, as it * will not close persistent connections and all non-persistent connections * are automatically closed at the end of the script. - * + * * @param resource $link The connection link identifier * @throws IngresiiException - * + * */ function ingres_close($link): void { error_clear_last(); $result = \ingres_close($link); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } @@ -62,27 +62,27 @@ function ingres_close($link): void /** * ingres_commit commits the currently open * transaction, making all changes made to the database permanent. - * + * * This closes the transaction. A new transaction can be opened by sending a * query with ingres_query. - * + * * You can also have the server commit automatically after every * query by calling ingres_autocommit before * opening the transaction. - * + * * By default Ingres will roll back any uncommitted transactions at the end of * a request. Use this function or ingres_autocommit to * ensure your that data is committed to the database. - * + * * @param resource $link The connection link identifier * @throws IngresiiException - * + * */ function ingres_commit($link): void { error_clear_last(); $result = \ingres_commit($link); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } @@ -90,14 +90,14 @@ function ingres_commit($link): void /** * Execute a query prepared using ingres_prepare. - * + * * @param resource $result The result query identifier * @param array $params An array of parameter values to be used with the query * @param string $types A string containing a sequence of types for the parameter values * passed. See the types parameter in * ingres_query for the list of type codes. * @throws IngresiiException - * + * */ function ingres_execute($result, array $params = null, string $types = null): void { @@ -106,10 +106,10 @@ function ingres_execute($result, array $params = null, string $types = null): vo $result = \ingres_execute($result, $params, $types); } elseif ($params !== null) { $result = \ingres_execute($result, $params); - }else { + } else { $result = \ingres_execute($result); } - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } @@ -118,11 +118,11 @@ function ingres_execute($result, array $params = null, string $types = null): vo /** * ingres_field_name returns the name of a field * in a query result. - * + * * @param resource $result The query result identifier * @param int $index index is the field whose name will be * retrieved. - * + * * The possible values of index depend upon * the value * of ingres.array_index_start. @@ -136,15 +136,15 @@ function ingres_execute($result, array $params = null, string $types = null): vo * and ingres_num_fields - * 1. * @return string Returns the name of a field - * in a query result + * in a query result * @throws IngresiiException - * + * */ function ingres_field_name($result, int $index): string { error_clear_last(); $result = \ingres_field_name($result, $index); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } return $result; @@ -153,11 +153,11 @@ function ingres_field_name($result, int $index): string /** * Get the type of a field in a query result. - * + * * @param resource $result The query result identifier * @param int $index index is the field whose type will be * retrieved. - * + * * The possible values of index depend upon * the value * of ingres.array_index_start. @@ -179,16 +179,16 @@ function ingres_field_name($result, int $index): string * than one SQL type depending on the length of the field (see * ingres_field_length). For example * IIAPI_FLT_TYPE can be a float4 or a float8. For detailed - * information, see the Ingres OpenAPI User Guide, Appendix + * information, see the Ingres OpenAPI User Guide, Appendix * "Data Types" in the Ingres documentation. * @throws IngresiiException - * + * */ function ingres_field_type($result, int $index): string { error_clear_last(); $result = \ingres_field_type($result, $index); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } return $result; @@ -196,17 +196,17 @@ function ingres_field_type($result, int $index): string /** - * - * + * + * * @param resource $result The query result identifier * @throws IngresiiException - * + * */ function ingres_free_result($result): void { error_clear_last(); $result = \ingres_free_result($result); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } @@ -220,18 +220,18 @@ function ingres_free_result($result): void * make use of scrollable * cursors. It cannot be used with * ingres_unbuffered_query. - * + * * @param resource $result The result identifier for a query * @param int $position The row to position the cursor on. If ingres.array_index_start * is set to 0, then the first row is 0, else it is 1 * @throws IngresiiException - * + * */ function ingres_result_seek($result, int $position): void { error_clear_last(); $result = \ingres_result_seek($result, $position); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } @@ -241,19 +241,19 @@ function ingres_result_seek($result, int $position): void * ingres_rollback rolls back the currently * open transaction, actually cancelling all changes made to the * database during the transaction. - * + * * This closes the transaction. A new transaction can be opened by sending a * query with ingres_query. - * + * * @param resource $link The connection link identifier * @throws IngresiiException - * + * */ function ingres_rollback($link): void { error_clear_last(); $result = \ingres_rollback($link); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } @@ -263,30 +263,30 @@ function ingres_rollback($link): void * ingres_set_environment is called to set environmental * options that affect the output of certain values from Ingres, such as the * timezone, date format, decimal character separator, and float precision. - * + * * @param resource $link The connection link identifier * @param array $options An enumerated array of option name/value pairs. The following table * lists the option name and the expected type - * - * - * - * - * + * + * + * + * + * * Option name * Option type * Description * Example - * - * - * - * + * + * + * + * * date_century_boundary * integer * The threshold by which a 2-digit year is determined to be in * the current century or in the next century. Equivalent to II_DATE_CENTURY_BOUNDARY * 50 - * - * + * + * * timezone * string * Controls the timezone of the session. If not set, it will @@ -294,15 +294,15 @@ function ingres_rollback($link): void * II_TIMEZONE_NAME is not defined, NA-PACIFIC (GMT-8 with Daylight * Savings) is used. * UNITED-KINGDOM - * - * + * + * * date_format * integer * Sets the allowable input and output format for Ingres dates. * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is * not set, the default date format is US, for example mm/dd/yy. Valid values * for date_format are: - * + * * INGRES_DATE_DMY * INGRES_DATE_FINISH * INGRES_DATE_GERMAN @@ -313,70 +313,70 @@ function ingres_rollback($link): void * INGRES_DATE_MULTINATIONAL4 * INGRES_DATE_YMD * INGRES_DATE_US - * - * - * + * + * + * * INGRES_DATE_ISO4 - * - * + * + * * decimal_separator * string * The character identifier for decimal data * "," - * - * + * + * * money_lort * integer * Leading or trailing currency sign. Valid values for money_lort * are: - * + * * INGRES_MONEY_LEADING * INGRES_MONEY_TRAILING - * - * - * + * + * + * * INGRES_MONEY_LEADING - * - * + * + * * money_sign * string * The currency symbol to be used with the MONEY datatype * € - * - * + * + * * money_precision * integer * The precision of the MONEY datatype * 2 - * - * + * + * * float4_precision * integer * Precision of the FLOAT4 datatype * 10 - * - * + * + * * float8_precision * integer * Precision of the FLOAT8 data * 10 - * - * + * + * * blob_segment_length * integer * The amount of data in bytes to fetch at a time when retrieving * BLOB or CLOB data. Defaults to 4096 bytes when not set explicitly * 8192 - * - * - * - * - * + * + * + * + * + * * Sets the allowable input and output format for Ingres dates. * Defaults to the value defined by II_DATE_FORMAT. If II_DATE_FORMAT is * not set, the default date format is US, for example mm/dd/yy. Valid values * for date_format are: - * + * * INGRES_DATE_DMY * INGRES_DATE_FINISH * INGRES_DATE_GERMAN @@ -387,24 +387,22 @@ function ingres_rollback($link): void * INGRES_DATE_MULTINATIONAL4 * INGRES_DATE_YMD * INGRES_DATE_US - * - * + * + * * Leading or trailing currency sign. Valid values for money_lort * are: - * + * * INGRES_MONEY_LEADING * INGRES_MONEY_TRAILING - * + * * @throws IngresiiException - * + * */ function ingres_set_environment($link, array $options): void { error_clear_last(); $result = \ingres_set_environment($link, $options); - if ($result === FALSE) { + if ($result === false) { throw IngresiiException::createFromPhpError(); } } - - diff --git a/generated/inotify.php b/generated/inotify.php index d2a6be87..cee5e067 100644 --- a/generated/inotify.php +++ b/generated/inotify.php @@ -7,16 +7,16 @@ /** * Initialize an inotify instance for use with * inotify_add_watch - * + * * @return resource A stream resource . * @throws InotifyException - * + * */ function inotify_init() { error_clear_last(); $result = \inotify_init(); - if ($result === FALSE) { + if ($result === false) { throw InotifyException::createFromPhpError(); } return $result; @@ -27,20 +27,18 @@ function inotify_init() * inotify_rm_watch removes the watch * watch_descriptor from the inotify instance * inotify_instance. - * + * * @param resource $inotify_instance Resource returned by * inotify_init * @param int $watch_descriptor Watch to remove from the instance * @throws InotifyException - * + * */ function inotify_rm_watch($inotify_instance, int $watch_descriptor): void { error_clear_last(); $result = \inotify_rm_watch($inotify_instance, $watch_descriptor); - if ($result === FALSE) { + if ($result === false) { throw InotifyException::createFromPhpError(); } } - - diff --git a/generated/json.php b/generated/json.php index 98980462..7b9d6aaa 100644 --- a/generated/json.php +++ b/generated/json.php @@ -7,16 +7,16 @@ /** * Returns a string containing the JSON representation of the supplied * value. - * + * * The encoding is affected by the supplied options * and additionally the encoding of float values depends on the value of * serialize_precision. - * + * * @param mixed $value The value being encoded. Can be any type except * a resource. - * + * * All string data must be UTF-8 encoded. - * + * * PHP implements a superset of JSON as specified in the original * RFC 7159. * @param int $options Bitmask consisting of JSON_HEX_QUOT, @@ -35,13 +35,13 @@ * @param int $depth Set the maximum depth. Must be greater than zero. * @return string Returns a JSON encoded string on success . * @throws JsonException - * + * */ function json_encode($value, int $options = 0, int $depth = 512): string { error_clear_last(); $result = \json_encode($value, $options, $depth); - if ($result === FALSE) { + if ($result === false) { throw JsonException::createFromPhpError(); } return $result; @@ -49,21 +49,19 @@ function json_encode($value, int $options = 0, int $depth = 512): string /** - * - * + * + * * @return string Returns the error message on success, "No error" if no * error has occurred, . * @throws JsonException - * + * */ function json_last_error_msg(): string { error_clear_last(); $result = \json_last_error_msg(); - if ($result === FALSE) { + if ($result === false) { throw JsonException::createFromPhpError(); } return $result; } - - diff --git a/generated/ldap.php b/generated/ldap.php index c737d069..550fa02b 100644 --- a/generated/ldap.php +++ b/generated/ldap.php @@ -6,32 +6,32 @@ /** * Add entries in the LDAP directory. - * + * * @param resource $link_identifier An LDAP link identifier, 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 * the entries are indexed by individual attributes. * In case of multiple values for an attribute, they are indexed using * integers starting with 0. - * - * - * + * + * + * * ]]> - * - * - * @param array $serverctrls + * + * + * @param array $serverctrls * @throws LdapException - * + * */ function ldap_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void { error_clear_last(); if ($serverctrls !== null) { $result = \ldap_add($link_identifier, $dn, $entry, $serverctrls); - }else { + } else { $result = \ldap_add($link_identifier, $dn, $entry); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -39,18 +39,18 @@ function ldap_add($link_identifier, string $dn, array $entry, array $serverctrls /** * Binds to the LDAP directory with specified RDN and password. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param string $bind_rdn - * @param string $bind_password + * @param string $bind_rdn + * @param string $bind_password * @throws LdapException - * + * */ function ldap_bind($link_identifier, string $bind_rdn = null, string $bind_password = null): void { error_clear_last(); $result = \ldap_bind($link_identifier, $bind_rdn, $bind_password); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -58,13 +58,13 @@ function ldap_bind($link_identifier, string $bind_rdn = null, string $bind_passw /** * Retrieve the pagination information send by the server. - * + * * @param resource $link An LDAP link identifier, returned by ldap_connect. - * @param resource $result + * @param resource $result * @param string $cookie An opaque structure sent by the server. * @param int $estimated The estimated number of entries to retrieve. * @throws LdapException - * + * */ function ldap_control_paged_result_response($link, $result, string &$cookie = null, int &$estimated = null): void { @@ -73,10 +73,10 @@ function ldap_control_paged_result_response($link, $result, string &$cookie = nu $result = \ldap_control_paged_result_response($link, $result, $cookie, $estimated); } elseif ($cookie !== null) { $result = \ldap_control_paged_result_response($link, $result, $cookie); - }else { + } else { $result = \ldap_control_paged_result_response($link, $result); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -84,22 +84,22 @@ function ldap_control_paged_result_response($link, $result, string &$cookie = nu /** * Enable LDAP pagination by sending the pagination control (page size, cookie...). - * + * * @param resource $link An LDAP link identifier, returned by ldap_connect. * @param int $pagesize The number of entries by page. - * @param bool $iscritical Indicates whether the pagination is critical or not. + * @param bool $iscritical Indicates whether the pagination is critical or not. * If true and if the server doesn't support pagination, the search * will return no result. - * @param string $cookie An opaque structure sent by the server + * @param string $cookie An opaque structure sent by the server * (ldap_control_paged_result_response). * @throws LdapException - * + * */ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): void { error_clear_last(); $result = \ldap_control_paged_result($link, $pagesize, $iscritical, $cookie); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -108,18 +108,18 @@ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = fals /** * Returns the number of entries stored in the result of previous search * operations. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param resource $result_identifier The internal LDAP result. * @return int Returns number of entries in the result . * @throws LdapException - * + * */ function ldap_count_entries($link_identifier, $result_identifier): int { error_clear_last(); $result = \ldap_count_entries($link_identifier, $result_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -128,22 +128,22 @@ function ldap_count_entries($link_identifier, $result_identifier): int /** * Deletes a particular entry in LDAP directory. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $serverctrls + * @param array $serverctrls * @throws LdapException - * + * */ function ldap_delete($link_identifier, string $dn, array $serverctrls = null): void { error_clear_last(); if ($serverctrls !== null) { $result = \ldap_delete($link_identifier, $dn, $serverctrls); - }else { + } else { $result = \ldap_delete($link_identifier, $dn); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -151,17 +151,17 @@ function ldap_delete($link_identifier, string $dn, array $serverctrls = null): v /** * Performs a WHOAMI extended operation and returns the data. - * + * * @param resource $link An LDAP link identifier, returned by ldap_connect. * @return string The data returned by the server, . * @throws LdapException - * + * */ function ldap_exop_whoami($link): string { error_clear_last(); $result = \ldap_exop_whoami($link); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -172,7 +172,7 @@ function ldap_exop_whoami($link): string * Performs an extended operation on the specified link with * reqoid the OID of the operation and * reqdata the data. - * + * * @param resource $link An LDAP link identifier, 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. @@ -184,7 +184,7 @@ function ldap_exop_whoami($link): string * @return mixed When used with retdata, returns TRUE on success . * When used without retdata, returns a result identifier . * @throws LdapException - * + * */ function ldap_exop($link, string $reqoid, string $reqdata = null, array $servercontrols = null, string &$retdata = null, string &$retoid = null) { @@ -197,10 +197,10 @@ function ldap_exop($link, string $reqoid, string $reqdata = null, array $serverc $result = \ldap_exop($link, $reqoid, $reqdata, $servercontrols); } elseif ($reqdata !== null) { $result = \ldap_exop($link, $reqoid, $reqdata); - }else { + } else { $result = \ldap_exop($link, $reqoid); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -211,7 +211,7 @@ function ldap_exop($link, string $reqoid, string $reqdata = null, array $serverc * Splits the DN returned by ldap_get_dn and breaks it * up into its component parts. Each part is known as Relative Distinguished * Name, or RDN. - * + * * @param string $dn The distinguished name of an LDAP entity. * @param int $with_attrib Used to request if the RDNs are returned with only values or their * attributes as well. To get RDNs with the attributes (i.e. in @@ -222,13 +222,13 @@ function ldap_exop($link, string $reqoid, string $reqdata = null, array $serverc * represents the number of returned values, next elements are numerically * indexed DN components. * @throws LdapException - * + * */ function ldap_explode_dn(string $dn, int $with_attrib): array { error_clear_last(); $result = \ldap_explode_dn($dn, $with_attrib); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -238,22 +238,22 @@ function ldap_explode_dn(string $dn, int $with_attrib): array /** * Gets the first attribute in the given entry. Remaining attributes are * retrieved by calling ldap_next_attribute successively. - * + * * Similar to reading entries, attributes are also read one by one from a * particular entry. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_entry_identifier + * @param resource $result_entry_identifier * @return string Returns the first attribute in the entry on success and FALSE on * error. * @throws LdapException - * + * */ function ldap_first_attribute($link_identifier, $result_entry_identifier): string { error_clear_last(); $result = \ldap_first_attribute($link_identifier, $result_entry_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -264,23 +264,23 @@ function ldap_first_attribute($link_identifier, $result_entry_identifier): strin * Returns the entry identifier for first entry in the result. This entry * identifier is then supplied to ldap_next_entry * routine to get successive entries from the result. - * + * * Entries in the LDAP result are read sequentially using the * ldap_first_entry and * ldap_next_entry functions. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_identifier + * @param resource $result_identifier * @return resource Returns the result entry identifier for the first entry on success and * FALSE on error. * @throws LdapException - * + * */ function ldap_first_entry($link_identifier, $result_identifier) { error_clear_last(); $result = \ldap_first_entry($link_identifier, $result_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -290,21 +290,21 @@ function ldap_first_entry($link_identifier, $result_identifier) /** * Frees up the memory allocated internally to store the result. All result * memory will be automatically freed when the script terminates. - * + * * Typically all the memory allocated for the LDAP result gets freed at the * end of the script. In case the script is making successive searches which * return large result sets, ldap_free_result could be * called to keep the runtime memory usage by the script low. - * - * @param resource $result_identifier + * + * @param resource $result_identifier * @throws LdapException - * + * */ function ldap_free_result($result_identifier): void { error_clear_last(); $result = \ldap_free_result($result_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -312,31 +312,31 @@ function ldap_free_result($result_identifier): void /** * Reads attributes and values from an entry in the search result. - * + * * Having located a specific entry in the directory, you can find out what * information is held for that entry by using this call. You would use this * call for an application which "browses" directory entries and/or where you * do not know the structure of the directory entries. In many applications * you will be searching for a specific attribute such as an email address or * a surname, and won't care what other data is held. - * - * - * - * - * - * + * + * + * + * + * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_entry_identifier + * @param resource $result_entry_identifier * @return array Returns a complete entry information in a multi-dimensional array * on success and FALSE on error. * @throws LdapException - * + * */ function ldap_get_attributes($link_identifier, $result_entry_identifier): array { error_clear_last(); $result = \ldap_get_attributes($link_identifier, $result_entry_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -345,18 +345,18 @@ function ldap_get_attributes($link_identifier, $result_entry_identifier): array /** * Finds out the DN of an entry in the result. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_entry_identifier + * @param resource $result_entry_identifier * @return string Returns the DN of the result entry and FALSE on error. * @throws LdapException - * + * */ function ldap_get_dn($link_identifier, $result_entry_identifier): string { error_clear_last(); $result = \ldap_get_dn($link_identifier, $result_entry_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -366,29 +366,29 @@ function ldap_get_dn($link_identifier, $result_entry_identifier): string /** * Reads multiple entries from the given result, and then reading the * attributes and multiple values. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_identifier + * @param resource $result_identifier * @return array Returns a complete result information in a multi-dimensional array on * success and FALSE on error. - * + * * The structure of the array is as follows. * The attribute index is converted to lowercase. (Attributes are * case-insensitive for directory servers, but not when used as * array indices.) - * - * - * - * - * + * + * + * + * + * * @throws LdapException - * + * */ function ldap_get_entries($link_identifier, $result_identifier): array { error_clear_last(); $result = \ldap_get_entries($link_identifier, $result_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -397,191 +397,191 @@ function ldap_get_entries($link_identifier, $result_identifier): array /** * Sets retval to the value of the specified option. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param int $option The parameter option can be one of: - * - * - * - * + * + * + * + * * Option * Type * since - * - * - * - * + * + * + * + * * LDAP_OPT_DEREF * integer - * - * - * + * + * + * * LDAP_OPT_SIZELIMIT * integer - * - * - * + * + * + * * LDAP_OPT_TIMELIMIT * integer - * - * - * + * + * + * * LDAP_OPT_NETWORK_TIMEOUT * integer - * - * - * + * + * + * * LDAP_OPT_PROTOCOL_VERSION * integer - * - * - * + * + * + * * LDAP_OPT_ERROR_NUMBER * integer - * - * - * + * + * + * * LDAP_OPT_DIAGNOSTIC_MESSAGE * integer - * - * - * + * + * + * * LDAP_OPT_REFERRALS * bool - * - * - * + * + * + * * LDAP_OPT_RESTART * bool - * - * - * + * + * + * * LDAP_OPT_HOST_NAME * string - * - * - * + * + * + * * LDAP_OPT_ERROR_STRING * string - * - * - * + * + * + * * LDAP_OPT_MATCHED_DN * string - * - * - * + * + * + * * LDAP_OPT_SERVER_CONTROLS * array - * - * - * + * + * + * * LDAP_OPT_CLIENT_CONTROLS * array - * - * - * + * + * + * * LDAP_OPT_X_KEEPALIVE_IDLE * int * 7.1 - * - * + * + * * LDAP_OPT_X_KEEPALIVE_PROBES * int * 7.1 - * - * + * + * * LDAP_OPT_X_KEEPALIVE_INTERVAL * int * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CACERTDIR * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CACERTFILE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CERTFILE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CIPHER_SUITE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CRLCHECK * integer * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CRL_NONE * integer * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CRL_PEER * integer * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CRL_ALL * integer * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_CRLFILE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_DHFILE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_KEYILE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_PACKAGE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_PROTOCOL_MIN * integer * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_RANDOM_FILE * string * 7.1 - * - * + * + * * LDAP_OPT_X_TLS_REQUIRE_CERT * integer - * - * - * - * - * + * + * + * + * + * * @param mixed $retval This will be set to the option value. * @throws LdapException - * + * */ function ldap_get_option($link_identifier, int $option, &$retval): void { error_clear_last(); $result = \ldap_get_option($link_identifier, $option, $retval); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -589,25 +589,25 @@ function ldap_get_option($link_identifier, int $option, &$retval): void /** * Reads all the values of the attribute in the entry in the result. - * + * * This function is used exactly like ldap_get_values * except that it handles binary data and not string data. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_entry_identifier - * @param string $attribute + * @param resource $result_entry_identifier + * @param string $attribute * @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. * @throws LdapException - * + * */ function ldap_get_values_len($link_identifier, $result_entry_identifier, string $attribute): array { error_clear_last(); $result = \ldap_get_values_len($link_identifier, $result_entry_identifier, $attribute); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -616,42 +616,42 @@ function ldap_get_values_len($link_identifier, $result_entry_identifier, string /** * Reads all the values of the attribute in the entry in the result. - * + * * This call needs a result_entry_identifier, * so needs to be preceded by one of the ldap search calls and one * of the calls to get an individual entry. - * + * * You application will either be hard coded to look for certain * attributes (such as "surname" or "mail") or you will have to use * the ldap_get_attributes call to work out * what attributes exist for a given entry. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_entry_identifier - * @param string $attribute + * @param resource $result_entry_identifier + * @param string $attribute * @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. - * + * * LDAP allows more than one entry for an attribute, so it can, for example, * store a number of email addresses for one person's directory entry all * labeled with the attribute "mail" - * - * + * + * * return_value["count"] = number of values for attribute * return_value[0] = first value of attribute * return_value[i] = ith value of attribute - * - * + * + * * @throws LdapException - * + * */ function ldap_get_values($link_identifier, $result_entry_identifier, string $attribute): array { error_clear_last(); $result = \ldap_get_values($link_identifier, $result_entry_identifier, $attribute); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -661,22 +661,22 @@ function ldap_get_values($link_identifier, $result_entry_identifier, string $att /** * Performs the search for a specified filter on the * directory with the scope LDAP_SCOPE_ONELEVEL. - * + * * LDAP_SCOPE_ONELEVEL means that the search should only * return information that is at the level immediately below the * base_dn given in the call. * (Equivalent to typing "ls" and getting a list of files and folders in the * current working directory.) - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param string $base_dn The base DN for the directory. - * @param string $filter + * @param string $filter * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). * Note that the "dn" is always returned irrespective of which attributes * types are requested. - * + * * Using this parameter is much more efficient than the default action - * (which is to return all attributes and their associated values). + * (which is to return all attributes and their associated values). * The use of this parameter should therefore be considered good * practice. * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 @@ -684,52 +684,52 @@ function ldap_get_values($link_identifier, $result_entry_identifier, string $att * default behaviour. * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 * means no limit. - * + * * This parameter can NOT override server-side preset sizelimit. You can * set it lower though. - * + * * Some directory server hosts will be configured to return no more than * a preset number of entries. If this occurs, the server will indicate * that it has only returned a partial results set. This also occurs if * you use this parameter to limit the count of fetched entries. * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting * this to 0 means no limit. - * + * * This parameter can NOT override server-side preset timelimit. You can * set it lower though. * @param int $deref Specifies how aliases should be handled during the search. It can be * one of the following: - * - * - * + * + * + * * LDAP_DEREF_NEVER - (default) aliases are never * dereferenced. - * - * - * - * + * + * + * + * * LDAP_DEREF_SEARCHING - aliases should be * dereferenced during the search but not when locating the base object * of the search. - * - * - * - * + * + * + * + * * LDAP_DEREF_FINDING - aliases should be * dereferenced when locating the base object but not during the search. - * - * - * - * + * + * + * + * * LDAP_DEREF_ALWAYS - aliases should be dereferenced * always. - * - * - * - * @param array $serverctrls + * + * + * + * @param array $serverctrls * @return resource Returns a search result identifier . * @throws LdapException - * + * */ function ldap_list($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = null, int $sizelimit = null, int $timelimit = null, int $deref = null, array $serverctrls = null) { @@ -746,10 +746,10 @@ function ldap_list($link_identifier, string $base_dn, string $filter, array $att $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes, $attrsonly); } elseif ($attributes !== null) { $result = \ldap_list($link_identifier, $base_dn, $filter, $attributes); - }else { + } else { $result = \ldap_list($link_identifier, $base_dn, $filter); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -759,23 +759,23 @@ function ldap_list($link_identifier, string $base_dn, string $filter, array $att /** * Adds one or more attribute values to the specified dn. * To add a whole new object see ldap_add function. - * + * * @param resource $link_identifier An LDAP link identifier, 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 $serverctrls + * @param array $serverctrls * @throws LdapException - * + * */ function ldap_mod_add($link_identifier, string $dn, array $entry, array $serverctrls = null): void { error_clear_last(); if ($serverctrls !== null) { $result = \ldap_mod_add($link_identifier, $dn, $entry, $serverctrls); - }else { + } else { $result = \ldap_mod_add($link_identifier, $dn, $entry); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -783,25 +783,25 @@ function ldap_mod_add($link_identifier, string $dn, array $entry, array $serverc /** * Removes one or more attribute values from the specified dn. - * Object deletions are done by the + * Object deletions are done by the * ldap_delete function. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. - * @param array $entry - * @param array $serverctrls + * @param array $entry + * @param array $serverctrls * @throws LdapException - * + * */ function ldap_mod_del($link_identifier, string $dn, array $entry, array $serverctrls = null): void { error_clear_last(); if ($serverctrls !== null) { $result = \ldap_mod_del($link_identifier, $dn, $entry, $serverctrls); - }else { + } else { $result = \ldap_mod_del($link_identifier, $dn, $entry); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -810,23 +810,23 @@ function ldap_mod_del($link_identifier, string $dn, array $entry, array $serverc /** * Replaces one or more attributes from the specified dn. * It may also add or remove attributes. - * + * * @param resource $link_identifier An LDAP link identifier, 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 $serverctrls + * @param array $serverctrls * @throws LdapException - * + * */ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $serverctrls = null): void { error_clear_last(); if ($serverctrls !== null) { $result = \ldap_mod_replace($link_identifier, $dn, $entry, $serverctrls); - }else { + } else { $result = \ldap_mod_replace($link_identifier, $dn, $entry); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -835,7 +835,7 @@ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $ser /** * Modifies an existing entry in the LDAP directory. Allows detailed * specification of the modifications to perform. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. * @param array $entry An array that specifies the modifications to make. Each entry in this @@ -844,69 +844,69 @@ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $ser * modtype maps to the type of modification to perform, * and (depending on the type of modification) values * maps to an array of attribute values relevant to the modification. - * + * * Possible values for modtype include: - * - * + * + * * LDAP_MODIFY_BATCH_ADD - * - * + * + * * Each value specified through values is added (as * an additional value) to the attribute named by * attrib. - * - * - * - * + * + * + * + * * LDAP_MODIFY_BATCH_REMOVE - * - * + * + * * Each value specified through values is removed * from the attribute named by attrib. Any value of * the attribute not contained in the values array * will remain untouched. - * - * - * - * + * + * + * + * * LDAP_MODIFY_BATCH_REMOVE_ALL - * - * + * + * * All values are removed from the attribute named by * attrib. A values entry must * not be provided. - * - * - * - * + * + * + * + * * LDAP_MODIFY_BATCH_REPLACE - * - * + * + * * All current values of the attribute named by * attrib are replaced with the values specified * through values. - * - * - * - * - * + * + * + * + * + * * Each value specified through values is added (as * an additional value) to the attribute named by * attrib. - * + * * Each value specified through values is removed * from the attribute named by attrib. Any value of * the attribute not contained in the values array * will remain untouched. - * + * * All values are removed from the attribute named by * attrib. A values entry must * not be provided. - * + * * All current values of the attribute named by * attrib are replaced with the values specified * through values. - * + * * Note that any value for attrib must be a string, any * value for values must be an array of strings, and * any value for modtype must be one of the @@ -915,17 +915,17 @@ function ldap_mod_replace($link_identifier, string $dn, array $entry, array $ser * an additional value) to the attribute named by * attrib. * @throws LdapException - * + * */ function ldap_modify_batch($link_identifier, string $dn, array $entry, array $serverctrls = null): void { error_clear_last(); if ($serverctrls !== null) { $result = \ldap_modify_batch($link_identifier, $dn, $entry, $serverctrls); - }else { + } else { $result = \ldap_modify_batch($link_identifier, $dn, $entry); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -936,19 +936,19 @@ function ldap_modify_batch($link_identifier, string $dn, array $entry, array $se * ldap_next_attribute is made with the * result_entry_identifier returned from * ldap_first_attribute. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. - * @param resource $result_entry_identifier + * @param resource $result_entry_identifier * @return string Returns the next attribute in an entry on success and FALSE on * error. * @throws LdapException - * + * */ function ldap_next_attribute($link_identifier, $result_entry_identifier): string { error_clear_last(); $result = \ldap_next_attribute($link_identifier, $result_entry_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -957,13 +957,13 @@ function ldap_next_attribute($link_identifier, $result_entry_identifier): string /** * Parse LDAP extended operation data from result object result - * + * * @param resource $link An LDAP link identifier, returned by ldap_connect. * @param resource $result An LDAP result resource, returned by ldap_exop. * @param string $retdata Will be filled by the response data. * @param string $retoid Will be filled by the response OID. * @throws LdapException - * + * */ function ldap_parse_exop($link, $result, string &$retdata = null, string &$retoid = null): void { @@ -972,10 +972,10 @@ function ldap_parse_exop($link, $result, string &$retdata = null, string &$retoi $result = \ldap_parse_exop($link, $result, $retdata, $retoid); } elseif ($retdata !== null) { $result = \ldap_parse_exop($link, $result, $retdata); - }else { + } else { $result = \ldap_parse_exop($link, $result); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -983,7 +983,7 @@ function ldap_parse_exop($link, $result, string &$retdata = null, string &$retoi /** * Parses an LDAP search result. - * + * * @param resource $link An LDAP link identifier, returned by ldap_connect. * @param resource $result An LDAP result resource, returned by ldap_list or * ldap_search. @@ -996,9 +996,9 @@ function ldap_parse_exop($link, $result, string &$retdata = null, string &$retoi * @param array $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 $serverctrls + * @param array $serverctrls * @throws LdapException - * + * */ function ldap_parse_result($link, $result, int &$errcode, string &$matcheddn = null, string &$errmsg = null, array &$referrals = null, array &$serverctrls = null): void { @@ -1011,10 +1011,10 @@ function ldap_parse_result($link, $result, int &$errcode, string &$matcheddn = n $result = \ldap_parse_result($link, $result, $errcode, $matcheddn, $errmsg); } elseif ($matcheddn !== null) { $result = \ldap_parse_result($link, $result, $errcode, $matcheddn); - }else { + } else { $result = \ldap_parse_result($link, $result, $errcode); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -1024,20 +1024,20 @@ function ldap_parse_result($link, $result, int &$errcode, string &$matcheddn = n * Performs the search for a specified filter on the * directory with the scope LDAP_SCOPE_BASE. So it is * equivalent to reading an entry from the directory. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param string $base_dn The base DN for the directory. * @param string $filter An empty filter is not allowed. If you want to retrieve absolutely all - * information for this entry, use a filter of + * information for this entry, use a filter of * objectClass=*. If you know which entry types are * used on the directory server, you might use an appropriate filter such * as objectClass=inetOrgPerson. * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). * Note that the "dn" is always returned irrespective of which attributes * types are requested. - * + * * Using this parameter is much more efficient than the default action - * (which is to return all attributes and their associated values). + * (which is to return all attributes and their associated values). * The use of this parameter should therefore be considered good * practice. * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 @@ -1045,52 +1045,52 @@ function ldap_parse_result($link, $result, int &$errcode, string &$matcheddn = n * default behaviour. * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 * means no limit. - * + * * This parameter can NOT override server-side preset sizelimit. You can * set it lower though. - * + * * Some directory server hosts will be configured to return no more than * a preset number of entries. If this occurs, the server will indicate * that it has only returned a partial results set. This also occurs if * you use this parameter to limit the count of fetched entries. * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting * this to 0 means no limit. - * + * * This parameter can NOT override server-side preset timelimit. You can * set it lower though. * @param int $deref Specifies how aliases should be handled during the search. It can be * one of the following: - * - * - * + * + * + * * LDAP_DEREF_NEVER - (default) aliases are never * dereferenced. - * - * - * - * + * + * + * + * * LDAP_DEREF_SEARCHING - aliases should be * dereferenced during the search but not when locating the base object * of the search. - * - * - * - * + * + * + * + * * LDAP_DEREF_FINDING - aliases should be * dereferenced when locating the base object but not during the search. - * - * - * - * + * + * + * + * * LDAP_DEREF_ALWAYS - aliases should be dereferenced * always. - * - * - * - * @param array $serverctrls + * + * + * + * @param array $serverctrls * @return resource Returns a search result identifier . * @throws LdapException - * + * */ function ldap_read($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = null, int $sizelimit = null, int $timelimit = null, int $deref = null, array $serverctrls = null) { @@ -1107,10 +1107,10 @@ function ldap_read($link_identifier, string $base_dn, string $filter, array $att $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes, $attrsonly); } elseif ($attributes !== null) { $result = \ldap_read($link_identifier, $base_dn, $filter, $attributes); - }else { + } else { $result = \ldap_read($link_identifier, $base_dn, $filter); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -1119,50 +1119,50 @@ function ldap_read($link_identifier, string $base_dn, string $filter, array $att /** * The entry specified by dn is renamed/moved. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param string $dn The distinguished name of an LDAP entity. * @param string $newrdn The new RDN. * @param string $newparent The new parent/superior entry. * @param bool $deleteoldrdn 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 $serverctrls + * @param array $serverctrls * @throws LdapException - * + * */ function ldap_rename($link_identifier, string $dn, string $newrdn, string $newparent, bool $deleteoldrdn, array $serverctrls = null): void { error_clear_last(); if ($serverctrls !== null) { $result = \ldap_rename($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $serverctrls); - }else { + } else { $result = \ldap_rename($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } /** - * - * - * @param resource $link - * @param string $binddn - * @param string $password - * @param string $sasl_mech - * @param string $sasl_realm - * @param string $sasl_authc_id - * @param string $sasl_authz_id - * @param string $props + * + * + * @param resource $link + * @param string $binddn + * @param string $password + * @param string $sasl_mech + * @param string $sasl_realm + * @param string $sasl_authc_id + * @param string $sasl_authz_id + * @param string $props * @throws LdapException - * + * */ function ldap_sasl_bind($link, string $binddn = null, string $password = null, string $sasl_mech = null, string $sasl_realm = null, string $sasl_authc_id = null, string $sasl_authz_id = null, string $props = null): void { error_clear_last(); $result = \ldap_sasl_bind($link, $binddn, $password, $sasl_mech, $sasl_realm, $sasl_authc_id, $sasl_authz_id, $props); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -1172,7 +1172,7 @@ function ldap_sasl_bind($link, string $binddn = null, string $password = null, s * Performs the search for a specified filter on the directory with the scope * of LDAP_SCOPE_SUBTREE. This is equivalent to searching * the entire directory. - * + * * From 4.0.5 on it's also possible to do parallel searches. To do this * you use an array of link identifiers, rather than a single identifier, * as the first argument. If you don't want the same base DN and the @@ -1187,7 +1187,7 @@ function ldap_sasl_bind($link, string $binddn = null, string $password = null, s * returned when a search was made. There are some rare cases where the * normal search returns FALSE while the parallel search returns an * identifier. - * + * * @param resource|array $link_identifier An LDAP link identifier, returned by ldap_connect. * @param string $base_dn The base DN for the directory. * @param string $filter The search filter can be simple or advanced, using boolean operators in @@ -1197,9 +1197,9 @@ function ldap_sasl_bind($link, string $binddn = null, string $password = null, s * @param array $attributes An array of the required attributes, e.g. array("mail", "sn", "cn"). * Note that the "dn" is always returned irrespective of which attributes * types are requested. - * + * * Using this parameter is much more efficient than the default action - * (which is to return all attributes and their associated values). + * (which is to return all attributes and their associated values). * The use of this parameter should therefore be considered good * practice. * @param int $attrsonly Should be set to 1 if only attribute types are wanted. If set to 0 @@ -1207,52 +1207,52 @@ function ldap_sasl_bind($link, string $binddn = null, string $password = null, s * default behaviour. * @param int $sizelimit Enables you to limit the count of entries fetched. Setting this to 0 * means no limit. - * + * * This parameter can NOT override server-side preset sizelimit. You can * set it lower though. - * + * * Some directory server hosts will be configured to return no more than * a preset number of entries. If this occurs, the server will indicate * that it has only returned a partial results set. This also occurs if * you use this parameter to limit the count of fetched entries. * @param int $timelimit Sets the number of seconds how long is spend on the search. Setting * this to 0 means no limit. - * + * * This parameter can NOT override server-side preset timelimit. You can * set it lower though. * @param int $deref Specifies how aliases should be handled during the search. It can be * one of the following: - * - * - * + * + * + * * LDAP_DEREF_NEVER - (default) aliases are never * dereferenced. - * - * - * - * + * + * + * + * * LDAP_DEREF_SEARCHING - aliases should be * dereferenced during the search but not when locating the base object * of the search. - * - * - * - * + * + * + * + * * LDAP_DEREF_FINDING - aliases should be * dereferenced when locating the base object but not during the search. - * - * - * - * + * + * + * + * * LDAP_DEREF_ALWAYS - aliases should be dereferenced * always. - * - * - * - * @param array $serverctrls + * + * + * + * @param array $serverctrls * @return resource Returns a search result identifier . * @throws LdapException - * + * */ function ldap_search($link_identifier, string $base_dn, string $filter, array $attributes = null, int $attrsonly = null, int $sizelimit = null, int $timelimit = null, int $deref = null, array $serverctrls = null) { @@ -1269,10 +1269,10 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes, $attrsonly); } elseif ($attributes !== null) { $result = \ldap_search($link_identifier, $base_dn, $filter, $attributes); - }else { + } else { $result = \ldap_search($link_identifier, $base_dn, $filter); } - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } return $result; @@ -1281,164 +1281,164 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a /** * Sets the value of the specified option to be newval. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @param int $option The parameter option can be one of: - * - * - * - * + * + * + * + * * Option * Type * Available since - * - * - * - * + * + * + * + * * LDAP_OPT_DEREF * integer - * - * - * + * + * + * * LDAP_OPT_SIZELIMIT * integer - * - * - * + * + * + * * LDAP_OPT_TIMELIMIT * integer - * - * - * + * + * + * * LDAP_OPT_NETWORK_TIMEOUT * integer * PHP 5.3.0 - * - * + * + * * LDAP_OPT_PROTOCOL_VERSION * integer - * - * - * + * + * + * * LDAP_OPT_ERROR_NUMBER * integer - * - * - * + * + * + * * LDAP_OPT_REFERRALS * bool - * - * - * + * + * + * * LDAP_OPT_RESTART * bool - * - * - * + * + * + * * LDAP_OPT_HOST_NAME * string - * - * - * + * + * + * * LDAP_OPT_ERROR_STRING * string - * - * - * + * + * + * * LDAP_OPT_DIAGNOSTIC_MESSAGE * string - * - * - * + * + * + * * LDAP_OPT_MATCHED_DN * string - * - * - * + * + * + * * LDAP_OPT_SERVER_CONTROLS * array - * - * - * + * + * + * * LDAP_OPT_CLIENT_CONTROLS * array - * - * - * + * + * + * * LDAP_OPT_X_KEEPALIVE_IDLE * int * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_KEEPALIVE_PROBES * int * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_KEEPALIVE_INTERVAL * int * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_CACERTDIR * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_CACERTFILE * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_CERTFILE * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_CIPHER_SUITE * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_CRLCHECK * integer * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_CRLFILE * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_DHFILE * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_KEYFILE * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_PROTOCOL_MIN * integer * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_RANDOM_FILE * string * PHP 7.1.0 - * - * + * + * * LDAP_OPT_X_TLS_REQUIRE_CERT * integer * PHP 7.0.5 - * - * - * - * - * - * LDAP_OPT_SERVER_CONTROLS and + * + * + * + * + * + * LDAP_OPT_SERVER_CONTROLS and * LDAP_OPT_CLIENT_CONTROLS require a list of * controls, this means that the value must be an array of controls. A * control consists of an oid identifying the control, @@ -1453,13 +1453,13 @@ function ldap_search($link_identifier, string $base_dn, string $filter, array $a * for details. See also the second example below. * @param mixed $newval The new value for the specified option. * @throws LdapException - * + * */ function ldap_set_option($link_identifier, int $option, $newval): void { error_clear_last(); $result = \ldap_set_option($link_identifier, $option, $newval); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } @@ -1467,18 +1467,16 @@ function ldap_set_option($link_identifier, int $option, $newval): void /** * Unbinds from the LDAP directory. - * + * * @param resource $link_identifier An LDAP link identifier, returned by ldap_connect. * @throws LdapException - * + * */ function ldap_unbind($link_identifier): void { error_clear_last(); $result = \ldap_unbind($link_identifier); - if ($result === FALSE) { + if ($result === false) { throw LdapException::createFromPhpError(); } } - - diff --git a/generated/libevent.php b/generated/libevent.php index 7bde986b..2eea8fe7 100644 --- a/generated/libevent.php +++ b/generated/libevent.php @@ -13,17 +13,17 @@ * and event_base_set functions. If the * event already has a timeout set, it is replaced by * the new one. - * + * * @param resource $event Valid event resource. * @param int $timeout Optional timeout (in microseconds). * @throws LibeventException - * + * */ function event_add($event, int $timeout = -1): void { error_clear_last(); $result = \event_add($event, $timeout); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -32,16 +32,16 @@ function event_add($event, int $timeout = -1): void /** * Abort the active event loop immediately. The behaviour is similar to * break statement. - * + * * @param resource $event_base Valid event base resource. * @throws LibeventException - * + * */ function event_base_loopbreak($event_base): void { error_clear_last(); $result = \event_base_loopbreak($event_base); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -50,36 +50,36 @@ function event_base_loopbreak($event_base): void /** * The next event loop iteration after the given timer expires will complete * normally, then exit without blocking for events again. - * + * * @param resource $event_base Valid event base resource. * @param int $timeout Optional timeout parameter (in microseconds). * @throws LibeventException - * + * */ function event_base_loopexit($event_base, int $timeout = -1): void { error_clear_last(); $result = \event_base_loopexit($event_base, $timeout); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } /** - * Returns new event base, which can be used later in event_base_set, + * Returns new event base, which can be used later in event_base_set, * event_base_loop and other functions. - * + * * @return resource event_base_new returns valid event base resource on * success . * @throws LibeventException - * + * */ function event_base_new() { error_clear_last(); $result = \event_base_new(); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } return $result; @@ -88,22 +88,22 @@ function event_base_new() /** * Sets the number of different event priority levels. - * + * * By default all events are scheduled with the same priority - * (npriorities/2). - * Using event_base_priority_init you can change the number + * (npriorities/2). + * Using event_base_priority_init you can change the number * of event priority levels and then set a desired priority for each event. - * + * * @param resource $event_base Valid event base resource. * @param int $npriorities The number of event priority levels. * @throws LibeventException - * + * */ function event_base_priority_init($event_base, int $npriorities): void { error_clear_last(); $result = \event_base_priority_init($event_base, $npriorities); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -113,16 +113,16 @@ function event_base_priority_init($event_base, int $npriorities): void * Some event mechanisms do not survive across fork. The * event_base needs to be reinitialized with this * function. - * + * * @param resource $event_base Valid event base resource that needs to be re-initialized. * @throws LibeventException - * + * */ function event_base_reinit($event_base): void { error_clear_last(); $result = \event_base_reinit($event_base); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -131,17 +131,17 @@ function event_base_reinit($event_base): void /** * Associates the event_base with the * event. - * + * * @param resource $event Valid event resource. * @param resource $event_base Valid event base resource. * @throws LibeventException - * + * */ function event_base_set($event, $event_base): void { error_clear_last(); $result = \event_base_set($event, $event_base); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -150,17 +150,17 @@ function event_base_set($event, $event_base): void /** * Assign the specified bevent to the * event_base. - * + * * @param resource $bevent Valid buffered event resource. * @param resource $event_base Valid event base resource. * @throws LibeventException - * + * */ function event_buffer_base_set($bevent, $event_base): void { error_clear_last(); $result = \event_buffer_base_set($bevent, $event_base); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -168,18 +168,18 @@ function event_buffer_base_set($bevent, $event_base): void /** * Disables the specified buffered event. - * + * * @param resource $bevent Valid buffered event resource. * @param int $events Any combination of EV_READ and * EV_WRITE. * @throws LibeventException - * + * */ function event_buffer_disable($bevent, int $events): void { error_clear_last(); $result = \event_buffer_disable($bevent, $events); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -187,18 +187,18 @@ function event_buffer_disable($bevent, int $events): void /** * Enables the specified buffered event. - * + * * @param resource $bevent Valid buffered event resource. * @param int $events Any combination of EV_READ and * EV_WRITE. * @throws LibeventException - * + * */ function event_buffer_enable($bevent, int $events): void { error_clear_last(); $result = \event_buffer_enable($bevent, $events); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -209,11 +209,11 @@ function event_buffer_enable($bevent, int $events): void * Using buffered event you don't need to deal with the I/O manually, instead * it provides input and output buffers that get filled and drained * automatically. - * + * * @param resource $stream Valid PHP stream resource. Must be castable to file descriptor. * @param mixed $readcb Callback to invoke where there is data to read, or NULL if * no callback is desired. - * @param mixed $writecb Callback to invoke where the descriptor is ready for writing, + * @param mixed $writecb Callback to invoke where the descriptor is ready for writing, * or NULL if no callback is desired. * @param mixed $errorcb Callback to invoke where there is an error on the descriptor, cannot be * NULL. @@ -221,17 +221,17 @@ function event_buffer_enable($bevent, int $events): void * @return resource event_buffer_new returns new buffered event resource * on success . * @throws LibeventException - * + * */ function event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg = null) { error_clear_last(); if ($arg !== null) { $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg); - }else { + } else { $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb); } - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } return $result; @@ -240,18 +240,18 @@ function event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg = null) /** * Assign a priority to the bevent. - * + * * @param resource $bevent Valid buffered event resource. * @param int $priority Priority level. Cannot be less than zero and cannot exceed maximum * priority level of the event base (see event_base_priority_init). * @throws LibeventException - * + * */ function event_buffer_priority_set($bevent, int $priority): void { error_clear_last(); $result = \event_buffer_priority_set($bevent, $priority); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -259,27 +259,27 @@ function event_buffer_priority_set($bevent, int $priority): void /** * Sets or changes existing callbacks for the buffered event. - * + * * @param resource $event Valid buffered event resource. * @param mixed $readcb Callback to invoke where there is data to read, or NULL if * no callback is desired. - * @param mixed $writecb Callback to invoke where the descriptor is ready for writing, + * @param mixed $writecb Callback to invoke where the descriptor is ready for writing, * or NULL if no callback is desired. * @param mixed $errorcb Callback to invoke where there is an error on the descriptor, cannot be * NULL. * @param mixed $arg An argument that will be passed to each of the callbacks (optional). * @throws LibeventException - * + * */ function event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg = null): void { error_clear_last(); if ($arg !== null) { $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg); - }else { + } else { $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb); } - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -289,19 +289,19 @@ function event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg = n * Writes data to the specified buffered event. The data is appended to the * output buffer and written to the descriptor when it becomes available for * writing. - * + * * @param resource $bevent Valid buffered event resource. * @param string $data The data to be written. * @param int $data_size Optional size parameter. event_buffer_write writes * all the data by default. * @throws LibeventException - * + * */ function event_buffer_write($bevent, string $data, int $data_size = -1): void { error_clear_last(); $result = \event_buffer_write($bevent, $data, $data_size); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -309,16 +309,16 @@ function event_buffer_write($bevent, string $data, int $data_size = -1): void /** * Cancels the event. - * + * * @param resource $event Valid event resource. * @throws LibeventException - * + * */ function event_del($event): void { error_clear_last(); $result = \event_del($event); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -326,16 +326,16 @@ function event_del($event): void /** * Creates and returns a new event resource. - * + * * @return resource event_new returns a new event resource on success . * @throws LibeventException - * + * */ function event_new() { error_clear_last(); $result = \event_new(); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } return $result; @@ -344,19 +344,19 @@ function event_new() /** * Assign a priority to the event. - * + * * @param resource $event Valid event resource. * @param int $priority Priority level. Cannot be less than zero and cannot exceed maximum * priority level of the event base (see * event_base_priority_init). * @throws LibeventException - * + * */ function event_priority_set($event, int $priority): void { error_clear_last(); $result = \event_priority_set($event, $priority); - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -364,51 +364,51 @@ function event_priority_set($event, int $priority): void /** * Prepares the event to be used in event_add. The event - * is prepared to call the function specified by the callback + * is prepared to call the function specified by the callback * on the events specified in parameter events, which - * is a set of the following flags: EV_TIMEOUT, - * EV_SIGNAL, EV_READ, + * is a set of the following flags: EV_TIMEOUT, + * EV_SIGNAL, EV_READ, * EV_WRITE and EV_PERSIST. - * + * * If EV_SIGNAL bit is set in parameter events, * the fd is interpreted as signal number. - * + * * After initializing the event, use event_base_set to * associate the event with its event base. - * + * * In case of matching event, these three arguments are passed to the - * callback function: - * - * + * callback function: + * + * * fd - * - * + * + * * Signal number or resource indicating the stream. - * - * - * - * + * + * + * + * * events - * - * + * + * * A flag indicating the event. Consists of the following flags: - * EV_TIMEOUT, EV_SIGNAL, + * EV_TIMEOUT, EV_SIGNAL, * EV_READ, EV_WRITE * and EV_PERSIST. - * - * - * - * + * + * + * + * * arg - * - * + * + * * Optional parameter, previously passed to event_set * as arg. - * - * - * - * - * + * + * + * + * + * * @param resource $event Valid event resource. * @param mixed $fd Valid PHP stream resource. The stream must be castable to file * descriptor, so you most likely won't be able to use any of filtered @@ -421,17 +421,17 @@ function event_priority_set($event, int $priority): void * @param mixed $callback Callback function to be called when the matching event occurs. * @param mixed $arg Optional callback parameter. * @throws LibeventException - * + * */ function event_set($event, $fd, int $events, $callback, $arg = null): void { error_clear_last(); if ($arg !== null) { $result = \event_set($event, $fd, $events, $callback, $arg); - }else { + } else { $result = \event_set($event, $fd, $events, $callback); } - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } @@ -441,58 +441,56 @@ function event_set($event, $fd, int $events, $callback, $arg = null): void * Prepares the timer event to be used in event_add. The * event is prepared to call the function specified by the * callback when the event timeout elapses. - * + * * After initializing the event, use event_base_set to * associate the event with its event base. - * + * * In case of matching event, these three arguments are passed to the * callback function: - * - * + * + * * fd - * - * + * + * * Signal number or resource indicating the stream. - * - * - * - * + * + * + * + * * events - * - * + * + * * A flag indicating the event. This will always be * EV_TIMEOUT for timer events. - * - * - * - * + * + * + * + * * arg - * - * + * + * * Optional parameter, previously passed to * event_timer_set as arg. - * - * - * - * - * + * + * + * + * + * * @param resource $event Valid event resource. * @param callable $callback Callback function to be called when the matching event occurs. * @param mixed $arg Optional callback parameter. * @throws LibeventException - * + * */ function event_timer_set($event, callable $callback, $arg = null): void { error_clear_last(); if ($arg !== null) { $result = \event_timer_set($event, $callback, $arg); - }else { + } else { $result = \event_timer_set($event, $callback); } - if ($result === FALSE) { + if ($result === false) { throw LibeventException::createFromPhpError(); } } - - diff --git a/generated/libxml.php b/generated/libxml.php index d3c9cbef..bec015a9 100644 --- a/generated/libxml.php +++ b/generated/libxml.php @@ -6,21 +6,19 @@ /** * Changes the default external entity loader. - * + * * @param callable $resolver_function A callable that takes three arguments. Two strings, a public id * and system id, and a context (an array with four keys) as the third argument. * This callback should return a resource, a string from which a resource can be * opened, or NULL. * @throws LibxmlException - * + * */ function libxml_set_external_entity_loader(callable $resolver_function): void { error_clear_last(); $result = \libxml_set_external_entity_loader($resolver_function); - if ($result === FALSE) { + if ($result === false) { throw LibxmlException::createFromPhpError(); } } - - diff --git a/generated/lzf.php b/generated/lzf.php index 61ddfabd..21c622a0 100644 --- a/generated/lzf.php +++ b/generated/lzf.php @@ -7,17 +7,17 @@ /** * lzf_compress compresses the given * data string using LZF encoding. - * + * * @param string $data The string to compress. * @return string Returns the compressed data . * @throws LzfException - * + * */ function lzf_compress(string $data): string { error_clear_last(); $result = \lzf_compress($data); - if ($result === FALSE) { + if ($result === false) { throw LzfException::createFromPhpError(); } return $result; @@ -27,20 +27,18 @@ function lzf_compress(string $data): string /** * lzf_compress decompresses the given * data string containing lzf encoded data. - * + * * @param string $data The compressed string. * @return string Returns the decompressed data . * @throws LzfException - * + * */ function lzf_decompress(string $data): string { error_clear_last(); $result = \lzf_decompress($data); - if ($result === FALSE) { + if ($result === false) { throw LzfException::createFromPhpError(); } return $result; } - - diff --git a/generated/mailparse.php b/generated/mailparse.php index 69f33979..6e3760f1 100644 --- a/generated/mailparse.php +++ b/generated/mailparse.php @@ -6,37 +6,37 @@ /** * Extracts/decodes a message section from the supplied filename. - * + * * The contents of the section will be decoded according to their transfer * encoding - base64, quoted-printable and uuencoded text are supported. - * + * * @param resource $mimemail A valid MIME resource, created with * mailparse_msg_create. * @param mixed $filename Can be a file name or a valid stream resource. * @param callable $callbackfunc If set, this must be either a valid callback that will be passed the * extracted section, or NULL to make this function return the * extracted section. - * + * * If not specified, the contents will be sent to "stdout". * @return string If callbackfunc is not NULL returns TRUE on * success. - * + * * If callbackfunc is set to NULL, returns the * extracted section as a string. - * + * * Returns FALSE on error. * @throws MailparseException - * + * */ function mailparse_msg_extract_part_file($mimemail, $filename, callable $callbackfunc = null): string { error_clear_last(); if ($callbackfunc !== null) { $result = \mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc); - }else { + } else { $result = \mailparse_msg_extract_part_file($mimemail, $filename); } - if ($result === FALSE) { + if ($result === false) { throw MailparseException::createFromPhpError(); } return $result; @@ -45,18 +45,18 @@ function mailparse_msg_extract_part_file($mimemail, $filename, callable $callbac /** * Frees a MIME resource. - * + * * @param resource $mimemail A valid MIME resource allocated by - * mailparse_msg_create or + * mailparse_msg_create or * mailparse_msg_parse_file. * @throws MailparseException - * + * */ function mailparse_msg_free($mimemail): void { error_clear_last(); $result = \mailparse_msg_free($mimemail); - if ($result === FALSE) { + if ($result === false) { throw MailparseException::createFromPhpError(); } } @@ -65,18 +65,18 @@ function mailparse_msg_free($mimemail): void /** * Parses a file. * This is the optimal way of parsing a mail file that you have on disk. - * + * * @param string $filename Path to the file holding the message. * The file is opened and streamed through the parser. * @return resource Returns a MIME resource representing the structure, . * @throws MailparseException - * + * */ function mailparse_msg_parse_file(string $filename) { error_clear_last(); $result = \mailparse_msg_parse_file($filename); - if ($result === FALSE) { + if ($result === false) { throw MailparseException::createFromPhpError(); } return $result; @@ -85,43 +85,41 @@ function mailparse_msg_parse_file(string $filename) /** * Incrementally parse data into the supplied mime mail resource. - * + * * This function allow you to stream portions of a file at a time, rather * than read and parse the whole thing. - * + * * @param resource $mimemail A valid MIME resource. - * @param string $data + * @param string $data * @throws MailparseException - * + * */ function mailparse_msg_parse($mimemail, string $data): void { error_clear_last(); $result = \mailparse_msg_parse($mimemail, $data); - if ($result === FALSE) { + if ($result === false) { throw MailparseException::createFromPhpError(); } } /** - * Streams data from the source file pointer, apply + * Streams data from the source file pointer, apply * encoding and write to the destination file pointer. - * + * * @param resource $sourcefp A valid file handle. The file is streamed through the parser. * @param resource $destfp The destination file handle in which the encoded data will be written. * @param string $encoding One of the character encodings supported by the * mbstring module. * @throws MailparseException - * + * */ function mailparse_stream_encode($sourcefp, $destfp, string $encoding): void { error_clear_last(); $result = \mailparse_stream_encode($sourcefp, $destfp, $encoding); - if ($result === FALSE) { + if ($result === false) { throw MailparseException::createFromPhpError(); } } - - diff --git a/generated/mbstring.php b/generated/mbstring.php index 41a23468..c3115cd3 100644 --- a/generated/mbstring.php +++ b/generated/mbstring.php @@ -7,41 +7,41 @@ /** * Checks if the specified byte stream is valid for the specified encoding. * It is useful to prevent so-called "Invalid Encoding Attack". - * + * * @param string $var The byte stream to check. If it is omitted, this function checks * all the input from the beginning of the request. * @param string $encoding The expected encoding. * @throws MbstringException - * + * */ function mb_check_encoding(string $var = null, string $encoding = null): void { error_clear_last(); $result = \mb_check_encoding($var, $encoding); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } } /** - * - * - * @param int $cp - * @param string $encoding + * + * + * @param int $cp + * @param string $encoding * @return string Returns a specific character . * @throws MbstringException - * + * */ function mb_chr(int $cp, string $encoding = null): string { error_clear_last(); if ($encoding !== null) { $result = \mb_chr($cp, $encoding); - }else { + } else { $result = \mb_chr($cp); } - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -50,18 +50,18 @@ function mb_chr(int $cp, string $encoding = null): string /** * 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, - * + * * @throws MbstringException - * + * */ function mb_encoding_aliases(string $encoding): array { error_clear_last(); $result = \mb_encoding_aliases($encoding); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -72,19 +72,19 @@ function mb_encoding_aliases(string $encoding): array * Scans string for matches to * pattern, then replaces the matched text * with the output of callback function. - * - * The behavior of this function is almost identical to mb_ereg_replace, + * + * The behavior of this function is almost identical to mb_ereg_replace, * except for the fact that instead of * replacement parameter, one should specify a * callback. - * + * * @param string $pattern The regular expression pattern. - * + * * Multibyte characters may be used in pattern. * @param string $callback A callback that will be called and passed an array of matched elements * in the subject string. The callback should * return the replacement string. - * + * * You'll often need the callback function * for a mb_ereg_replace_callback in just one place. * In this case you can use an @@ -98,13 +98,13 @@ function mb_encoding_aliases(string $encoding): array * @param string $option The search option. See mb_regex_set_options for explanation. * @return string The resultant string on success, . * @throws MbstringException - * + * */ function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, string $option = "msr"): string { error_clear_last(); $result = \mb_ereg_replace_callback($pattern, $callback, $string, $option); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -112,23 +112,23 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s /** - * - * + * + * * @param string $pattern The regular expression pattern. - * + * * Multibyte characters may be used in pattern. * @param string $replacement The replacement text. * @param string $string The string being checked. - * @param string $option + * @param string $option * @return string The resultant string on success, . * @throws MbstringException - * + * */ function mb_ereg_replace(string $pattern, string $replacement, string $string, string $option = "msr"): string { error_clear_last(); $result = \mb_ereg_replace($pattern, $replacement, $string, $option); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -136,17 +136,17 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, s /** - * - * - * @return array + * + * + * @return array * @throws MbstringException - * + * */ function mb_ereg_search_getregs(): array { error_clear_last(); $result = \mb_ereg_search_getregs(); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -160,12 +160,12 @@ function mb_ereg_search_getregs(): array * mb_ereg_search, * mb_ereg_search_pos, and * mb_ereg_search_regs. - * + * * @param string $string The search string. * @param string $pattern The search pattern. * @param string $option The search option. See mb_regex_set_options for explanation. * @throws MbstringException - * + * */ function mb_ereg_search_init(string $string, string $pattern = null, string $option = "msr"): void { @@ -174,10 +174,10 @@ function mb_ereg_search_init(string $string, string $pattern = null, string $opt $result = \mb_ereg_search_init($string, $pattern, $option); } elseif ($pattern !== null) { $result = \mb_ereg_search_init($string, $pattern); - }else { + } else { $result = \mb_ereg_search_init($string); } - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } } @@ -185,12 +185,12 @@ function mb_ereg_search_init(string $string, string $pattern = null, string $opt /** * Returns the matched part of a multibyte regular expression. - * + * * @param string $pattern The search pattern. * @param string $option The search option. See mb_regex_set_options for explanation. - * @return array + * @return array * @throws MbstringException - * + * */ function mb_ereg_search_regs(string $pattern = null, string $option = "ms"): array { @@ -199,10 +199,10 @@ function mb_ereg_search_regs(string $pattern = null, string $option = "ms"): arr $result = \mb_ereg_search_regs($pattern, $option); } elseif ($pattern !== null) { $result = \mb_ereg_search_regs($pattern); - }else { + } else { $result = \mb_ereg_search_regs(); } - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -210,38 +210,38 @@ function mb_ereg_search_regs(string $pattern = null, string $option = "ms"): arr /** - * - * + * + * * @param int $position The position to set. If it is negative, it counts from the end of the string. * @throws MbstringException - * + * */ function mb_ereg_search_setpos(int $position): void { error_clear_last(); $result = \mb_ereg_search_setpos($position); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } } /** - * - * + * + * * @param string $pattern The regular expression pattern. Multibyte characters may be used. The case will be ignored. * @param string $replace The replacement text. * @param string $string The searched string. - * @param string $option + * @param string $option * @return string The resultant string . * @throws MbstringException - * + * */ function mb_eregi_replace(string $pattern, string $replace, string $string, string $option = "msri"): string { error_clear_last(); $result = \mb_eregi_replace($pattern, $replace, $string, $option); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -251,26 +251,26 @@ function mb_eregi_replace(string $pattern, string $replace, string $string, stri /** * Set/Get the HTTP output character encoding. * Output after this function is called will be converted from the set internal encoding to encoding. - * + * * @param string $encoding If encoding is set, * mb_http_output sets the HTTP output character * encoding to encoding. - * + * * If encoding is omitted, * mb_http_output returns the current HTTP output * character encoding. * @return string If encoding is omitted, * mb_http_output returns the current HTTP output - * character encoding. Otherwise, + * character encoding. Otherwise, * Returns TRUE on success . * @throws MbstringException - * + * */ function mb_http_output(string $encoding = null) { error_clear_last(); $result = \mb_http_output($encoding); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -279,25 +279,25 @@ function mb_http_output(string $encoding = null) /** * Set/Get the internal character encoding - * - * @param string $encoding encoding is the character encoding name - * used for the HTTP input character encoding conversion, HTTP output - * character encoding conversion, and the default character encoding + * + * @param string $encoding encoding is the character encoding name + * used for the HTTP input character encoding conversion, HTTP output + * character encoding conversion, and the default character encoding * for string functions defined by the mbstring module. * You should notice that the internal encoding is totally different from the one for multibyte regex. - * @return string If encoding is set, then + * @return string If encoding is set, then * Returns TRUE on success . * In this case, the character encoding for multibyte regex is NOT changed. - * If encoding is omitted, then + * If encoding is omitted, then * the current character encoding name is returned. * @throws MbstringException - * + * */ function mb_internal_encoding(string $encoding = null) { error_clear_last(); $result = \mb_internal_encoding($encoding); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -305,23 +305,23 @@ function mb_internal_encoding(string $encoding = null) /** - * - * - * @param string $str - * @param string $encoding + * + * + * @param string $str + * @param string $encoding * @return int Returns a code point of character . * @throws MbstringException - * + * */ function mb_ord(string $str, string $encoding = null): int { error_clear_last(); if ($encoding !== null) { $result = \mb_ord($str, $encoding); - }else { + } else { $result = \mb_ord($str); } - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -335,21 +335,21 @@ function mb_ord(string $str, string $encoding = null): int * encoded data, detects encoding, converts coding to internal * encoding and set values to the result array or * global variables. - * + * * @param string $encoded_string The URL encoded data. * @param array $result An array containing decoded and character encoded converted values. * @throws MbstringException - * + * */ function mb_parse_str(string $encoded_string, array &$result = null): void { error_clear_last(); if ($result !== null) { $result = \mb_parse_str($encoded_string, $result); - }else { + } else { $result = \mb_parse_str($encoded_string); } - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } } @@ -357,19 +357,19 @@ function mb_parse_str(string $encoded_string, array &$result = null): void /** * Set/Get character encoding for a multibyte regex. - * + * * @param string $encoding The encoding * parameter is the character encoding. If it is omitted, the internal character * encoding value will be used. - * @return string + * @return string * @throws MbstringException - * + * */ function mb_regex_encoding(string $encoding = null) { error_clear_last(); $result = \mb_regex_encoding($encoding); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } return $result; @@ -380,33 +380,33 @@ function mb_regex_encoding(string $encoding = null) * Sends email. Headers and messages are converted and encoded according * to the mb_language setting. It's a wrapper function * for mail, so see also mail for details. - * + * * @param string $to The mail addresses being sent to. Multiple * recipients may be specified by putting a comma between each - * address in to. + * address in to. * This parameter is not automatically encoded. * @param string $subject The subject of the mail. * @param string $message The message of the mail. * @param string $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). * Validate parameter not to be injected unwanted headers by attackers. - * + * * If an array is passed, its keys are the header names and its * values are the respective header values. - * + * * When sending mail, the mail must contain - * a From header. This can be set with the + * a From header. This can be set with the * additional_headers parameter, or a default * can be set in php.ini. - * + * * Failing to do this will result in an error * message similar to Warning: mail(): "sendmail_from" not * set in php.ini or custom "From:" header missing. * The From header sets also * Return-Path under Windows. - * + * * If messages are not received, try using a LF (\n) only. * Some Unix mail transfer agents (most notably * qmail) replace LF by CRLF @@ -416,30 +416,28 @@ function mb_regex_encoding(string $encoding = null) * @param string $additional_parameter additional_parameter is a MTA command line * parameter. It is useful when setting the correct Return-Path * header when using sendmail. - * + * * This parameter is escaped by escapeshellcmd internally * to prevent command execution. escapeshellcmd prevents * command execution, but allows to add addtional parameters. For security reason, * this parameter should be validated. - * + * * Since escapeshellcmd is applied automatically, some characters * that are allowed as email addresses by internet RFCs cannot be used. Programs * that are required to use these characters mail cannot be used. - * + * * The user that the webserver runs as should be added as a trusted user to the * sendmail configuration to prevent a 'X-Warning' header from being added * to the message when the envelope sender (-f) is set using this method. * For sendmail users, this file is /etc/mail/trusted-users. * @throws MbstringException - * + * */ function mb_send_mail(string $to, string $subject, string $message, $additional_headers = null, string $additional_parameter = null): void { error_clear_last(); $result = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_parameter); - if ($result === FALSE) { + if ($result === false) { throw MbstringException::createFromPhpError(); } } - - diff --git a/generated/misc.php b/generated/misc.php index e728baef..e133c7ea 100644 --- a/generated/misc.php +++ b/generated/misc.php @@ -6,29 +6,29 @@ /** * Defines a named constant at runtime. - * + * * @param string $name The name of the constant. * @param mixed $value The value of the constant. In PHP 5, value must * be a scalar value (integer, * float, string, boolean, or * NULL). In PHP 7, array values are also accepted. - * + * * While it is possible to define resource constants, it is * not recommended and may cause unpredictable behavior. - * @param bool $case_insensitive If set to TRUE, the constant will be defined case-insensitive. - * The default behavior is case-sensitive; i.e. + * @param bool $case_insensitive If set to TRUE, the constant will be defined case-insensitive. + * The default behavior is case-sensitive; i.e. * CONSTANT and Constant represent * different values. - * + * * Case-insensitive constants are stored as lower-case. * @throws MiscException - * + * */ function define(string $name, $value, bool $case_insensitive = false): void { error_clear_last(); $result = \define($name, $value, $case_insensitive); - if ($result === FALSE) { + if ($result === false) { throw MiscException::createFromPhpError(); } } @@ -36,16 +36,16 @@ function define(string $name, $value, bool $case_insensitive = false): void /** * Set the codepage of the current process. - * + * * @param int $cp A codepage identifier. * @throws MiscException - * + * */ function sapi_windows_cp_set(int $cp): void { error_clear_last(); $result = \sapi_windows_cp_set($cp); - if ($result === FALSE) { + if ($result === false) { throw MiscException::createFromPhpError(); } } @@ -53,37 +53,37 @@ function sapi_windows_cp_set(int $cp): void /** * If enable is omitted, the function return TRUE if the stream stream has has VT100 control codes enabled, FALSE otherwise. - * + * * If enable is specified, the function will try to enable or disable the VT100 features of the stream stream. * If the feature has been successfully enabled (or disabled), . - * + * * At startup, PHP tries to enable the VT100 feature of the STDOUT/STDERR streams. By the way, if those streams are redirected to a file, the VT100 features may not be enabled. - * + * * @param resource $stream The stream on which the function will operate. * @param bool $enable If specified, the VT100 feature will be enabled (if TRUE) or disabled (if FALSE). * @throws MiscException - * + * */ function sapi_windows_vt100_support($stream, bool $enable = null): void { error_clear_last(); if ($enable !== null) { $result = \sapi_windows_vt100_support($stream, $enable); - }else { + } else { $result = \sapi_windows_vt100_support($stream); } - if ($result === FALSE) { + if ($result === false) { throw MiscException::createFromPhpError(); } } /** - * - * + * + * * @param int $seconds Halt time in seconds. * @return int Returns zero on success, . - * + * * If the call was interrupted by a signal, sleep returns * a non-zero value. On Windows, this value will always be * 192 (the value of the @@ -91,13 +91,13 @@ function sapi_windows_vt100_support($stream, bool $enable = null): void * On other platforms, the return value will be the number of seconds left to * sleep. * @throws MiscException - * + * */ function sleep(int $seconds): int { error_clear_last(); $result = \sleep($seconds); - if ($result === FALSE) { + if ($result === false) { throw MiscException::createFromPhpError(); } return $result; @@ -107,35 +107,35 @@ function sleep(int $seconds): int /** * Delays program execution for the given number of * seconds and nanoseconds. - * + * * @param int $seconds Must be a non-negative integer. * @param int $nanoseconds Must be a non-negative integer less than 1 billion. * @return array Returns TRUE on success . - * + * * If the delay was interrupted by a signal, an associative array will be * returned with the components: - * - * - * + * + * + * * seconds - number of seconds remaining in * the delay - * - * - * - * + * + * + * + * * nanoseconds - number of nanoseconds * remaining in the delay - * - * - * + * + * + * * @throws MiscException - * + * */ function time_nanosleep(int $seconds, int $nanoseconds) { error_clear_last(); $result = \time_nanosleep($seconds, $nanoseconds); - if ($result === FALSE) { + if ($result === false) { throw MiscException::createFromPhpError(); } return $result; @@ -145,18 +145,16 @@ function time_nanosleep(int $seconds, int $nanoseconds) /** * Makes the script sleep until the specified * timestamp. - * + * * @param float $timestamp The timestamp when the script should wake. * @throws MiscException - * + * */ function time_sleep_until(float $timestamp): void { error_clear_last(); $result = \time_sleep_until($timestamp); - if ($result === FALSE) { + if ($result === false) { throw MiscException::createFromPhpError(); } } - - diff --git a/generated/msql.php b/generated/msql.php index bec50cf4..0bbc2289 100644 --- a/generated/msql.php +++ b/generated/msql.php @@ -7,19 +7,19 @@ /** * Returns number of affected rows by the last SELECT, UPDATE or DELETE * query associated with result. - * + * * @param resource $result The result resource that * is being evaluated. This result comes from a call to * msql_query. * @return int Returns the number of affected rows on success, . * @throws MsqlException - * + * */ function msql_affected_rows($result): int { error_clear_last(); $result = \msql_affected_rows($result); - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -27,69 +27,69 @@ function msql_affected_rows($result): int /** - * msql_close closes the non-persistent connection to + * msql_close closes the non-persistent connection to * the mSQL server that's associated with the specified link identifier. - * + * * Using msql_close isn't usually necessary, as - * non-persistent open links are automatically closed at the end of the + * non-persistent open links are automatically closed at the end of the * script's execution. See also freeing resources. - * + * * @param resource|null $link_identifier The mSQL connection. * If not specified, the last link opened by msql_connect * is assumed. If no such link is found, the function will try to establish a * link as if msql_connect was called, and use it. * @throws MsqlException - * + * */ function msql_close($link_identifier = null): void { error_clear_last(); if ($link_identifier !== null) { $result = \msql_close($link_identifier); - }else { + } else { $result = \msql_close(); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } } /** - * msql_connect establishes a connection to a mSQL + * msql_connect establishes a connection to a mSQL * server. - * + * * If a second call is made to msql_connect with - * the same arguments, no new link will be established, but instead, the + * the same arguments, no new link will be established, but instead, the * link identifier of the already opened link will be returned. - * - * The link to the server will be closed as soon as the execution of the + * + * The link to the server will be closed as soon as the execution of the * script ends, unless it's closed earlier by explicitly calling * msql_close. - * - * @param string $hostname The hostname can also include a port number. e.g. + * + * @param string $hostname The hostname can also include a port number. e.g. * hostname,port. - * + * * If not specified, the connection is established by the means of a Unix - * domain socket, being then more efficient then a localhost TCP socket + * domain socket, being then more efficient then a localhost TCP socket * connection. - * + * * While this function will accept a colon (:) as a * host/port separator, a comma (,) is the preferred * method. * @return resource Returns a positive mSQL link identifier on success, . * @throws MsqlException - * + * */ function msql_connect(string $hostname = null) { error_clear_last(); if ($hostname !== null) { $result = \msql_connect($hostname); - }else { + } else { $result = \msql_connect(); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -97,26 +97,26 @@ function msql_connect(string $hostname = null) /** - * msql_create_db attempts to create a new database on + * msql_create_db attempts to create a new database on * the mSQL server. - * + * * @param string $database_name The name of the mSQL database. * @param resource|null $link_identifier The mSQL connection. * If not specified, the last link opened by msql_connect * is assumed. If no such link is found, the function will try to establish a * link as if msql_connect was called, and use it. * @throws MsqlException - * + * */ function msql_create_db(string $database_name, $link_identifier = null): void { error_clear_last(); if ($link_identifier !== null) { $result = \msql_create_db($database_name, $link_identifier); - }else { + } else { $result = \msql_create_db($database_name); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } } @@ -128,19 +128,19 @@ function msql_create_db(string $database_name, $link_identifier = null): void * identifier to point to the specified row number. The next call * to msql_fetch_row would return that * row. - * + * * @param resource $result The result resource that * is being evaluated. This result comes from a call to * msql_query. * @param int $row_number The seeked row number. * @throws MsqlException - * + * */ function msql_data_seek($result, int $row_number): void { error_clear_last(); $result = \msql_data_seek($result, $row_number); - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } } @@ -149,7 +149,7 @@ function msql_data_seek($result, int $row_number): void /** * msql_db_query selects a database and executes a query * on it. - * + * * @param string $database The name of the mSQL database. * @param string $query The SQL query. * @param resource|null $link_identifier The mSQL connection. @@ -158,17 +158,17 @@ function msql_data_seek($result, int $row_number): void * link as if msql_connect was called, and use it. * @return resource Returns a positive mSQL query identifier to the query result, . * @throws MsqlException - * + * */ function msql_db_query(string $database, string $query, $link_identifier = null) { error_clear_last(); if ($link_identifier !== null) { $result = \msql_db_query($database, $query, $link_identifier); - }else { + } else { $result = \msql_db_query($database, $query); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -178,33 +178,33 @@ function msql_db_query(string $database, string $query, $link_identifier = null) /** * msql_drop_db attempts to drop (remove) a database * from the mSQL server. - * + * * @param string $database_name The name of the database. * @param resource|null $link_identifier The mSQL connection. * If not specified, the last link opened by msql_connect * is assumed. If no such link is found, the function will try to establish a * link as if msql_connect was called, and use it. * @throws MsqlException - * + * */ function msql_drop_db(string $database_name, $link_identifier = null): void { error_clear_last(); if ($link_identifier !== null) { $result = \msql_drop_db($database_name, $link_identifier); - }else { + } else { $result = \msql_drop_db($database_name); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } } /** - * msql_field_len returns the length of the specified + * msql_field_len returns the length of the specified * field. - * + * * @param resource $result The result resource that * is being evaluated. This result comes from a call to * msql_query. @@ -212,13 +212,13 @@ function msql_drop_db(string $database_name, $link_identifier = null): void * field_offset starts at 1. * @return int Returns the length of the specified field . * @throws MsqlException - * + * */ function msql_field_len($result, int $field_offset): int { error_clear_last(); $result = \msql_field_len($result, $field_offset); - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -228,7 +228,7 @@ function msql_field_len($result, int $field_offset): int /** * msql_field_name gets the name of the specified field * index. - * + * * @param resource $result The result resource that * is being evaluated. This result comes from a call to * msql_query. @@ -236,13 +236,13 @@ function msql_field_len($result, int $field_offset): int * field_offset starts at 1. * @return string The name of the field . * @throws MsqlException - * + * */ function msql_field_name($result, int $field_offset): string { error_clear_last(); $result = \msql_field_name($result, $field_offset); - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -251,22 +251,22 @@ function msql_field_name($result, int $field_offset): string /** * Seeks to the specified field offset. If the next call to - * msql_fetch_field won't include a field offset, this + * msql_fetch_field won't include a field offset, this * field would be returned. - * + * * @param resource $result The result resource that * is being evaluated. This result comes from a call to * msql_query. * @param int $field_offset The numerical field offset. The * field_offset starts at 1. * @throws MsqlException - * + * */ function msql_field_seek($result, int $field_offset): void { error_clear_last(); $result = \msql_field_seek($result, $field_offset); - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } } @@ -274,7 +274,7 @@ function msql_field_seek($result, int $field_offset): void /** * Returns the name of the table that the specified field is in. - * + * * @param resource $result The result resource that * is being evaluated. This result comes from a call to * msql_query. @@ -282,13 +282,13 @@ function msql_field_seek($result, int $field_offset): void * field_offset starts at 1. * @return int The name of the table on success . * @throws MsqlException - * + * */ function msql_field_table($result, int $field_offset): int { error_clear_last(); $result = \msql_field_table($result, $field_offset); - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -301,18 +301,18 @@ function msql_field_table($result, int $field_offset): int * request, this memory is freed automatically, so you only need to * call this function when you want to make sure you don't use too * much memory while the script is running. - * + * * @param resource $result The result resource that * is being evaluated. This result comes from a call to * msql_query. * @throws MsqlException - * + * */ function msql_free_result($result): void { error_clear_last(); $result = \msql_free_result($result); - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } } @@ -321,36 +321,36 @@ function msql_free_result($result): void /** * msql_pconnect acts very much like * msql_connect with two major differences. - * - * First, when connecting, the function would first try to find a + * + * First, when connecting, the function would first try to find a * (persistent) link that's already open with the same host. * If one is found, an identifier for it will be returned instead of opening * a new connection. - * - * Second, the connection to the SQL server will not be closed when the + * + * Second, the connection to the SQL server will not be closed when the * execution of the script ends. Instead, the link will remain open for - * future use (msql_close will not close links + * future use (msql_close will not close links * established by this function). - * - * @param string $hostname The hostname can also include a port number. e.g. + * + * @param string $hostname The hostname can also include a port number. e.g. * hostname,port. - * + * * If not specified, the connection is established by the means of a Unix - * domain socket, being more efficient than a localhost TCP socket + * domain socket, being more efficient than a localhost TCP socket * connection. * @return resource Returns a positive mSQL link identifier on success, . * @throws MsqlException - * + * */ function msql_pconnect(string $hostname = null) { error_clear_last(); if ($hostname !== null) { $result = \msql_pconnect($hostname); - }else { + } else { $result = \msql_pconnect(); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -358,10 +358,10 @@ function msql_pconnect(string $hostname = null) /** - * msql_query sends a query to the currently active - * database on the server that's associated with the specified link + * msql_query sends a query to the currently active + * database on the server that's associated with the specified link * identifier. - * + * * @param string $query The SQL query. * @param resource|null $link_identifier The mSQL connection. * If not specified, the last link opened by msql_connect @@ -369,17 +369,17 @@ function msql_pconnect(string $hostname = null) * link as if msql_connect was called, and use it. * @return resource Returns a positive mSQL query identifier on success, . * @throws MsqlException - * + * */ function msql_query(string $query, $link_identifier = null) { error_clear_last(); if ($link_identifier !== null) { $result = \msql_query($query, $link_identifier); - }else { + } else { $result = \msql_query($query); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } return $result; @@ -387,32 +387,30 @@ function msql_query(string $query, $link_identifier = null) /** - * msql_select_db sets the current active database on + * msql_select_db sets the current active database on * the server that's associated with the specified * link_identifier. - * + * * Subsequent calls to msql_query will be made on the * active database. - * + * * @param string $database_name The database name. * @param resource|null $link_identifier The mSQL connection. * If not specified, the last link opened by msql_connect * is assumed. If no such link is found, the function will try to establish a * link as if msql_connect was called, and use it. * @throws MsqlException - * + * */ function msql_select_db(string $database_name, $link_identifier = null): void { error_clear_last(); if ($link_identifier !== null) { $result = \msql_select_db($database_name, $link_identifier); - }else { + } else { $result = \msql_select_db($database_name); } - if ($result === FALSE) { + if ($result === false) { throw MsqlException::createFromPhpError(); } } - - diff --git a/generated/mssql.php b/generated/mssql.php index 0bd6a6c8..6ae35ab5 100644 --- a/generated/mssql.php +++ b/generated/mssql.php @@ -8,28 +8,28 @@ * Closes the link to a MS SQL Server database that's associated with the * specified link identifier. If the link identifier isn't specified, the * last opened link is assumed. - * + * * Note that this isn't usually necessary, as non-persistent open * links are automatically closed at the end of the script's * execution. - * + * * @param resource $link_identifier A MS SQL link identifier, returned by * mssql_connect. - * + * * This function will not close persistent links generated by * mssql_pconnect. * @throws MssqlException - * + * */ function mssql_close($link_identifier = null): void { error_clear_last(); if ($link_identifier !== null) { $result = \mssql_close($link_identifier); - }else { + } else { $result = \mssql_close(); } - if ($result === FALSE) { + if ($result === false) { throw MssqlException::createFromPhpError(); } } @@ -41,17 +41,17 @@ function mssql_close($link_identifier = null): void * identifier to point to the specified row number, first row being * number 0. The next call to mssql_fetch_row * would return that row. - * + * * @param resource $result_identifier The result resource that is being evaluated. * @param int $row_number The desired row number of the new result pointer. * @throws MssqlException - * + * */ function mssql_data_seek($result_identifier, int $row_number): void { error_clear_last(); $result = \mssql_data_seek($result_identifier, $row_number); - if ($result === FALSE) { + if ($result === false) { throw MssqlException::createFromPhpError(); } } @@ -61,18 +61,18 @@ function mssql_data_seek($result_identifier, int $row_number): void * Seeks to the specified field offset. If the next call to * mssql_fetch_field won't include a field * offset, this field would be returned. - * + * * @param resource $result The result resource that is being evaluated. This result comes from a * call to mssql_query. * @param int $field_offset The field offset, starts at 0. * @throws MssqlException - * + * */ function mssql_field_seek($result, int $field_offset): void { error_clear_last(); $result = \mssql_field_seek($result, $field_offset); - if ($result === FALSE) { + if ($result === false) { throw MssqlException::createFromPhpError(); } } @@ -85,17 +85,17 @@ function mssql_field_seek($result, int $field_offset): void * the script ends. You may call mssql_free_result * with the result identifier as an argument and the associated * result memory will be freed. - * + * * @param resource $result The result resource that is being freed. This result comes from a * call to mssql_query. * @throws MssqlException - * + * */ function mssql_free_result($result): void { error_clear_last(); $result = \mssql_free_result($result); - if ($result === FALSE) { + if ($result === false) { throw MssqlException::createFromPhpError(); } } @@ -108,16 +108,16 @@ function mssql_free_result($result): void * the script ends. You may call mssql_free_statement * with the statement identifier as an argument and the associated * statement memory will be freed. - * + * * @param resource $stmt Statement resource, obtained with mssql_init. * @throws MssqlException - * + * */ function mssql_free_statement($stmt): void { error_clear_last(); $result = \mssql_free_statement($stmt); - if ($result === FALSE) { + if ($result === false) { throw MssqlException::createFromPhpError(); } } @@ -125,26 +125,26 @@ function mssql_free_statement($stmt): void /** * Initializes a stored procedure or a remote stored procedure. - * + * * @param string $sp_name Stored procedure name, like ownew.sp_name or * otherdb.owner.sp_name. - * @param resource $link_identifier A MS SQL link identifier, returned by + * @param resource $link_identifier A MS SQL link identifier, returned by * mssql_connect. * @return resource Returns a resource identifier "statement", used in subsequent calls to * mssql_bind and mssql_execute, * s. * @throws MssqlException - * + * */ function mssql_init(string $sp_name, $link_identifier = null) { error_clear_last(); if ($link_identifier !== null) { $result = \mssql_init($sp_name, $link_identifier); - }else { + } else { $result = \mssql_init($sp_name); } - if ($result === FALSE) { + if ($result === false) { throw MssqlException::createFromPhpError(); } return $result; @@ -155,12 +155,12 @@ function mssql_init(string $sp_name, $link_identifier = null) * mssql_select_db sets the current active * database on the server that's associated with the specified link * identifier. - * + * * Every subsequent call to mssql_query will be * made on the active database. - * + * * @param string $database_name The database name. - * + * * To escape the name of a database that contains spaces, hyphens ("-"), * or any other exceptional characters, the database name must be * enclosed in brackets, as is shown in the example, below. This @@ -169,24 +169,22 @@ function mssql_init(string $sp_name, $link_identifier = null) * @param resource $link_identifier A MS SQL link identifier, returned by * mssql_connect or * mssql_pconnect. - * + * * If no link identifier is specified, the last opened link is assumed. * If no link is open, the function will try to establish a link as if * mssql_connect was called, and use it. * @throws MssqlException - * + * */ function mssql_select_db(string $database_name, $link_identifier = null): void { error_clear_last(); if ($link_identifier !== null) { $result = \mssql_select_db($database_name, $link_identifier); - }else { + } else { $result = \mssql_select_db($database_name); } - if ($result === FALSE) { + if ($result === false) { throw MssqlException::createFromPhpError(); } } - - diff --git a/generated/mysql.php b/generated/mysql.php index 6b08977e..3bf7c84d 100644 --- a/generated/mysql.php +++ b/generated/mysql.php @@ -5,32 +5,32 @@ use Safe\Exceptions\MysqlException; /** - * mysql_close closes the non-persistent connection to - * the MySQL server that's associated with the specified link identifier. If - * link_identifier isn't specified, the last opened + * mysql_close closes the non-persistent connection to + * the MySQL server that's associated with the specified link identifier. If + * link_identifier isn't specified, the last opened * link is used. - * - * - * Open non-persistent MySQL connections and result sets are automatically destroyed when a - * PHP script finishes its execution. So, while explicitly closing open - * connections and freeing result sets is optional, doing so is recommended. - * This will immediately return resources to PHP and MySQL, which can - * improve performance. For related information, see + * + * + * Open non-persistent MySQL connections and result sets are automatically destroyed when a + * PHP script finishes its execution. So, while explicitly closing open + * connections and freeing result sets is optional, doing so is recommended. + * This will immediately return resources to PHP and MySQL, which can + * improve performance. For related information, see * freeing resources - * + * * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by * mysql_connect is assumed. If no connection is found or * established, an E_WARNING level error is * generated. * @throws MysqlException - * + * */ -function mysql_close($link_identifier = NULL): void +function mysql_close($link_identifier = null): void { error_clear_last(); $result = \mysql_close($link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } } @@ -39,10 +39,10 @@ function mysql_close($link_identifier = NULL): void /** * mysql_drop_db attempts to drop (remove) an * entire database from the server associated with the specified - * link identifier. This function is deprecated, it is preferable to use - * mysql_query to issue an sql + * link identifier. This function is deprecated, it is preferable to use + * mysql_query to issue an sql * DROP DATABASE statement instead. - * + * * @param string $database_name The name of the database that will be deleted. * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by @@ -51,13 +51,13 @@ function mysql_close($link_identifier = NULL): void * with no arguments. If no connection is found or established, an * E_WARNING level error is generated. * @throws MysqlException - * + * */ -function mysql_drop_db(string $database_name, $link_identifier = NULL): void +function mysql_drop_db(string $database_name, $link_identifier = null): void { error_clear_last(); $result = \mysql_drop_db($database_name, $link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } } @@ -65,7 +65,7 @@ function mysql_drop_db(string $database_name, $link_identifier = NULL): void /** * Retrieves the MySQL protocol. - * + * * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by * mysql_connect is assumed. If no such link is found, it @@ -74,13 +74,13 @@ function mysql_drop_db(string $database_name, $link_identifier = NULL): void * E_WARNING level error is generated. * @return int Returns the MySQL protocol on success . * @throws MysqlException - * + * */ -function mysql_get_proto_info($link_identifier = NULL): int +function mysql_get_proto_info($link_identifier = null): int { error_clear_last(); $result = \mysql_get_proto_info($link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } return $result; @@ -89,7 +89,7 @@ function mysql_get_proto_info($link_identifier = NULL): int /** * Retrieves the current MySQL server threads. - * + * * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by * mysql_connect is assumed. If no such link is found, it @@ -98,13 +98,13 @@ function mysql_get_proto_info($link_identifier = NULL): int * E_WARNING level error is generated. * @return resource A result pointer resource on success . * @throws MysqlException - * + * */ -function mysql_list_processes($link_identifier = NULL) +function mysql_list_processes($link_identifier = null) { error_clear_last(); $result = \mysql_list_processes($link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } return $result; @@ -113,11 +113,11 @@ function mysql_list_processes($link_identifier = NULL) /** * Retrieves a list of table names from a MySQL database. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES + * + * This function is deprecated. It is preferable to use + * mysql_query to issue an SQL SHOW TABLES * [FROM db_name] [LIKE 'pattern'] statement instead. - * + * * @param string $database The name of the database * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by @@ -126,18 +126,18 @@ function mysql_list_processes($link_identifier = NULL) * with no arguments. If no connection is found or established, an * E_WARNING level error is generated. * @return resource A result pointer resource on success . - * + * * Use the mysql_tablename function to * traverse this result pointer, or any function for result tables, * such as mysql_fetch_array. * @throws MysqlException - * + * */ -function mysql_list_tables(string $database, $link_identifier = NULL) +function mysql_list_tables(string $database, $link_identifier = null) { error_clear_last(); $result = \mysql_list_tables($database, $link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } return $result; @@ -146,7 +146,7 @@ function mysql_list_tables(string $database, $link_identifier = NULL) /** * Sets the default character set for the current connection. - * + * * @param string $charset A valid character set name. * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by @@ -155,13 +155,13 @@ function mysql_list_tables(string $database, $link_identifier = NULL) * with no arguments. If no connection is found or established, an * E_WARNING level error is generated. * @throws MysqlException - * + * */ -function mysql_set_charset(string $charset, $link_identifier = NULL): void +function mysql_set_charset(string $charset, $link_identifier = null): void { error_clear_last(); $result = \mysql_set_charset($charset, $link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } } @@ -169,27 +169,27 @@ function mysql_set_charset(string $charset, $link_identifier = NULL): void /** * Retrieves the table name from a result. - * - * This function is deprecated. It is preferable to use - * mysql_query to issue an SQL SHOW TABLES + * + * This function is deprecated. It is preferable to use + * mysql_query to issue an SQL SHOW TABLES * [FROM db_name] [LIKE 'pattern'] statement instead. - * - * @param resource $result A result pointer resource that's returned from + * + * @param resource $result A result pointer resource that's returned from * mysql_list_tables. * @param int $i The integer index (row/table number) * @return string The name of the table on success . - * + * * Use the mysql_tablename function to * traverse this result pointer, or any function for result tables, * such as mysql_fetch_array. * @throws MysqlException - * + * */ function mysql_tablename($result, int $i): string { error_clear_last(); $result = \mysql_tablename($result, $i); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } return $result; @@ -197,10 +197,10 @@ function mysql_tablename($result, int $i): string /** - * Retrieves the current thread ID. If the connection is lost, and a reconnect - * with mysql_ping is executed, the thread ID will + * Retrieves the current thread ID. If the connection is lost, and a reconnect + * with mysql_ping is executed, the thread ID will * change. This means only retrieve the thread ID when needed. - * + * * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by * mysql_connect is assumed. If no such link is found, it @@ -209,13 +209,13 @@ function mysql_tablename($result, int $i): string * E_WARNING level error is generated. * @return int The thread ID on success . * @throws MysqlException - * + * */ -function mysql_thread_id($link_identifier = NULL): int +function mysql_thread_id($link_identifier = null): int { error_clear_last(); $result = \mysql_thread_id($link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } return $result; @@ -235,9 +235,9 @@ function mysql_thread_id($link_identifier = NULL): int * connections are open, you must specify the optional parameter * link_identifier to identify which connection * you want to use. - * + * * @param string $query The SQL query to execute. - * + * * Data inside the query should be properly escaped. * @param resource $link_identifier The MySQL connection. If the * link identifier is not specified, the last link opened by @@ -246,23 +246,21 @@ function mysql_thread_id($link_identifier = NULL): int * with no arguments. If no connection is found or established, an * E_WARNING level error is generated. * @return resource For SELECT, SHOW, DESCRIBE or EXPLAIN statements, - * mysql_unbuffered_query + * mysql_unbuffered_query * returns a resource on success, . - * + * * For other type of SQL statements, UPDATE, DELETE, DROP, etc, * mysql_unbuffered_query returns TRUE on success * . * @throws MysqlException - * + * */ -function mysql_unbuffered_query(string $query, $link_identifier = NULL) +function mysql_unbuffered_query(string $query, $link_identifier = null) { error_clear_last(); $result = \mysql_unbuffered_query($query, $link_identifier); - if ($result === FALSE) { + if ($result === false) { throw MysqlException::createFromPhpError(); } return $result; } - - diff --git a/generated/mysqlndMs.php b/generated/mysqlndMs.php index 37dc8808..2fd4f32a 100644 --- a/generated/mysqlndMs.php +++ b/generated/mysqlndMs.php @@ -6,7 +6,7 @@ /** * Returns a list of currently configured servers. - * + * * @param mixed $connection A MySQL connection handle obtained from any of the * connect functions of the mysqli, * mysql or @@ -14,20 +14,20 @@ * @return array FALSE on error. Otherwise, returns an array with two entries * masters and slaves each of which contains * an array listing all corresponding servers. - * + * * The function can be used to check and debug the list of servers currently * used by the plugin. It is mostly useful when the list of servers changes at * runtime, for example, when using MySQL Fabric. - * + * * masters and slaves server entries * @throws MysqlndMsException - * + * */ function mysqlnd_ms_dump_servers($connection): array { error_clear_last(); $result = \mysqlnd_ms_dump_servers($connection); - if ($result === FALSE) { + if ($result === false) { throw MysqlndMsException::createFromPhpError(); } return $result; @@ -36,10 +36,10 @@ function mysqlnd_ms_dump_servers($connection): array /** * MySQL Fabric related. - * + * * Switch the connection to the nodes handling global sharding queries * for the given table name. - * + * * @param mixed $connection A MySQL connection handle obtained from any of the * connect functions of the mysqli, * mysql or @@ -47,13 +47,13 @@ function mysqlnd_ms_dump_servers($connection): array * @param mixed $table_name The table name to ask Fabric about. * @return array FALSE on error. Otherwise, TRUE * @throws MysqlndMsException - * + * */ function mysqlnd_ms_fabric_select_global($connection, $table_name): array { error_clear_last(); $result = \mysqlnd_ms_fabric_select_global($connection, $table_name); - if ($result === FALSE) { + if ($result === false) { throw MysqlndMsException::createFromPhpError(); } return $result; @@ -62,10 +62,10 @@ function mysqlnd_ms_fabric_select_global($connection, $table_name): array /** * MySQL Fabric related. - * + * * Switch the connection to the shards responsible for the * given table name and shard key. - * + * * @param mixed $connection A MySQL connection handle obtained from any of the * connect functions of the mysqli, * mysql or @@ -74,13 +74,13 @@ function mysqlnd_ms_fabric_select_global($connection, $table_name): array * @param mixed $shard_key The shard key to ask Fabric about. * @return array FALSE on error. Otherwise, TRUE * @throws MysqlndMsException - * + * */ function mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key): array { error_clear_last(); $result = \mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key); - if ($result === FALSE) { + if ($result === false) { throw MysqlndMsException::createFromPhpError(); } return $result; @@ -93,9 +93,9 @@ function mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key): a * plugin, a user connection handle represents a pool of database connections. * It is not possible to tell from the user connection handles properties to which * database server from the pool the user connection handle points. - * + * * The function can be used to debug or monitor PECL mysqlnd_ms. - * + * * @param mixed $connection A MySQL connection handle obtained from any of the * connect functions of the mysqli, * mysql or @@ -103,19 +103,17 @@ function mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key): a * @return array FALSE on error. Otherwise, an * array which describes the connection used to * execute the last statement on. - * + * * Array which describes the connection. * @throws MysqlndMsException - * + * */ function mysqlnd_ms_get_last_used_connection($connection): array { error_clear_last(); $result = \mysqlnd_ms_get_last_used_connection($connection); - if ($result === FALSE) { + if ($result === false) { throw MysqlndMsException::createFromPhpError(); } return $result; } - - diff --git a/generated/mysqlndQc.php b/generated/mysqlndQc.php index 032d8b93..a888670a 100644 --- a/generated/mysqlndQc.php +++ b/generated/mysqlndQc.php @@ -6,24 +6,24 @@ /** * Flush all cache contents. - * + * * Flushing the cache is a storage handler responsibility. * All built-in storage handler but the * memcache storage * handler support flushing the cache. The * memcache * storage handler cannot flush its cache contents. - * + * * User-defined storage handler may or may not support the operation. - * + * * @throws MysqlndQcException - * + * */ function mysqlnd_qc_clear_cache(): void { error_clear_last(); $result = \mysqlnd_qc_clear_cache(); - if ($result === FALSE) { + if ($result === false) { throw MysqlndQcException::createFromPhpError(); } } @@ -31,7 +31,7 @@ function mysqlnd_qc_clear_cache(): void /** * Installs a callback which decides whether a statement is cached. - * + * * There are several ways of hinting PELC/mysqlnd_qc to cache a query. * By default, PECL/mysqlnd_qc attempts to cache a if caching of all statements * is enabled or the query string begins with a certain SQL hint. @@ -42,7 +42,7 @@ function mysqlnd_qc_clear_cache(): void * with the callback, the callback gains full control. The callback is free * to ignore the configuration setting mysqlnd_qc.cache_by_default * and SQL hints. - * + * * The callback is invoked for every statement inspected by the plugin. * It is given the statements string as a parameter. The callback returns * FALSE if the statement shall not be cached. It returns TRUE to @@ -51,21 +51,21 @@ function mysqlnd_qc_clear_cache(): void * PHP configuration directive mysqlnd_qc.ttl. * If a different TTL shall be used, the callback returns a numeric * value to be used as the TTL. - * + * * The internal is_select function is part of the internal * cache storage handler interface. Thus, a user-defined storage handler * offers the same capabilities. - * - * @param string $callback + * + * @param string $callback * @return mixed Returns TRUE on success . * @throws MysqlndQcException - * + * */ function mysqlnd_qc_set_is_select(string $callback) { error_clear_last(); $result = \mysqlnd_qc_set_is_select($callback); - if ($result === FALSE) { + if ($result === false) { throw MysqlndQcException::createFromPhpError(); } return $result; @@ -81,7 +81,7 @@ function mysqlnd_qc_set_is_select(string $callback) * default storage handler is always available. * All other storage handler must be enabled explicitly when building the * extension. - * + * * @param string $handler Handler can be of type string representing the name of a * built-in storage handler or an object of type * mysqlnd_qc_handler_default. @@ -91,15 +91,13 @@ function mysqlnd_qc_set_is_select(string $callback) * MEMCACHE, * sqlite. * @throws MysqlndQcException - * + * */ function mysqlnd_qc_set_storage_handler(string $handler): void { error_clear_last(); $result = \mysqlnd_qc_set_storage_handler($handler); - if ($result === FALSE) { + if ($result === false) { throw MysqlndQcException::createFromPhpError(); } } - - diff --git a/generated/network.php b/generated/network.php index ad66398a..74fa0701 100644 --- a/generated/network.php +++ b/generated/network.php @@ -7,15 +7,15 @@ /** * closelog closes the descriptor being used to write to * the system logger. The use of closelog is optional. - * + * * @throws NetworkException - * + * */ function closelog(): void { error_clear_last(); $result = \closelog(); - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } } @@ -24,19 +24,19 @@ function closelog(): void /** * Fetch DNS Resource Records associated with the given * hostname. - * + * * @param string $hostname hostname should be a valid DNS hostname such * as "www.example.com". Reverse lookups can be generated * using in-addr.arpa notation, but * gethostbyaddr is more suitable for * the majority of reverse lookups. - * + * * Per DNS standards, email addresses are given in user.host format (for * example: hostmaster.example.com as opposed to hostmaster@example.com), * be sure to check this value and modify if necessary before using it * with a functions such as mail. * @param int $type By default, dns_get_record will search for any - * resource records associated with hostname. + * resource records associated with hostname. * To limit the query, specify the optional type * parameter. May be any one of the following: * DNS_A, DNS_CNAME, @@ -47,7 +47,7 @@ function closelog(): void * DNS_SRV, DNS_NAPTR, * DNS_A6, DNS_ALL * or DNS_ANY. - * + * * Because of eccentricities in the performance of libresolv * between platforms, DNS_ANY will not * always return every record, the slower DNS_ALL @@ -61,124 +61,124 @@ function closelog(): void * @return array This function returns an array of associative arrays, * . Each associative array contains * at minimum the following keys: - * + * * Basic DNS attributes - * - * - * + * + * + * * Attribute * Meaning - * - * - * - * + * + * + * + * * host - * + * * The record in the DNS namespace to which the rest of the associated data refers. - * - * - * + * + * + * * class - * + * * dns_get_record only returns Internet class records and as * such this parameter will always return IN. - * - * - * + * + * + * * type - * + * * String containing the record type. Additional attributes will also be contained * in the resulting array dependant on the value of type. See table below. - * - * - * + * + * + * * ttl - * + * * "Time To Live" remaining for this record. This will not equal * the record's original ttl, but will rather equal the original ttl minus whatever * length of time has passed since the authoritative name server was queried. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * Other keys in associative arrays dependant on 'type' - * - * - * + * + * + * * Type * Extra Columns - * - * - * - * + * + * + * + * * A - * + * * ip: An IPv4 addresses in dotted decimal notation. - * - * - * + * + * + * * MX - * + * * pri: Priority of mail exchanger. * Lower numbers indicate greater priority. * target: FQDN of the mail exchanger. * See also dns_get_mx. - * - * - * + * + * + * * CNAME - * + * * target: FQDN of location in DNS namespace to which * the record is aliased. - * - * - * + * + * + * * NS - * + * * target: FQDN of the name server which is authoritative * for this hostname. - * - * - * + * + * + * * PTR - * + * * target: Location within the DNS namespace to which * this record points. - * - * - * + * + * + * * TXT - * + * * txt: Arbitrary string data associated with this record. - * - * - * + * + * + * * HINFO - * + * * cpu: IANA number designating the CPU of the machine * referenced by this record. * os: IANA number designating the Operating System on * the machine referenced by this record. * See IANA's Operating System * Names for the meaning of these values. - * - * - * + * + * + * * CAA - * + * * flags: A one-byte bitfield; currently only bit 0 is defined, * meaning 'critical'; other bits are reserved and should be ignored. * tag: The CAA tag name (alphanumeric ASCII string). * value: The CAA tag value (binary string, may use subformats). * For additional information see: RFC 6844 - * - * - * + * + * + * * SOA - * + * * mname: FQDN of the machine from which the resource * records originated. * rname: Email address of the administrative contact @@ -196,51 +196,51 @@ function closelog(): void * client can continue to use a DNS resolution before it should request * a new resolution from the server. Can be overridden by individual * resource records. - * - * - * + * + * + * * AAAA - * + * * ipv6: IPv6 address - * - * - * + * + * + * * A6(PHP >= 5.1.0) - * + * * masklen: Length (in bits) to inherit from the target * specified by chain. * ipv6: Address for this specific record to merge with * chain. * chain: Parent record to merge with * ipv6 data. - * - * - * + * + * + * * SRV - * + * * pri: (Priority) lowest priorities should be used first. * weight: Ranking to weight which of commonly prioritized * targets should be chosen at random. * target and port: hostname and port * where the requested service can be found. * For additional information see: RFC 2782 - * - * - * + * + * + * * NAPTR - * + * * order and pref: Equivalent to * pri and weight above. * flags, services, regex, * and replacement: Parameters as defined by * RFC 2915. - * - * - * - * - * + * + * + * + * + * * @throws NetworkException - * + * */ function dns_get_record(string $hostname, int $type = DNS_ANY, array &$authns = null, array &$addtl = null, bool $raw = false): array { @@ -251,10 +251,10 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, array &$authns = $result = \dns_get_record($hostname, $type, $authns, $addtl); } elseif ($authns !== null) { $result = \dns_get_record($hostname, $type, $authns); - }else { + } else { $result = \dns_get_record($hostname, $type); } - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } return $result; @@ -265,17 +265,17 @@ function dns_get_record(string $hostname, int $type = DNS_ANY, array &$authns = * getprotobyname returns the protocol number * associated with the protocol name as per * /etc/protocols. - * + * * @param string $name The protocol name. * @return int Returns the protocol number, . * @throws NetworkException - * + * */ function getprotobyname(string $name): int { error_clear_last(); $result = \getprotobyname($name); - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } return $result; @@ -286,17 +286,17 @@ function getprotobyname(string $name): int * getprotobynumber returns the protocol name * associated with protocol number as per * /etc/protocols. - * + * * @param int $number The protocol number. * @return string Returns the protocol name as a string, . * @throws NetworkException - * + * */ function getprotobynumber(int $number): string { error_clear_last(); $result = \getprotobynumber($number); - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } return $result; @@ -305,21 +305,21 @@ function getprotobynumber(int $number): string /** * Registers a function that will be called when PHP starts sending output. - * + * * The callback is executed just after PHP prepares all * headers to be sent, and before any other output is sent, creating a window * to manipulate the outgoing headers before being sent. - * + * * @param callable $callback Function called just before the headers are sent. It gets no parameters * and the return value is ignored. * @throws NetworkException - * + * */ function header_register_callback(callable $callback): void { error_clear_last(); $result = \header_register_callback($callback); - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } } @@ -328,56 +328,56 @@ function header_register_callback(callable $callback): void /** * openlog opens a connection to the system * logger for a program. - * + * * The use of openlog is optional. It * will automatically be called by syslog if * necessary, in which case ident will default * to FALSE. - * + * * @param string $ident The string ident is added to each message. * @param int $option The option argument is used to indicate * what logging options will be used when generating a log message. - * + * * openlog Options - * - * - * + * + * + * * Constant * Description - * - * - * - * + * + * + * + * * LOG_CONS - * + * * if there is an error while sending data to the system logger, * write directly to the system console - * - * - * + * + * + * * LOG_NDELAY - * + * * open the connection to the logger immediately - * - * - * + * + * + * * LOG_ODELAY - * + * * (default) delay opening the connection until the first * message is logged - * - * - * + * + * + * * LOG_PERROR * print log message also to standard error - * - * + * + * * LOG_PID * include PID with each message - * - * - * - * + * + * + * + * * You can use one or more of this options. When using multiple options * you need to OR them, i.e. to open the connection * immediately, write to the console and include the PID in each message, @@ -386,82 +386,82 @@ function header_register_callback(callable $callback): void * type of program is logging the message. This allows you to specify * (in your machine's syslog configuration) how messages coming from * different facilities will be handled. - * + * * openlog Facilities - * - * - * + * + * + * * Constant * Description - * - * - * - * + * + * + * + * * LOG_AUTH - * - * security/authorization messages (use + * + * security/authorization messages (use * LOG_AUTHPRIV instead * in systems where that constant is defined) - * - * - * + * + * + * * LOG_AUTHPRIV * security/authorization messages (private) - * - * + * + * * LOG_CRON * clock daemon (cron and at) - * - * + * + * * LOG_DAEMON * other system daemons - * - * + * + * * LOG_KERN * kernel messages - * - * + * + * * LOG_LOCAL0 ... LOG_LOCAL7 * reserved for local use, these are not available in Windows - * - * + * + * * LOG_LPR * line printer subsystem - * - * + * + * * LOG_MAIL * mail subsystem - * - * + * + * * LOG_NEWS * USENET news subsystem - * - * + * + * * LOG_SYSLOG * messages generated internally by syslogd - * - * + * + * * LOG_USER * generic user-level messages - * - * + * + * * LOG_UUCP * UUCP subsystem - * - * - * - * - * + * + * + * + * + * * LOG_USER is the only valid log type under Windows * operating systems * @throws NetworkException - * + * */ function openlog(string $ident, int $option, int $facility): void { error_clear_last(); $result = \openlog($ident, $option, $facility); - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } } @@ -471,16 +471,16 @@ function openlog(string $ident, int $option, int $facility): void * setrawcookie is exactly the same as * setcookie except that the cookie value will not be * automatically urlencoded when sent to the browser. - * - * @param string $name - * @param string $value - * @param int $expire - * @param string $path - * @param string $domain - * @param bool $secure - * @param bool $httponly + * + * @param string $name + * @param string $value + * @param int $expire + * @param string $path + * @param string $domain + * @param bool $secure + * @param bool $httponly * @throws NetworkException - * + * */ function setrawcookie(string $name, string $value = null, int $expire = 0, string $path = null, string $domain = null, bool $secure = false, bool $httponly = false): void { @@ -497,10 +497,10 @@ function setrawcookie(string $name, string $value = null, int $expire = 0, strin $result = \setrawcookie($name, $value, $expire); } elseif ($value !== null) { $result = \setrawcookie($name, $value); - }else { + } else { $result = \setrawcookie($name); } - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } } @@ -509,75 +509,73 @@ function setrawcookie(string $name, string $value = null, int $expire = 0, strin /** * syslog generates a log message that will be * distributed by the system logger. - * + * * For information on setting up a user defined log handler, see the * syslog.conf * 5 Unix manual page. More * information on the syslog facilities and option can be found in the man * pages for syslog * 3 on Unix machines. - * + * * @param int $priority priority is a combination of the facility and * the level. Possible values are: - * + * * syslog Priorities (in descending order) - * - * - * + * + * + * * Constant * Description - * - * - * - * + * + * + * + * * LOG_EMERG * system is unusable - * - * + * + * * LOG_ALERT * action must be taken immediately - * - * + * + * * LOG_CRIT * critical conditions - * - * + * + * * LOG_ERR * error conditions - * - * + * + * * LOG_WARNING * warning conditions - * - * + * + * * LOG_NOTICE * normal, but significant, condition - * - * + * + * * LOG_INFO * informational message - * - * + * + * * LOG_DEBUG * debug-level message - * - * - * - * + * + * + * + * * @param string $message The message to send, except that the two characters * %m will be replaced by the error message string * (strerror) corresponding to the present value of * errno. * @throws NetworkException - * + * */ function syslog(int $priority, string $message): void { error_clear_last(); $result = \syslog($priority, $message); - if ($result === FALSE) { + if ($result === false) { throw NetworkException::createFromPhpError(); } } - - diff --git a/generated/oci8.php b/generated/oci8.php index acea6a17..3e0acd36 100644 --- a/generated/oci8.php +++ b/generated/oci8.php @@ -9,7 +9,7 @@ * placeholder name, which points to an Oracle PL/SQL * array. Whether it will be used for input or output will be determined at * run-time. - * + * * @param resource $statement A valid OCI statement identifier. * @param string $name The Oracle placeholder. * @param array $var_array An array. @@ -19,93 +19,93 @@ * element in the incoming array and will use it as the maximum length. * @param int $type Should be used to set the type of PL/SQL array items. See list of * available types below: - * - * - * - * + * + * + * + * * SQLT_NUM - for arrays of NUMBER. - * - * - * - * + * + * + * + * * SQLT_INT - for arrays of INTEGER (Note: INTEGER * it is actually a synonym for NUMBER(38), but * SQLT_NUM type won't work in this case even * though they are synonyms). - * - * - * - * + * + * + * + * * SQLT_FLT - for arrays of FLOAT. - * - * - * - * + * + * + * + * * SQLT_AFC - for arrays of CHAR. - * - * - * - * + * + * + * + * * SQLT_CHR - for arrays of VARCHAR2. - * - * - * - * + * + * + * + * * SQLT_VCS - for arrays of VARCHAR. - * - * - * - * + * + * + * + * * SQLT_AVC - for arrays of CHARZ. - * - * - * - * + * + * + * + * * SQLT_STR - for arrays of STRING. - * - * - * - * + * + * + * + * * SQLT_LVC - for arrays of LONG VARCHAR. - * - * - * - * + * + * + * + * * SQLT_ODT - for arrays of DATE. - * - * - * - * + * + * + * + * * SQLT_NUM - for arrays of NUMBER. - * + * * SQLT_INT - for arrays of INTEGER (Note: INTEGER * it is actually a synonym for NUMBER(38), but * SQLT_NUM type won't work in this case even * though they are synonyms). - * + * * SQLT_FLT - for arrays of FLOAT. - * + * * SQLT_AFC - for arrays of CHAR. - * + * * SQLT_CHR - for arrays of VARCHAR2. - * + * * SQLT_VCS - for arrays of VARCHAR. - * + * * SQLT_AVC - for arrays of CHARZ. - * + * * SQLT_STR - for arrays of STRING. - * + * * SQLT_LVC - for arrays of LONG VARCHAR. - * + * * SQLT_ODT - for arrays of DATE. * @throws Oci8Exception - * + * */ function oci_bind_array_by_name($statement, string $name, array &$var_array, int $max_table_length, int $max_item_length = -1, int $type = SQLT_AFC): void { error_clear_last(); $result = \oci_bind_array_by_name($statement, $name, $var_array, $max_table_length, $max_item_length, $type); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -116,18 +116,18 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int * bind variable placeholder bv_name. Binding * is important for Oracle database performance and also as a way to * avoid SQL Injection security issues. - * + * * Binding allows the database to reuse the statement context and * caches from previous executions of the statement, even if another * user or process originally executed it. Binding reduces SQL * Injection concerns because the data associated with a bind * variable is never treated as part of the SQL statement. It does * not need quoting or escaping. - * + * * PHP variables that have been bound can be changed and the * statement re-executed without needing to re-parse the statement or * re-bind. - * + * * In Oracle, bind variables are commonly divided * into IN binds for values that are passed into * the database, and OUT binds for values that are @@ -135,11 +135,11 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int * both IN and OUT. Whether a * bind variable will be used for input or output is determined at * run-time. - * + * * You must specify maxlength when using * an OUT bind so that PHP allocates enough memory * to hold the returned value. - * + * * For IN binds it is recommended to set * the maxlength length if the statement is * re-executed multiple times with different values for the PHP @@ -150,7 +150,7 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int * each oci_execute call. Binding an * unnecessarily large length will have an impact on process memory * in the database. - * + * * A bind call tells Oracle which memory address to read data from. * For IN binds that address needs to contain * valid data when oci_execute is called. This @@ -159,7 +159,7 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int * "ORA-01460: unimplemented or unreasonable conversion requested" * may occur. For OUT binds one symptom is no * value being set in the PHP variable. - * + * * For a statement that is repeatedly executed, binding values that * never change may reduce the ability of the Oracle optimizer to * choose the best statement execution plan. Long running statements @@ -167,7 +167,7 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int * in both cases, binding might be safer than joining strings into a * SQL statement, as this can be a security risk if unfiltered user * text is concatenated. - * + * * @param resource $statement A valid OCI8 statement identifer. * @param string $bv_name The colon-prefixed bind variable placeholder used in the * statement. The colon is optional @@ -185,133 +185,133 @@ function oci_bind_array_by_name($statement, string $name, array &$var_array, int * is SQLT_CHR. Oracle will convert the data * between this type and the database column (or PL/SQL variable * type), when possible. - * + * * If you need to bind an abstract datatype (LOB/ROWID/BFILE) you * need to allocate it first using the * oci_new_descriptor function. The * length is not used for abstract datatypes * and should be set to -1. - * + * * Possible values for type are: - * - * - * + * + * + * * SQLT_BFILEE or OCI_B_BFILE * - for BFILEs; - * - * - * - * + * + * + * + * * SQLT_CFILEE or OCI_B_CFILEE * - for CFILEs; - * - * - * - * + * + * + * + * * SQLT_CLOB or OCI_B_CLOB * - for CLOBs; - * - * - * - * + * + * + * + * * SQLT_BLOB or OCI_B_BLOB * - for BLOBs; - * - * - * - * + * + * + * + * * SQLT_RDD or OCI_B_ROWID * - for ROWIDs; - * - * - * - * + * + * + * + * * SQLT_NTY or OCI_B_NTY * - for named datatypes; - * - * - * - * + * + * + * + * * SQLT_INT or OCI_B_INT - for integers; - * - * - * - * + * + * + * + * * SQLT_CHR - for VARCHARs; - * - * - * - * + * + * + * + * * SQLT_BIN or OCI_B_BIN * - for RAW columns; - * - * - * - * + * + * + * + * * SQLT_LNG - for LONG columns; - * - * - * - * + * + * + * + * * SQLT_LBI - for LONG RAW columns; - * - * - * - * + * + * + * + * * SQLT_RSET - for cursors created * with oci_new_cursor; - * - * - * - * + * + * + * + * * SQLT_BOL or OCI_B_BOL * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) - * - * - * - * + * + * + * + * * SQLT_BFILEE or OCI_B_BFILE * - for BFILEs; - * + * * SQLT_CFILEE or OCI_B_CFILEE * - for CFILEs; - * + * * SQLT_CLOB or OCI_B_CLOB * - for CLOBs; - * + * * SQLT_BLOB or OCI_B_BLOB * - for BLOBs; - * + * * SQLT_RDD or OCI_B_ROWID * - for ROWIDs; - * + * * SQLT_NTY or OCI_B_NTY * - for named datatypes; - * + * * SQLT_INT or OCI_B_INT - for integers; - * + * * SQLT_CHR - for VARCHARs; - * + * * SQLT_BIN or OCI_B_BIN * - for RAW columns; - * + * * SQLT_LNG - for LONG columns; - * + * * SQLT_LBI - for LONG RAW columns; - * + * * SQLT_RSET - for cursors created * with oci_new_cursor; - * + * * SQLT_BOL or OCI_B_BOL * - for PL/SQL BOOLEANs (Requires OCI8 2.0.7 and Oracle Database 12c) * @throws Oci8Exception - * + * */ function oci_bind_by_name($statement, string $bv_name, &$variable, int $maxlength = -1, int $type = SQLT_CHR): void { error_clear_last(); $result = \oci_bind_by_name($statement, $bv_name, $variable, $maxlength, $type); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -320,16 +320,16 @@ function oci_bind_by_name($statement, string $bv_name, &$variable, int $maxlengt /** * Invalidates a cursor, freeing all associated resources and cancels the * ability to read from it. - * + * * @param resource $statement An OCI statement. * @throws Oci8Exception - * + * */ function oci_cancel($statement): void { error_clear_last(); $result = \oci_cancel($statement); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -340,21 +340,21 @@ function oci_cancel($statement): void * connection is closed if no other resources are using it and if it * was created with oci_connect * or oci_new_connect. - * + * * It is recommended to close connections that are no longer needed * because this makes database resources available for other users. - * - * @param resource $connection An Oracle connection identifier returned by + * + * @param resource $connection An Oracle connection identifier returned by * oci_connect, oci_pconnect, * or oci_new_connect. * @throws Oci8Exception - * + * */ function oci_close($connection): void { error_clear_last(); $result = \oci_close($connection); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -365,7 +365,7 @@ function oci_close($connection): void * Oracle connection. A commit ends the * current transaction and makes permanent all changes. It releases * all locks held. - * + * * A transaction begins when the first SQL statement that changes data * is executed with oci_execute using * the OCI_NO_AUTO_COMMIT flag. Further data @@ -373,20 +373,20 @@ function oci_close($connection): void * transaction. Data changes made in a transaction are temporary * until the transaction is committed or rolled back. Other users of * the database will not see the changes until they are committed. - * + * * When inserting or updating data, using transactions is recommended * for relational data consistency and for performance reasons. - * + * * @param resource $connection An Oracle connection identifier, returned by * oci_connect, oci_pconnect, or oci_new_connect. * @throws Oci8Exception - * + * */ function oci_commit($connection): void { error_clear_last(); $result = \oci_commit($connection); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -394,14 +394,14 @@ function oci_commit($connection): void /** * Returns a connection identifier needed for most other OCI8 operations. - * + * * See Connection Handling for * general information on connection management and connection * pooling. - * + * * From PHP 5.1.2 (PECL OCI8 1.1) oci_close can * be used to close the connection. - * + * * The second and subsequent calls to oci_connect * with the same parameters will return the connection handle returned * from the first call. This means that transactions in one handle are @@ -409,7 +409,7 @@ function oci_commit($connection): void * same underlying database connection. If two * handles need to be transactionally isolated from each other, use * oci_new_connect instead. - * + * * @param string $username The Oracle user name. * @param string $password The password for username. * @param string $connection_string Contains @@ -418,14 +418,14 @@ function oci_commit($connection): void * string, or a Connect Name from * the tnsnames.ora file, or the name of a local * Oracle instance. - * + * * If not specified, PHP uses * environment variables such as TWO_TASK (on Linux) * or LOCAL (on Windows) * and ORACLE_SID to determine the * Oracle instance to connect to. - * - * + * + * * To use the Easy Connect naming method, PHP must be linked with Oracle * 10g or greater Client libraries. The Easy Connect string for Oracle * 10g is of the form: @@ -435,8 +435,8 @@ function oci_commit($connection): void * Service names can be found by running the Oracle * utility lsnrctl status on the database server * machine. - * - * + * + * * The tnsnames.ora file can be in the Oracle Net * search path, which * includes $ORACLE_HOME/network/admin @@ -450,11 +450,11 @@ function oci_commit($connection): void * it doesn't match, Oracle will do its best to convert data to and from * the database character set. Depending on the character sets this may * not give usable results. Conversion also adds some time overhead. - * + * * If not specified, the * Oracle Client libraries determine a character set from * the NLS_LANG environment variable. - * + * * Passing this parameter can * reduce the time taken to connect. * @param int $session_mode This @@ -467,8 +467,8 @@ function oci_commit($connection): void * Privileged connections are disabled by default. To enable them you * need to set oci8.privileged_connect * to On. - * - * + * + * * PHP 5.3 (PECL OCI8 1.3.4) introduced the * OCI_CRED_EXT mode value. This tells Oracle to use * External or OS authentication, which must be configured in the @@ -476,18 +476,18 @@ function oci_commit($connection): void * with username of "/" and a empty password. * oci8.privileged_connect * may be On or Off. - * - * + * + * * OCI_CRED_EXT may be combined with the * OCI_SYSOPER or * OCI_SYSDBA modes. - * - * + * + * * OCI_CRED_EXT is not supported on Windows for * security reasons. * @return resource Returns a connection identifier . * @throws Oci8Exception - * + * */ function oci_connect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null) { @@ -498,10 +498,10 @@ function oci_connect(string $username, string $password, string $connection_stri $result = \oci_connect($username, $password, $connection_string, $character_set); } elseif ($connection_string !== null) { $result = \oci_connect($username, $password, $connection_string); - }else { + } else { $result = \oci_connect($username, $password); } - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -510,16 +510,16 @@ function oci_connect(string $username, string $password, string $connection_stri /** * Associates a PHP variable with a column for query fetches using oci_fetch. - * + * * The oci_define_by_name call must occur before * executing oci_execute. - * + * * @param resource $statement A valid OCI8 statement * identifier created by oci_parse and executed * by oci_execute, or a REF * CURSOR statement identifier. * @param string $column_name The column name used in the query. - * + * * Use uppercase for Oracle's default, non-case sensitive column * names. Use the exact column name case for case-sensitive * column names. @@ -528,17 +528,17 @@ function oci_connect(string $username, string $password, string $connection_stri * Oracle-style data conversions are not performed. For example, * SQLT_INT will be ignored and the returned * data type will still be SQLT_CHR. - * + * * You can optionally use oci_new_descriptor * to allocate LOB/ROWID/BFILE descriptors. * @throws Oci8Exception - * + * */ function oci_define_by_name($statement, string $column_name, &$variable, int $type = SQLT_CHR): void { error_clear_last(); $result = \oci_define_by_name($statement, $column_name, $variable, $type); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -547,67 +547,67 @@ function oci_define_by_name($statement, string $column_name, &$variable, int $ty /** * Executes a statement previously returned * from oci_parse. - * + * * After execution, statements like INSERT will * have data committed to the database by default. For statements * like SELECT, execution performs the logic of the * query. Query results can subsequently be fetched in PHP with * functions like oci_fetch_array. - * + * * Each parsed statement may be executed multiple times, saving the * cost of re-parsing. This is commonly used * for INSERT statements when data is bound * with oci_bind_by_name. - * + * * @param resource $statement A valid OCI statement identifier. * @param int $mode An optional second parameter can be one of the following constants: - * + * * Execution Modes - * - * - * + * + * + * * Constant * Description - * - * - * - * + * + * + * + * * OCI_COMMIT_ON_SUCCESS * Automatically commit all outstanding changes for * this connection when the statement has succeeded. This * is the default. - * - * + * + * * OCI_DESCRIBE_ONLY * Make query meta data available to functions * like oci_field_name but do not * create a result set. Any subsequent fetch call such * as oci_fetch_array will * fail. - * - * + * + * * OCI_NO_AUTO_COMMIT * Do not automatically commit changes. Prior to PHP * 5.3.2 (PECL OCI8 1.4) * use OCI_DEFAULT which is equivalent * to OCI_NO_AUTO_COMMIT. - * - * - * - * - * + * + * + * + * + * * Using OCI_NO_AUTO_COMMIT mode starts or continues a * transaction. Transactions are automatically rolled back when * the connection is closed, or when the script ends. Explicitly * call oci_commit to commit a transaction, * or oci_rollback to abort it. - * + * * When inserting or updating data, using transactions is * recommended for relational data consistency and for performance * reasons. - * + * * If OCI_NO_AUTO_COMMIT mode is used for any - * statement including queries, and + * statement including queries, and * oci_commit * or oci_rollback is not subsequently * called, then OCI8 will perform a rollback at the end of the @@ -619,13 +619,13 @@ function oci_define_by_name($statement, string $column_name, &$variable, int $ty * using oci_execute with different modes in * the same script. * @throws Oci8Exception - * + * */ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void { error_clear_last(); $result = \oci_execute($statement, $mode); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -634,19 +634,19 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void /** * Fetches multiple rows from a query into a two-dimensional array. * By default, all rows are returned. - * + * * This function can be called only once for each query executed * with oci_execute. - * + * * @param resource $statement A valid OCI8 statement * identifier created by oci_parse and executed * by oci_execute, or a REF * CURSOR statement identifier. * @param array $output The variable to contain the returned rows. - * + * * LOB columns are returned as strings, where Oracle supports * conversion. - * + * * See oci_fetch_array for more information * on how data and types are fetched. * @param int $skip The number of initial rows to discard when fetching the @@ -656,78 +656,78 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void * all the rows from skip + 1 onwards. * @param int $flags Parameter flags indicates the array * structure and whether associative arrays should be used. - * + * * oci_fetch_all Array Structure Modes - * - * - * + * + * + * * Constant * Description - * - * - * - * + * + * + * + * * OCI_FETCHSTATEMENT_BY_ROW * The outer array will contain one sub-array per query * row. - * - * + * + * * OCI_FETCHSTATEMENT_BY_COLUMN * The outer array will contain one sub-array per query * column. This is the default. - * - * - * - * - * + * + * + * + * + * * Arrays can be indexed either by column heading or numerically. * Only one index mode will be returned. - * + * * oci_fetch_all Array Index Modes - * - * - * + * + * + * * Constant * Description - * - * - * - * + * + * + * + * * OCI_NUM * Numeric indexes are used for each column's array. - * - * + * + * * OCI_ASSOC * Associative indexes are used for each column's * array. This is the default. - * - * - * - * - * + * + * + * + * + * * Use the addition operator "+" to choose a combination * of array structure and index modes. - * + * * Oracle's default, non-case sensitive column names will have * uppercase array keys. Case-sensitive column names will have * array keys using the exact column case. * Use var_dump * on output to verify the appropriate case * to use for each query. - * + * * Queries that have more than one column with the same name * should use column aliases. Otherwise only one of the columns * will appear in an associative array. * @return int Returns the number of rows in output, which * may be 0 or more, . * @throws Oci8Exception - * + * */ function oci_fetch_all($statement, array &$output, int $skip = 0, int $maxrows = -1, int $flags = OCI_FETCHSTATEMENT_BY_COLUMN + OCI_ASSOC): int { error_clear_last(); $result = \oci_fetch_all($statement, $output, $skip, $maxrows, $flags); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -736,18 +736,18 @@ function oci_fetch_all($statement, array &$output, int $skip = 0, int $maxrows = /** * Returns the name of the field. - * + * * @param resource $statement A valid OCI statement identifier. * @param mixed $field Can be the field's index (1-based) or name. * @return string Returns the name as a string, s. * @throws Oci8Exception - * + * */ function oci_field_name($statement, $field): string { error_clear_last(); $result = \oci_field_name($statement, $field); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -756,22 +756,22 @@ function oci_field_name($statement, $field): string /** * Returns precision of the field. - * + * * For FLOAT columns, precision is nonzero and scale is -127. * If precision is 0, then column is NUMBER. Else it's * NUMBER(precision, scale). - * + * * @param resource $statement A valid OCI statement identifier. * @param mixed $field Can be the field's index (1-based) or name. * @return int Returns the precision as an integer, s. * @throws Oci8Exception - * + * */ function oci_field_precision($statement, $field): int { error_clear_last(); $result = \oci_field_precision($statement, $field); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -780,22 +780,22 @@ function oci_field_precision($statement, $field): int /** * Returns the scale of the column with field index. - * + * * For FLOAT columns, precision is nonzero and scale is -127. * If precision is 0, then column is NUMBER. Else it's * NUMBER(precision, scale). - * + * * @param resource $statement A valid OCI statement identifier. * @param mixed $field Can be the field's index (1-based) or name. * @return int Returns the scale as an integer, s. * @throws Oci8Exception - * + * */ function oci_field_scale($statement, $field): int { error_clear_last(); $result = \oci_field_scale($statement, $field); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -804,18 +804,18 @@ function oci_field_scale($statement, $field): int /** * Returns the size of a field. - * + * * @param resource $statement A valid OCI statement identifier. * @param mixed $field Can be the field's index (1-based) or name. * @return int Returns the size of a field in bytes, s. * @throws Oci8Exception - * + * */ function oci_field_size($statement, $field): int { error_clear_last(); $result = \oci_field_size($statement, $field); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -824,20 +824,20 @@ function oci_field_size($statement, $field): int /** * Returns Oracle's raw "SQLT" data type of the field. - * + * * If you want a field's type name, then use oci_field_type instead. - * + * * @param resource $statement A valid OCI statement identifier. * @param mixed $field Can be the field's index (1-based) or name. * @return int Returns Oracle's raw data type as a number, s. * @throws Oci8Exception - * + * */ function oci_field_type_raw($statement, $field): int { error_clear_last(); $result = \oci_field_type_raw($statement, $field); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -846,18 +846,18 @@ function oci_field_type_raw($statement, $field): int /** * Returns a field's data type name. - * + * * @param resource $statement A valid OCI statement identifier. * @param mixed $field Can be the field's index (1-based) or name. * @return mixed Returns the field data type as a string, s. * @throws Oci8Exception - * + * */ function oci_field_type($statement, $field) { error_clear_last(); $result = \oci_field_type($statement, $field); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -868,16 +868,16 @@ function oci_field_type($statement, $field) * Frees resources associated with Oracle's cursor or statement, which was * received from as a result of oci_parse or obtained * from Oracle. - * + * * @param resource $statement A valid OCI statement identifier. * @throws Oci8Exception - * + * */ function oci_free_statement($statement): void { error_clear_last(); $result = \oci_free_statement($statement); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -885,21 +885,21 @@ function oci_free_statement($statement): void /** * Allocates a new collection object. - * - * @param resource $connection An Oracle connection identifier, returned by + * + * @param resource $connection An Oracle connection identifier, returned by * oci_connect or oci_pconnect. * @param string $tdo Should be a valid named type (uppercase). * @param string $schema Should point to the scheme, where the named type was created. The name * of the current user is the default value. * @return OCI-Collection Returns a new OCICollection object . * @throws Oci8Exception - * + * */ function oci_new_collection($connection, string $tdo, string $schema = null) { error_clear_last(); $result = \oci_new_collection($connection, $tdo, $schema); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -908,13 +908,13 @@ function oci_new_collection($connection, string $tdo, string $schema = null) /** * Establishes a new connection to an Oracle server and logs on. - * - * Unlike oci_connect and + * + * Unlike oci_connect and * oci_pconnect, oci_new_connect * does not cache connections and will always return a brand-new freshly * opened connection handle. This is useful if your application needs * transactional isolation between two sets of queries. - * + * * @param string $username The Oracle user name. * @param string $password The password for username. * @param string $connection_string Contains @@ -923,14 +923,14 @@ function oci_new_collection($connection, string $tdo, string $schema = null) * string, or a Connect Name from * the tnsnames.ora file, or the name of a local * Oracle instance. - * + * * If not specified, PHP uses * environment variables such as TWO_TASK (on Linux) * or LOCAL (on Windows) * and ORACLE_SID to determine the * Oracle instance to connect to. - * - * + * + * * To use the Easy Connect naming method, PHP must be linked with Oracle * 10g or greater Client libraries. The Easy Connect string for Oracle * 10g is of the form: @@ -940,8 +940,8 @@ function oci_new_collection($connection, string $tdo, string $schema = null) * Service names can be found by running the Oracle * utility lsnrctl status on the database server * machine. - * - * + * + * * The tnsnames.ora file can be in the Oracle Net * search path, which * includes $ORACLE_HOME/network/admin @@ -955,11 +955,11 @@ function oci_new_collection($connection, string $tdo, string $schema = null) * it doesn't match, Oracle will do its best to convert data to and from * the database character set. Depending on the character sets this may * not give usable results. Conversion also adds some time overhead. - * + * * If not specified, the * Oracle Client libraries determine a character set from * the NLS_LANG environment variable. - * + * * Passing this parameter can * reduce the time taken to connect. * @param int $session_mode This @@ -972,8 +972,8 @@ function oci_new_collection($connection, string $tdo, string $schema = null) * Privileged connections are disabled by default. To enable them you * need to set oci8.privileged_connect * to On. - * - * + * + * * PHP 5.3 (PECL OCI8 1.3.4) introduced the * OCI_CRED_EXT mode value. This tells Oracle to use * External or OS authentication, which must be configured in the @@ -981,18 +981,18 @@ function oci_new_collection($connection, string $tdo, string $schema = null) * with username of "/" and a empty password. * oci8.privileged_connect * may be On or Off. - * - * + * + * * OCI_CRED_EXT may be combined with the * OCI_SYSOPER or * OCI_SYSDBA modes. - * - * + * + * * OCI_CRED_EXT is not supported on Windows for * security reasons. * @return resource Returns a connection identifier . * @throws Oci8Exception - * + * */ function oci_new_connect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null) { @@ -1003,10 +1003,10 @@ function oci_new_connect(string $username, string $password, string $connection_ $result = \oci_new_connect($username, $password, $connection_string, $character_set); } elseif ($connection_string !== null) { $result = \oci_new_connect($username, $password, $connection_string); - }else { + } else { $result = \oci_new_connect($username, $password); } - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1015,18 +1015,18 @@ function oci_new_connect(string $username, string $password, string $connection_ /** * Allocates a new statement handle on the specified connection. - * - * @param resource $connection An Oracle connection identifier, returned by + * + * @param resource $connection An Oracle connection identifier, returned by * oci_connect or oci_pconnect. * @return resource Returns a new statement handle, . * @throws Oci8Exception - * + * */ function oci_new_cursor($connection) { error_clear_last(); $result = \oci_new_cursor($connection); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1035,21 +1035,21 @@ function oci_new_cursor($connection) /** * Allocates resources to hold descriptor or LOB locator. - * - * @param resource $connection An Oracle connection identifier, returned by + * + * @param resource $connection An Oracle connection identifier, returned by * oci_connect or oci_pconnect. - * @param int $type Valid values for type are: + * @param int $type Valid values for type are: * OCI_DTYPE_FILE, OCI_DTYPE_LOB and * OCI_DTYPE_ROWID. * @return OCI-Lob Returns a new LOB or FILE descriptor on success, FALSE on error. * @throws Oci8Exception - * + * */ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) { error_clear_last(); $result = \oci_new_descriptor($connection, $type); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1058,17 +1058,17 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) /** * Gets the number of columns in the given statement. - * + * * @param resource $statement A valid OCI statement identifier. * @return int Returns the number of columns as an integer, s. * @throws Oci8Exception - * + * */ function oci_num_fields($statement): int { error_clear_last(); $result = \oci_num_fields($statement); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1077,17 +1077,17 @@ function oci_num_fields($statement): int /** * Gets the number of rows affected during statement execution. - * + * * @param resource $statement A valid OCI statement identifier. * @return int Returns the number of rows affected as an integer, s. * @throws Oci8Exception - * + * */ function oci_num_rows($statement): int { error_clear_last(); $result = \oci_num_rows($statement); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1097,30 +1097,30 @@ function oci_num_rows($statement): int /** * Prepares sql_text using * connection and returns the statement identifier, - * which can be used with oci_bind_by_name, + * which can be used with oci_bind_by_name, * oci_execute and other functions. - * + * * Statement identifiers can be freed * with oci_free_statement or by setting the * variable to NULL. - * - * @param resource $connection An Oracle connection identifier, returned by + * + * @param resource $connection An Oracle connection identifier, returned by * oci_connect, oci_pconnect, or oci_new_connect. * @param string $sql_text The SQL or PL/SQL statement. - * + * * SQL statements should not end with a * semi-colon (";"). PL/SQL * statements should end with a semi-colon * (";"). * @return resource Returns a statement handle on success, . * @throws Oci8Exception - * + * */ function oci_parse($connection, string $sql_text) { error_clear_last(); $result = \oci_parse($connection, $sql_text); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1129,13 +1129,13 @@ function oci_parse($connection, string $sql_text) /** * Creates a persistent connection to an Oracle server and logs on. - * + * * Persistent connections are cached and re-used between requests, resulting * in reduced overhead on each page load; a typical PHP application will have * a single persistent connection open against an Oracle server per Apache * child process (or PHP FastCGI/CGI process). See the Persistent Database * Connections section for more information. - * + * * @param string $username The Oracle user name. * @param string $password The password for username. * @param string $connection_string Contains @@ -1144,14 +1144,14 @@ function oci_parse($connection, string $sql_text) * string, or a Connect Name from * the tnsnames.ora file, or the name of a local * Oracle instance. - * + * * If not specified, PHP uses * environment variables such as TWO_TASK (on Linux) * or LOCAL (on Windows) * and ORACLE_SID to determine the * Oracle instance to connect to. - * - * + * + * * To use the Easy Connect naming method, PHP must be linked with Oracle * 10g or greater Client libraries. The Easy Connect string for Oracle * 10g is of the form: @@ -1161,8 +1161,8 @@ function oci_parse($connection, string $sql_text) * Service names can be found by running the Oracle * utility lsnrctl status on the database server * machine. - * - * + * + * * The tnsnames.ora file can be in the Oracle Net * search path, which * includes $ORACLE_HOME/network/admin @@ -1176,11 +1176,11 @@ function oci_parse($connection, string $sql_text) * it doesn't match, Oracle will do its best to convert data to and from * the database character set. Depending on the character sets this may * not give usable results. Conversion also adds some time overhead. - * + * * If not specified, the * Oracle Client libraries determine a character set from * the NLS_LANG environment variable. - * + * * Passing this parameter can * reduce the time taken to connect. * @param int $session_mode This @@ -1193,8 +1193,8 @@ function oci_parse($connection, string $sql_text) * Privileged connections are disabled by default. To enable them you * need to set oci8.privileged_connect * to On. - * - * + * + * * PHP 5.3 (PECL OCI8 1.3.4) introduced the * OCI_CRED_EXT mode value. This tells Oracle to use * External or OS authentication, which must be configured in the @@ -1202,18 +1202,18 @@ function oci_parse($connection, string $sql_text) * with username of "/" and a empty password. * oci8.privileged_connect * may be On or Off. - * - * + * + * * OCI_CRED_EXT may be combined with the * OCI_SYSOPER or * OCI_SYSDBA modes. - * - * + * + * * OCI_CRED_EXT is not supported on Windows for * security reasons. * @return resource Returns a connection identifier . * @throws Oci8Exception - * + * */ function oci_pconnect(string $username, string $password, string $connection_string = null, string $character_set = null, int $session_mode = null) { @@ -1224,10 +1224,10 @@ function oci_pconnect(string $username, string $password, string $connection_str $result = \oci_pconnect($username, $password, $connection_string, $character_set); } elseif ($connection_string !== null) { $result = \oci_pconnect($username, $password, $connection_string); - }else { + } else { $result = \oci_pconnect($username, $password); } - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1237,12 +1237,12 @@ function oci_pconnect(string $username, string $password, string $connection_str /** * Returns the data from field in the current row, * fetched by oci_fetch. - * + * * For details on the data type mapping performed by * the OCI8 extension, see the datatypes * supported by the driver - * - * @param resource $statement + * + * @param resource $statement * @param mixed $field Can be either use the column number (1-based) or the column name. * The case of the column name must be the case that Oracle meta data * describes the column as, which is uppercase for columns created @@ -1250,13 +1250,13 @@ function oci_pconnect(string $username, string $password, string $connection_str * @return string Returns everything as strings except for abstract types (ROWIDs, LOBs and * FILEs). Returns FALSE on error. * @throws Oci8Exception - * + * */ function oci_result($statement, $field) { error_clear_last(); $result = \oci_result($statement, $field); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1268,7 +1268,7 @@ function oci_result($statement, $field) * connection and ends the transaction. It * releases all locks held. All Oracle SAVEPOINTS * are erased. - * + * * A transaction begins when the first SQL statement that changes data * is executed with oci_execute using * the OCI_NO_AUTO_COMMIT flag. Further data @@ -1276,21 +1276,21 @@ function oci_result($statement, $field) * transaction. Data changes made in a transaction are temporary * until the transaction is committed or rolled back. Other users of * the database will not see the changes until they are committed. - * + * * When inserting or updating data, using transactions is recommended * for relational data consistency and for performance reasons. - * + * * @param resource $connection An Oracle connection identifier, returned by * oci_connect, oci_pconnect * or oci_new_connect. * @throws Oci8Exception - * + * */ function oci_rollback($connection): void { error_clear_last(); $result = \oci_rollback($connection); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1298,17 +1298,17 @@ function oci_rollback($connection): void /** * Returns a string with the Oracle Database version and available options - * - * @param resource $connection + * + * @param resource $connection * @return string Returns the version information as a string . * @throws Oci8Exception - * + * */ function oci_server_version($connection): string { error_clear_last(); $result = \oci_server_version($connection); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1317,30 +1317,30 @@ function oci_server_version($connection): string /** * Sets the action name for Oracle tracing. - * + * * The action name is registered with the database when the next * 'roundtrip' from PHP to the database occurs, typically when an SQL * statement is executed. - * + * * The action name can subsequently be queried from database administration * views such as V$SESSION. It can be used for * tracing and monitoring such as with V$SQLAREA * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * + * * The value may be retained across persistent connections. - * + * * @param resource $connection An Oracle connection identifier, * returned by oci_connect, oci_pconnect, * or oci_new_connect. * @param string $action_name User chosen string up to 32 bytes long. * @throws Oci8Exception - * + * */ function oci_set_action($connection, string $action_name): void { error_clear_last(); $result = \oci_set_action($connection, $action_name); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1350,32 +1350,32 @@ function oci_set_action($connection, string $action_name): void * Sets the client identifier used by various database components to * identify lightweight application users who authenticate as the same * database user. - * + * * The client identifier is registered with the database when the next * 'roundtrip' from PHP to the database occurs, typically when an SQL * statement is executed. - * + * * The identifier can subsequently be queried, for example * with SELECT SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER') * FROM DUAL. Database administration views such * as V$SESSION will also contain the value. It * can be used with DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE * for tracing and can also be used for auditing. - * + * * The value may be retained across page requests that use the same persistent connection. - * + * * @param resource $connection An Oracle connection identifier, * returned by oci_connect, oci_pconnect, * or oci_new_connect. * @param string $client_identifier User chosen string up to 64 bytes long. * @throws Oci8Exception - * + * */ function oci_set_client_identifier($connection, string $client_identifier): void { error_clear_last(); $result = \oci_set_client_identifier($connection, $client_identifier); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1383,28 +1383,28 @@ function oci_set_client_identifier($connection, string $client_identifier): void /** * Sets the client information for Oracle tracing. - * + * * The client information is registered with the database when the next * 'roundtrip' from PHP to the database occurs, typically when an SQL * statement is executed. - * - * The client information can subsequently be queried from database + * + * The client information can subsequently be queried from database * administration views such as V$SESSION. - * + * * The value may be retained across persistent connections. - * + * * @param resource $connection An Oracle connection identifier, * returned by oci_connect, oci_pconnect, * or oci_new_connect. * @param string $client_info User chosen string up to 64 bytes long. * @throws Oci8Exception - * + * */ function oci_set_client_info($connection, string $client_info): void { error_clear_last(); $result = \oci_set_client_info($connection, $client_info); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1413,32 +1413,32 @@ function oci_set_client_info($connection, string $client_info): void /** * Sets the database "edition" of objects to be used by a subsequent * connections. - * + * * Oracle Editions allow concurrent versions of applications to run * using the same schema and object names. This is useful for * upgrading live systems. - * + * * Call oci_set_edition before calling * oci_connect, oci_pconnect * or oci_new_connect. - * + * * If an edition is set that is not valid in the database, connection * will fail even if oci_set_edition returns success. - * + * * When using persistent connections, if a connection with the * requested edition setting already exists, it is reused. Otherwise, * a different persistent connection is created - * + * * @param string $edition Oracle Database edition name previously created with the SQL * "CREATE EDITION" command. * @throws Oci8Exception - * + * */ function oci_set_edition(string $edition): void { error_clear_last(); $result = \oci_set_edition($edition); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1446,30 +1446,30 @@ function oci_set_edition(string $edition): void /** * Sets the module name for Oracle tracing. - * + * * The module name is registered with the database when the next * 'roundtrip' from PHP to the database occurs, typically when an SQL * statement is executed. - * + * * The name can subsequently be queried from database administration * views such as V$SESSION. It can be used for * tracing and monitoring such as with V$SQLAREA * and DBMS_MONITOR.SERV_MOD_ACT_STAT_ENABLE. - * + * * The value may be retained across persistent connections. - * + * * @param resource $connection An Oracle connection identifier, * returned by oci_connect, oci_pconnect, * or oci_new_connect. * @param string $module_name User chosen string up to 48 bytes long. * @throws Oci8Exception - * + * */ function oci_set_module_name($connection, string $module_name): void { error_clear_last(); $result = \oci_set_module_name($connection, $module_name); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1484,7 +1484,7 @@ function oci_set_module_name($connection, string $module_name): void * increasing the prefetch count above the * default oci8.default_prefetch * value. - * + * * Prefetching is Oracle's efficient way of returning more than one * data row from the database in each network request. This can * result in better network and CPU utilization. The buffering of @@ -1493,10 +1493,10 @@ function oci_set_module_name($connection, string $module_name): void * example, oci_fetch_row will always return one * row. The prefetch buffer is per-statement and is not used by * re-executed statements or by other connections. - * + * * Call oci_set_prefetch before * calling oci_execute. - * + * * A tuning goal is to set the prefetch value to a reasonable size for * the network and database to handle. For queries returning a very * large number of rows, overall system efficiency might be better if @@ -1504,36 +1504,36 @@ function oci_set_module_name($connection, string $module_name): void * prefetch value smaller than the number of rows). This allows the * database to handle other users' statements while the PHP script is * processing the current set of rows. - * + * * Query prefetching was introduced in Oracle 8i. REF CURSOR * prefetching was introduced in Oracle 11gR2 and occurs when PHP is * linked with Oracle 11gR2 (or later) Client libraries. * Nested cursor prefetching was * introduced in Oracle 11gR2 and requires both the Oracle Client * libraries and the database to be version 11gR2 or greater. - * + * * Prefetching is not supported when queries contain LONG or LOB * columns. The prefetch value is ignored and single-row fetches will * be used in all the situations when prefetching is not supported. - * + * * When using Oracle Database 12c, the prefetch * value set by PHP can be overridden by Oracle's * client oraaccess.xml configuration file. Refer * to Oracle documentation for more detail. - * + * * @param resource $statement A valid OCI8 statement * identifier created by oci_parse and executed * by oci_execute, or a REF * CURSOR statement identifier. * @param int $rows The number of rows to be prefetched, >= 0 * @throws Oci8Exception - * + * */ function oci_set_prefetch($statement, int $rows): void { error_clear_last(); $result = \oci_set_prefetch($statement, $rows); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1542,77 +1542,77 @@ function oci_set_prefetch($statement, int $rows): void /** * Returns a keyword identifying the type of the * OCI8 statement. - * + * * @param resource $statement A valid OCI8 statement identifier from oci_parse. * @return string Returns the type of statement as one of the * following strings. - * + * * Statement type - * - * - * + * + * + * * Return String * Notes - * - * - * - * + * + * + * + * * ALTER - * - * - * + * + * + * * BEGIN - * - * - * + * + * + * * CALL * Introduced in PHP 5.2.1 (PECL OCI8 1.2.3) - * - * + * + * * CREATE - * - * - * + * + * + * * DECLARE - * - * - * + * + * + * * DELETE - * - * - * + * + * + * * DROP - * - * - * + * + * + * * INSERT - * - * - * + * + * + * * SELECT - * - * - * + * + * + * * UPDATE - * - * - * + * + * + * * UNKNOWN - * - * - * - * - * - * + * + * + * + * + * + * * Returns FALSE on error. * @throws Oci8Exception - * + * */ function oci_statement_type($statement): string { error_clear_last(); $result = \oci_statement_type($statement); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } return $result; @@ -1624,18 +1624,16 @@ function oci_statement_type($statement): string * by oci_register_taf_callback. See * OCI8 Transparent Application Failover (TAF) Support * for information. - * + * * @param resource $connection An Oracle connection identifier. * @throws Oci8Exception - * + * */ function oci_unregister_taf_callback($connection): void { error_clear_last(); $result = \oci_unregister_taf_callback($connection); - if ($result === FALSE) { + if ($result === false) { throw Oci8Exception::createFromPhpError(); } } - - diff --git a/generated/opcache.php b/generated/opcache.php index 12563747..d27c7789 100644 --- a/generated/opcache.php +++ b/generated/opcache.php @@ -8,18 +8,16 @@ * This function compiles a PHP script and adds it to the opcode cache without * executing it. This can be used to prime the cache after a Web server * restart by pre-caching files that will be included in later requests. - * + * * @param string $file The path to the PHP script to be compiled. * @throws OpcacheException - * + * */ function opcache_compile_file(string $file): void { error_clear_last(); $result = \opcache_compile_file($file); - if ($result === FALSE) { + if ($result === false) { throw OpcacheException::createFromPhpError(); } } - - diff --git a/generated/openssl.php b/generated/openssl.php index 36da479b..706afe6b 100644 --- a/generated/openssl.php +++ b/generated/openssl.php @@ -8,22 +8,22 @@ * openssl_csr_export_to_file takes the Certificate * Signing Request represented by csr and saves it * in PEM format into the file named by outfilename. - * + * * @param string|resource $csr See CSR parameters for a list of valid values. * @param string $outfilename Path to the output file. - * @param bool $notext + * @param bool $notext * The optional parameter notext affects * the verbosity of the output; if it is FALSE, then additional human-readable * information is included in the output. The default value of * notext is TRUE. * @throws OpensslException - * + * */ function openssl_csr_export_to_file($csr, string $outfilename, bool $notext = true): void { error_clear_last(); $result = \openssl_csr_export_to_file($csr, $outfilename, $notext); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -31,25 +31,25 @@ function openssl_csr_export_to_file($csr, string $outfilename, bool $notext = tr /** * openssl_csr_export takes the Certificate Signing - * Request represented by csr and stores it in + * Request represented by csr and stores it in * PEM format in out, which is passed by * reference. - * + * * @param string|resource $csr See CSR parameters for a list of valid values. * @param string $out on success, this string will contain the PEM encoded CSR - * @param bool $notext + * @param bool $notext * The optional parameter notext affects * the verbosity of the output; if it is FALSE, then additional human-readable * information is included in the output. The default value of * notext is TRUE. * @throws OpensslException - * + * */ function openssl_csr_export($csr, string &$out, bool $notext = true): void { error_clear_last(); $result = \openssl_csr_export($csr, $out, $notext); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -59,7 +59,7 @@ function openssl_csr_export($csr, string &$out, bool $notext = true): void * openssl_csr_get_subject returns subject * distinguished name information encoded in the csr * including fields commonName (CN), organizationName (O), countryName (C) etc. - * + * * @param string|resource $csr See CSR parameters for a list of valid values. * @param bool $use_shortnames shortnames controls how the data is indexed in the * array - if shortnames is TRUE (the default) then @@ -67,13 +67,13 @@ function openssl_csr_export($csr, string &$out, bool $notext = true): void * form will be used - e.g.: CN is the shortname form of commonName. * @return array Returns TRUE on success . * @throws OpensslException - * + * */ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array { error_clear_last(); $result = \openssl_csr_get_subject($csr, $use_shortnames); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -83,7 +83,7 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array /** * openssl_csr_new generates a new CSR (Certificate Signing Request) * based on the information provided by dn. - * + * * @param array $dn The Distinguished Name or subject fields to be used in the certificate. * @param resource $privkey privkey should be set to a private key that was * previously generated by openssl_pkey_new (or @@ -99,45 +99,45 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array * The following keys, if present in configargs * behave as their equivalents in the openssl.conf, as * listed in the table below. - * + * * Configuration overrides - * - * - * + * + * + * * configargs key * type * openssl.conf equivalent * description - * - * - * - * + * + * + * + * * digest_alg * string * default_md * Digest method or signature hash, usually one of openssl_get_md_methods - * - * + * + * * x509_extensions * string * x509_extensions * Selects which extensions should be used when creating an x509 * certificate - * - * + * + * * req_extensions * string * req_extensions * Selects which extensions should be used when creating a CSR - * - * + * + * * private_key_bits * integer * default_bits * Specifies how many bits should be used to generate a private * key - * - * + * + * * private_key_type * integer * none @@ -147,48 +147,48 @@ function openssl_csr_get_subject($csr, bool $use_shortnames = true): array * OPENSSL_KEYTYPE_RSA or * OPENSSL_KEYTYPE_EC. * The default value is OPENSSL_KEYTYPE_RSA. - * - * - * + * + * + * * encrypt_key * boolean * encrypt_key * Should an exported key (with passphrase) be encrypted? - * - * + * + * * encrypt_key_cipher * integer * none - * + * * One of cipher constants. - * - * - * + * + * + * * curve_name * string * none - * + * * PHP 7.1+, One of openssl_get_curve_names. - * - * - * + * + * + * * config * string * N/A - * + * * Path to your own alternative openssl.conf file. - * - * - * - * - * + * + * + * + * + * * @param array $extraattribs extraattribs is used to specify additional * configuration options for the CSR. Both dn and * extraattribs are associative arrays whose keys are * converted to OIDs and applied to the relevant part of the request. * @return resource Returns the CSR . * @throws OpensslException - * + * */ function openssl_csr_new(array $dn, &$privkey, array $configargs = null, array $extraattribs = null) { @@ -197,10 +197,10 @@ function openssl_csr_new(array $dn, &$privkey, array $configargs = null, array $ $result = \openssl_csr_new($dn, $privkey, $configargs, $extraattribs); } elseif ($configargs !== null) { $result = \openssl_csr_new($dn, $privkey, $configargs); - }else { + } else { $result = \openssl_csr_new($dn, $privkey); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -209,9 +209,9 @@ function openssl_csr_new(array $dn, &$privkey, array $configargs = null, array $ /** * Takes a raw or base64 encoded string and decrypts it using a given method and key. - * + * * @param string $data The encrypted message to be decrypted. - * @param string $method The cipher method. For a list of available cipher methods, use + * @param string $method The cipher method. For a list of available cipher methods, use * openssl_get_cipher_methods. * @param string $key The key. * @param int $options options can be one of @@ -222,13 +222,13 @@ function openssl_csr_new(array $dn, &$privkey, array $configargs = null, array $ * @param string $aad Additional authentication data. * @return string The decrypted string on success . * @throws OpensslException - * + * */ function openssl_decrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string $tag = "", string $aad = ""): string { error_clear_last(); $result = \openssl_decrypt($data, $method, $key, $options, $iv, $tag, $aad); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -239,18 +239,18 @@ function openssl_decrypt(string $data, string $method, string $key, int $options * The shared secret returned by openssl_dh_compute_key is * often used as an encryption key to secretly communicate with a remote party. * This is known as the Diffie-Hellman key exchange. - * + * * @param string $pub_key DH Public key of the remote party. * @param resource $dh_key A local DH private key, corresponding to the public key to be shared with the remote party. * @return string Returns shared secret on success . * @throws OpensslException - * + * */ function openssl_dh_compute_key(string $pub_key, $dh_key): string { error_clear_last(); $result = \openssl_dh_compute_key($pub_key, $dh_key); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -260,20 +260,20 @@ function openssl_dh_compute_key(string $pub_key, $dh_key): string /** * Computes a digest hash value for the given data using a given method, * and returns a raw or binhex encoded string. - * + * * @param string $data The data. * @param string $method The digest method to use, e.g. "sha256", see openssl_get_md_methods for a list of available digest methods. * @param bool $raw_output Setting to TRUE will return as raw output data, otherwise the return * value is binhex encoded. * @return string Returns the digested hash value on success . * @throws OpensslException - * + * */ function openssl_digest(string $data, string $method, bool $raw_output = false): string { error_clear_last(); $result = \openssl_digest($data, $method, $raw_output); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -283,7 +283,7 @@ function openssl_digest(string $data, string $method, bool $raw_output = false): /** * Encrypts given data with given method and key, returns a raw * or base64 encoded string - * + * * @param string $data The plaintext message data to be encrypted. * @param string $method The cipher method. For a list of available cipher methods, use openssl_get_cipher_methods. * @param string $key The key. @@ -296,13 +296,13 @@ function openssl_digest(string $data, string $method, bool $raw_output = false): * @param int $tag_length The length of the authentication tag. Its value can be between 4 and 16 for GCM mode. * @return string Returns the encrypted string on success . * @throws OpensslException - * + * */ -function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag = NULL, string $aad = "", int $tag_length = 16): string +function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag = null, string $aad = "", int $tag_length = 16): string { error_clear_last(); $result = \openssl_encrypt($data, $method, $key, $options, $iv, $tag, $aad, $tag_length); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -318,26 +318,26 @@ function openssl_encrypt(string $data, string $method, string $key, int $options * The envelope key is generated when the * data are sealed and can only be used by one specific private key. See * openssl_seal for more information. - * - * @param string $sealed_data + * + * @param string $sealed_data * @param string $open_data If the call is successful the opened data is returned in this * parameter. - * @param string $env_key - * @param string|array|resource $priv_key_id + * @param string $env_key + * @param string|array|resource $priv_key_id * @param string $method The cipher method. * @param string $iv The initialization vector. * @throws OpensslException - * + * */ function openssl_open(string $sealed_data, string &$open_data, string $env_key, $priv_key_id, string $method = "RC4", string $iv = null): void { error_clear_last(); if ($iv !== null) { $result = \openssl_open($sealed_data, $open_data, $env_key, $priv_key_id, $method, $iv); - }else { + } else { $result = \openssl_open($sealed_data, $open_data, $env_key, $priv_key_id, $method); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -346,22 +346,22 @@ function openssl_open(string $sealed_data, string &$open_data, string $env_key, /** * openssl_pbkdf2 computes PBKDF2 (Password-Based Key Derivation Function 2), * a key derivation function defined in PKCS5 v2. - * + * * @param string $password Password from which the derived key is generated. * @param string $salt PBKDF2 recommends a crytographic salt of at least 64 bits (8 bytes). * @param int $key_length Length of desired output key. - * @param int $iterations The number of iterations desired. NIST + * @param int $iterations The number of iterations desired. NIST * recommends at least 10,000. * @param string $digest_algorithm Optional hash or digest algorithm from openssl_get_md_methods. Defaults to SHA-1. * @return string Returns raw binary string . * @throws OpensslException - * + * */ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algorithm = "sha1"): string { error_clear_last(); $result = \openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algorithm); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -372,45 +372,45 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it * openssl_pkcs12_export_to_file stores * x509 into a file named by * filename in a PKCS#12 file format. - * + * * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. * @param string $filename Path to the output file. * @param string|array|resource $priv_key Private key component of PKCS#12 file. * See Public/Private Key parameters for a list of valid values. * @param string $pass Encryption password for unlocking the PKCS#12 file. * @param array $args Optional array, other keys will be ignored. - * - * - * - * + * + * + * + * * Key * Description - * - * - * - * + * + * + * + * * "extracerts" * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * + * + * * "friendlyname" * string to be used for the supplied certificate and key - * - * - * - * + * + * + * + * * @throws OpensslException - * + * */ function openssl_pkcs12_export_to_file($x509, string $filename, $priv_key, string $pass, array $args = null): void { error_clear_last(); if ($args !== null) { $result = \openssl_pkcs12_export_to_file($x509, $filename, $priv_key, $pass, $args); - }else { + } else { $result = \openssl_pkcs12_export_to_file($x509, $filename, $priv_key, $pass); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -420,45 +420,45 @@ function openssl_pkcs12_export_to_file($x509, string $filename, $priv_key, strin * openssl_pkcs12_export stores * x509 into a string named by * out in a PKCS#12 file format. - * + * * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. * @param string $out On success, this will hold the PKCS#12. * @param string|array|resource $priv_key Private key component of PKCS#12 file. * See Public/Private Key parameters for a list of valid values. * @param string $pass Encryption password for unlocking the PKCS#12 file. * @param array $args Optional array, other keys will be ignored. - * - * - * - * + * + * + * + * * Key * Description - * - * - * - * + * + * + * + * * "extracerts" * array of extra certificates or a single certificate to be included in the PKCS#12 file. - * - * + * + * * "friendlyname" * string to be used for the supplied certificate and key - * - * - * - * + * + * + * + * * @throws OpensslException - * + * */ function openssl_pkcs12_export($x509, string &$out, $priv_key, string $pass, array $args = null): void { error_clear_last(); if ($args !== null) { $result = \openssl_pkcs12_export($x509, $out, $priv_key, $pass, $args); - }else { + } else { $result = \openssl_pkcs12_export($x509, $out, $priv_key, $pass); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -468,18 +468,18 @@ function openssl_pkcs12_export($x509, string &$out, $priv_key, string $pass, arr * openssl_pkcs12_read parses the PKCS#12 certificate store supplied by * pkcs12 into a array named * certs. - * + * * @param string $pkcs12 The certificate store contents, not its file name. * @param array $certs On success, this will hold the Certificate Store Data. * @param string $pass Encryption password for unlocking the PKCS#12 file. * @throws OpensslException - * + * */ function openssl_pkcs12_read(string $pkcs12, array &$certs, string $pass): void { error_clear_last(); $result = \openssl_pkcs12_read($pkcs12, $certs, $pass); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -490,24 +490,24 @@ function openssl_pkcs12_read(string $pkcs12, array &$certs, string $pass): void * infilename using the certificate and its * associated private key specified by recipcert and * recipkey. - * - * @param string $infilename + * + * @param string $infilename * @param string $outfilename The decrypted message is written to the file specified by * outfilename. - * @param string|resource $recipcert - * @param string|resource|array $recipkey + * @param string|resource $recipcert + * @param string|resource|array $recipkey * @throws OpensslException - * + * */ function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipcert, $recipkey = null): void { error_clear_last(); if ($recipkey !== null) { $result = \openssl_pkcs7_decrypt($infilename, $outfilename, $recipcert, $recipkey); - }else { + } else { $result = \openssl_pkcs7_decrypt($infilename, $outfilename, $recipcert); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -518,13 +518,13 @@ function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipce * file named infile and encrypts them using an RC2 * 40-bit cipher so that they can only be read by the intended recipients * specified by recipcerts. - * - * @param string $infile - * @param string $outfile + * + * @param string $infile + * @param string $outfile * @param string|resource|array $recipcerts 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 * keyed by header name, or an indexed array, where each element contains * a single header line. @@ -533,31 +533,31 @@ function openssl_pkcs7_decrypt(string $infilename, string $outfilename, $recipce * constants. * @param int $cipherid One of cipher constants. * @throws OpensslException - * + * */ function openssl_pkcs7_encrypt(string $infile, string $outfile, $recipcerts, array $headers, int $flags = 0, int $cipherid = OPENSSL_CIPHER_RC2_40): void { error_clear_last(); $result = \openssl_pkcs7_encrypt($infile, $outfile, $recipcerts, $headers, $flags, $cipherid); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } /** - * - * - * @param string $infilename - * @param array $certs + * + * + * @param string $infilename + * @param array $certs * @throws OpensslException - * + * */ function openssl_pkcs7_read(string $infilename, array &$certs): void { error_clear_last(); $result = \openssl_pkcs7_read($infilename, $certs); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -569,7 +569,7 @@ function openssl_pkcs7_read(string $infilename, array &$certs): void * certificate and its matching private key specified by * signcert and privkey * parameters. - * + * * @param string $infilename The input file you are intending to digitally sign. * @param string $outfilename The file which the digital signature will be written to. * @param string|resource $signcert The X.509 certificate used to digitally sign infilename. @@ -585,17 +585,17 @@ function openssl_pkcs7_read(string $infilename, array &$certs): void * a bunch of extra certificates to include in the signature which can for * example be used to help the recipient to verify the certificate that you used. * @throws OpensslException - * + * */ function openssl_pkcs7_sign(string $infilename, string $outfilename, $signcert, $privkey, array $headers, int $flags = PKCS7_DETACHED, string $extracerts = null): void { error_clear_last(); if ($extracerts !== null) { $result = \openssl_pkcs7_sign($infilename, $outfilename, $signcert, $privkey, $headers, $flags, $extracerts); - }else { + } else { $result = \openssl_pkcs7_sign($infilename, $outfilename, $signcert, $privkey, $headers, $flags); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -605,8 +605,8 @@ function openssl_pkcs7_sign(string $infilename, string $outfilename, $signcert, * openssl_pkey_export_to_file saves an ascii-armoured * (PEM encoded) rendition of key into the file named * by outfilename. - * - * @param resource|string|array $key + * + * @param resource|string|array $key * @param string $outfilename Path to the output file. * @param string $passphrase The key can be optionally protected by a * passphrase. @@ -615,7 +615,7 @@ function openssl_pkcs7_sign(string $infilename, string $outfilename, $signcert, * configuration file. See openssl_csr_new for more * information about configargs. * @throws OpensslException - * + * */ function openssl_pkey_export_to_file($key, string $outfilename, string $passphrase = null, array $configargs = null): void { @@ -624,10 +624,10 @@ function openssl_pkey_export_to_file($key, string $outfilename, string $passphra $result = \openssl_pkey_export_to_file($key, $outfilename, $passphrase, $configargs); } elseif ($passphrase !== null) { $result = \openssl_pkey_export_to_file($key, $outfilename, $passphrase); - }else { + } else { $result = \openssl_pkey_export_to_file($key, $outfilename); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -637,16 +637,16 @@ function openssl_pkey_export_to_file($key, string $outfilename, string $passphra * openssl_pkey_export exports * key as a PEM encoded string and stores it into * out (which is passed by reference). - * - * @param resource $key - * @param string $out + * + * @param resource $key + * @param string $out * @param string $passphrase The key is optionally protected by passphrase. * @param array $configargs configargs 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 configargs. * @throws OpensslException - * + * */ function openssl_pkey_export($key, string &$out, string $passphrase = null, array $configargs = null): void { @@ -655,10 +655,10 @@ function openssl_pkey_export($key, string &$out, string $passphrase = null, arra $result = \openssl_pkey_export($key, $out, $passphrase, $configargs); } elseif ($passphrase !== null) { $result = \openssl_pkey_export($key, $out, $passphrase); - }else { + } else { $result = \openssl_pkey_export($key, $out); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -667,27 +667,27 @@ function openssl_pkey_export($key, string &$out, string $passphrase = null, arra /** * openssl_get_privatekey parses * key and prepares it for use by other functions. - * + * * @param string $key key can be one of the following: - * + * * a string having the format * file://path/to/file.pem. The named file must * contain a PEM encoded certificate/private key (it may contain both). - * - * + * + * * A PEM formatted private key. - * + * * @param string $passphrase The optional parameter passphrase must be used * if the specified key is encrypted (protected by a passphrase). * @return resource Returns a positive key resource identifier on success, . * @throws OpensslException - * + * */ function openssl_pkey_get_private($key, string $passphrase = "") { error_clear_last(); $result = \openssl_pkey_get_private($key, $passphrase); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -698,26 +698,26 @@ function openssl_pkey_get_private($key, string $passphrase = "") * openssl_get_publickey extracts the public key from * certificate and prepares it for use by other * functions. - * + * * @param resource|string $certificate certificate can be one of the following: - * + * * an X.509 certificate resource * a string having the format * file://path/to/file.pem. The named file must * contain a PEM encoded certificate/public key (it may contain both). - * - * + * + * * A PEM formatted public key. - * + * * @return resource Returns a positive key resource identifier on success, . * @throws OpensslException - * + * */ function openssl_pkey_get_public($certificate) { error_clear_last(); $result = \openssl_pkey_get_public($certificate); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -728,24 +728,24 @@ function openssl_pkey_get_public($certificate) * openssl_pkey_new generates a new private and public * key pair. The public component of the key can be obtained using * openssl_pkey_get_public. - * + * * @param array $configargs You can finetune the key generation (such as specifying the number of * bits) using configargs. See * openssl_csr_new for more information about * configargs. * @return resource Returns a resource identifier for the pkey on success, . * @throws OpensslException - * + * */ function openssl_pkey_new(array $configargs = null) { error_clear_last(); if ($configargs !== null) { $result = \openssl_pkey_new($configargs); - }else { + } else { $result = \openssl_pkey_new(); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -757,11 +757,11 @@ function openssl_pkey_new(array $configargs = null) * data that was previously encrypted via * openssl_public_encrypt and stores the result into * decrypted. - * + * * You can use this function e.g. to decrypt data which is supposed to only be available to you. - * - * @param string $data - * @param string $decrypted + * + * @param string $data + * @param string $decrypted * @param string|resource|array $key key must be the private key corresponding that * was used to encrypt the data. * @param int $padding padding can be one of @@ -770,13 +770,13 @@ function openssl_pkey_new(array $configargs = null) * OPENSSL_PKCS1_OAEP_PADDING, * OPENSSL_NO_PADDING. * @throws OpensslException - * + * */ function openssl_private_decrypt(string $data, string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); $result = \openssl_private_decrypt($data, $decrypted, $key, $padding); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -787,24 +787,24 @@ function openssl_private_decrypt(string $data, string &$decrypted, $key, int $pa * with private key and stores the result into * crypted. Encrypted data can be decrypted via * openssl_public_decrypt. - * + * * This function can be used e.g. to sign data (or its hash) to prove that it * is not written by someone else. - * - * @param string $data - * @param string $crypted - * @param string|resource|array $key + * + * @param string $data + * @param string $crypted + * @param string|resource|array $key * @param int $padding padding can be one of * OPENSSL_PKCS1_PADDING, * OPENSSL_NO_PADDING. * @throws OpensslException - * + * */ function openssl_private_encrypt(string $data, string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); $result = \openssl_private_encrypt($data, $crypted, $key, $padding); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -815,25 +815,25 @@ function openssl_private_encrypt(string $data, string &$crypted, $key, int $padd * data that was previous encrypted via * openssl_private_encrypt and stores the result into * decrypted. - * + * * You can use this function e.g. to check if the message was written by the * owner of the private key. - * - * @param string $data - * @param string $decrypted + * + * @param string $data + * @param string $decrypted * @param string|resource $key key must be the public key corresponding that * was used to encrypt the data. * @param int $padding padding can be one of * OPENSSL_PKCS1_PADDING, * OPENSSL_NO_PADDING. * @throws OpensslException - * + * */ function openssl_public_decrypt(string $data, string &$decrypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); $result = \openssl_public_decrypt($data, $decrypted, $key, $padding); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -844,12 +844,12 @@ function openssl_public_decrypt(string $data, string &$decrypted, $key, int $pad * with public key and stores the result into * crypted. Encrypted data can be decrypted via * openssl_private_decrypt. - * + * * This function can be used e.g. to encrypt message which can be then read * only by owner of the private key. It can be also used to store secure data * in database. - * - * @param string $data + * + * @param string $data * @param string $crypted This will hold the result of the encryption. * @param string|resource $key The public key. * @param int $padding padding can be one of @@ -858,13 +858,13 @@ function openssl_public_decrypt(string $data, string &$decrypted, $key, int $pad * OPENSSL_PKCS1_OAEP_PADDING, * OPENSSL_NO_PADDING. * @throws OpensslException - * + * */ function openssl_public_encrypt(string $data, string &$crypted, $key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); $result = \openssl_public_encrypt($data, $crypted, $key, $padding); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -873,29 +873,29 @@ function openssl_public_encrypt(string $data, string &$crypted, $key, int $paddi /** * Generates a string of pseudo-random bytes, with the number of bytes * determined by the length parameter. - * + * * It also indicates if a cryptographically strong algorithm was used to produce the * pseudo-random bytes, and does this via the optional crypto_strong * parameter. It's rare for this to be FALSE, but some systems may be broken or old. - * + * * @param int $length The length of the desired string of bytes. Must be a positive integer. PHP will * try to cast this parameter to a non-null integer to use it. * @param bool $crypto_strong If passed into the function, this will hold a boolean value that determines - * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, + * if the algorithm used was "cryptographically strong", e.g., safe for usage with GPG, * passwords, etc. TRUE if it did, otherwise FALSE * @return string Returns the generated string of bytes on success, . * @throws OpensslException - * + * */ function openssl_random_pseudo_bytes(int $length, bool &$crypto_strong = null): string { error_clear_last(); if ($crypto_strong !== null) { $result = \openssl_random_pseudo_bytes($length, $crypto_strong); - }else { + } else { $result = \openssl_random_pseudo_bytes($length); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -912,7 +912,7 @@ function openssl_random_pseudo_bytes(int $length, bool &$crypto_strong = null): * sealed data to multiple recipients (provided one has obtained their * public keys). Each recipient must receive both the sealed data and * the envelope key that was encrypted with the recipient's public key. - * + * * @param string $data The data to seal. * @param string $sealed_data The sealed data. * @param array $env_keys Array of encrypted keys. @@ -924,17 +924,17 @@ function openssl_random_pseudo_bytes(int $length, bool &$crypto_strong = null): * sealed_data, and the envelope keys in * env_keys. * @throws OpensslException - * + * */ function openssl_seal(string $data, string &$sealed_data, array &$env_keys, array $pub_key_ids, string $method = "RC4", string &$iv = null): int { error_clear_last(); if ($iv !== null) { $result = \openssl_seal($data, $sealed_data, $env_keys, $pub_key_ids, $method, $iv); - }else { + } else { $result = \openssl_seal($data, $sealed_data, $env_keys, $pub_key_ids, $method); } - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; @@ -947,24 +947,24 @@ function openssl_seal(string $data, string &$sealed_data, array &$env_keys, arra * digital signature using the private key associated with * priv_key_id. Note that the data itself is * not encrypted. - * + * * @param string $data The string of data you wish to sign * @param string $signature If the call was successful the signature is returned in * signature. * @param resource|string $priv_key_id resource - a key, returned by openssl_get_privatekey - * + * * string - a PEM formatted key * @param int|string $signature_alg int - one of these Signature Algorithms. - * + * * string - a valid string returned by openssl_get_md_methods example, "sha256WithRSAEncryption" or "sha384". * @throws OpensslException - * + * */ function openssl_sign(string $data, string &$signature, $priv_key_id, $signature_alg = OPENSSL_ALGO_SHA1): void { error_clear_last(); $result = \openssl_sign($data, $signature, $priv_key_id, $signature_alg); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -974,22 +974,22 @@ function openssl_sign(string $data, string &$signature, $priv_key_id, $signature * openssl_x509_export_to_file stores * x509 into a file named by * outfilename in a PEM encoded format. - * + * * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. * @param string $outfilename Path to the output file. - * @param bool $notext + * @param bool $notext * The optional parameter notext affects * the verbosity of the output; if it is FALSE, then additional human-readable * information is included in the output. The default value of * notext is TRUE. * @throws OpensslException - * + * */ function openssl_x509_export_to_file($x509, string $outfilename, bool $notext = true): void { error_clear_last(); $result = \openssl_x509_export_to_file($x509, $outfilename, $notext); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -999,22 +999,22 @@ function openssl_x509_export_to_file($x509, string $outfilename, bool $notext = * openssl_x509_export stores * x509 into a string named by * output in a PEM encoded format. - * + * * @param string|resource $x509 See Key/Certificate parameters for a list of valid values. * @param string $output On success, this will hold the PEM. - * @param bool $notext + * @param bool $notext * The optional parameter notext affects * the verbosity of the output; if it is FALSE, then additional human-readable * information is included in the output. The default value of * notext is TRUE. * @throws OpensslException - * + * */ function openssl_x509_export($x509, string &$output, bool $notext = true): void { error_clear_last(); $result = \openssl_x509_export($x509, $output, $notext); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } } @@ -1024,20 +1024,18 @@ function openssl_x509_export($x509, string &$output, bool $notext = true): void * openssl_x509_read parses the certificate supplied by * x509certdata and returns a resource identifier for * it. - * + * * @param string|resource $x509certdata X509 certificate. See Key/Certificate parameters for a list of valid values. * @return resource Returns a resource identifier on success . * @throws OpensslException - * + * */ function openssl_x509_read($x509certdata) { error_clear_last(); $result = \openssl_x509_read($x509certdata); - if ($result === FALSE) { + if ($result === false) { throw OpensslException::createFromPhpError(); } return $result; } - - diff --git a/generated/outcontrol.php b/generated/outcontrol.php index 0282c8e1..f4c5d9e0 100644 --- a/generated/outcontrol.php +++ b/generated/outcontrol.php @@ -10,20 +10,20 @@ * contents you have to call ob_get_contents before * ob_end_clean as the buffer contents are discarded * when ob_end_clean is called. - * + * * The output buffer must be started by * ob_start with PHP_OUTPUT_HANDLER_CLEANABLE * and PHP_OUTPUT_HANDLER_REMOVABLE * flags. Otherwise ob_end_clean will not work. - * + * * @throws OutcontrolException - * + * */ function ob_end_clean(): void { error_clear_last(); $result = \ob_end_clean(); - if ($result === FALSE) { + if ($result === false) { throw OutcontrolException::createFromPhpError(); } } @@ -36,20 +36,20 @@ function ob_end_clean(): void * ob_get_contents before * ob_end_flush as the buffer contents are * discarded after ob_end_flush is called. - * + * * The output buffer must be started by * ob_start with PHP_OUTPUT_HANDLER_FLUSHABLE * and PHP_OUTPUT_HANDLER_REMOVABLE * flags. Otherwise ob_end_flush will not work. - * + * * @throws OutcontrolException - * + * */ function ob_end_flush(): void { error_clear_last(); $result = \ob_end_flush(); - if ($result === FALSE) { + if ($result === false) { throw OutcontrolException::createFromPhpError(); } } @@ -60,21 +60,21 @@ function ob_end_flush(): void * The name and value will be added to URLs (as GET parameter) and forms * (as hidden input fields) the same way as the session ID when transparent * URL rewriting is enabled with session.use_trans_sid. - * + * * This function's behaviour is controlled by the url_rewriter.tags and * url_rewriter.hosts php.ini * parameters. - * + * * @param string $name The variable name. * @param string $value The variable value. * @throws OutcontrolException - * + * */ function output_add_rewrite_var(string $name, string $value): void { error_clear_last(); $result = \output_add_rewrite_var($name, $value); - if ($result === FALSE) { + if ($result === false) { throw OutcontrolException::createFromPhpError(); } } @@ -84,17 +84,15 @@ function output_add_rewrite_var(string $name, string $value): void * This function resets the URL rewriter and removes all rewrite * variables previously set by the output_add_rewrite_var * function. - * + * * @throws OutcontrolException - * + * */ function output_reset_rewrite_vars(): void { error_clear_last(); $result = \output_reset_rewrite_vars(); - if ($result === FALSE) { + if ($result === false) { throw OutcontrolException::createFromPhpError(); } } - - diff --git a/generated/password.php b/generated/password.php index 689ac47b..392d0da2 100644 --- a/generated/password.php +++ b/generated/password.php @@ -9,113 +9,111 @@ * algorithm. password_hash is compatible with crypt. * Therefore, password hashes created by crypt can be used with * password_hash. - * - * - * - * + * + * + * + * * PASSWORD_DEFAULT - Use the bcrypt algorithm (default as of PHP 5.5.0). * Note that this constant is designed to change over time as new and stronger algorithms are added * to PHP. For that reason, the length of the result from using this identifier can change over * time. Therefore, it is recommended to store the result in a database column that can expand * beyond 60 characters (255 characters would be a good choice). - * - * - * - * + * + * + * + * * PASSWORD_BCRYPT - Use the CRYPT_BLOWFISH algorithm to * create the hash. This will produce a standard crypt compatible hash using * the "$2y$" identifier. The result will always be a 60 character string, . - * - * - * - * + * + * + * + * * PASSWORD_ARGON2I - Use the Argon2 hashing algorithm to create the hash. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * salt (string) - to manually provide a salt to use when hashing the password. * Note that this will override and prevent a salt from being automatically generated. - * - * + * + * * If omitted, a random salt will be generated by password_hash for * each password hashed. This is the intended mode of operation. - * - * - * + * + * + * * The salt option has been deprecated as of PHP 7.0.0. It is now * preferred to simply use the salt that is generated by default. - * - * - * - * - * - * cost (integer) - which denotes the algorithmic cost that should be used. + * + * + * + * + * + * cost (integer) - which denotes the algorithmic cost that should be used. * Examples of these values can be found on the crypt page. - * - * + * + * * If omitted, a default value of 10 will be used. This is a good * baseline cost, but you may want to consider increasing it depending on your hardware. - * - * - * - * - * - * - * - * memory_cost (integer) - Maximum memory (in kibibytes) that may + * + * + * + * + * + * + * + * memory_cost (integer) - Maximum memory (in kibibytes) that may * be used to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_MEMORY_COST. - * - * - * - * - * time_cost (integer) - Maximum amount of time it may + * + * + * + * + * time_cost (integer) - Maximum amount of time it may * take to compute the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_TIME_COST. - * - * - * - * - * threads (integer) - Number of threads to use for computing + * + * + * + * + * threads (integer) - Number of threads to use for computing * the Argon2 hash. Defaults to PASSWORD_ARGON2_DEFAULT_THREADS. - * - * - * - * + * + * + * + * * @param string $password The user's password. - * + * * Using the PASSWORD_BCRYPT as the * algorithm, will result * in the password parameter being truncated to a * maximum length of 72 characters. * @param int $algo A password algorithm constant denoting the algorithm to use when hashing the password. * @param array $options An associative array containing options. See the password algorithm constants for documentation on the supported options for each algorithm. - * + * * If omitted, a random salt will be created and the default cost will be * used. * @return string Returns the hashed password, . - * + * * The used algorithm, cost and salt are returned as part of the hash. Therefore, * all information that's needed to verify the hash is included in it. This allows * the password_verify function to verify the hash without * needing separate storage for the salt or algorithm information. * @throws PasswordException - * + * */ function password_hash(string $password, int $algo, array $options = null): string { error_clear_last(); if ($options !== null) { $result = \password_hash($password, $algo, $options); - }else { + } else { $result = \password_hash($password, $algo); } - if ($result === FALSE) { + if ($result === false) { throw PasswordException::createFromPhpError(); } return $result; } - - diff --git a/generated/pcntl.php b/generated/pcntl.php index 42595642..e18eb83e 100644 --- a/generated/pcntl.php +++ b/generated/pcntl.php @@ -6,7 +6,7 @@ /** * Executes the program with the given arguments. - * + * * @param string $path path must be the path to a binary executable or a * script with a valid path pointing to an executable in the shebang ( * #!/usr/local/bin/perl for example) as the first line. See your system's @@ -18,7 +18,7 @@ * the key being the name of the environmental variable and the value being * the value of that variable. * @throws PcntlException - * + * */ function pcntl_exec(string $path, array $args = null, array $envs = null): void { @@ -27,10 +27,10 @@ function pcntl_exec(string $path, array $args = null, array $envs = null): void $result = \pcntl_exec($path, $args, $envs); } elseif ($args !== null) { $result = \pcntl_exec($path, $args); - }else { + } else { $result = \pcntl_exec($path); } - if ($result === FALSE) { + if ($result === false) { throw PcntlException::createFromPhpError(); } } @@ -41,7 +41,7 @@ function pcntl_exec(string $path, array $args = null, array $envs = null): void * pid. Because priority levels can differ between * system types and kernel versions, please see your system's getpriority(2) * man page for specific details. - * + * * @param int $pid If not specified, the pid of the current process is used. * @param int $process_identifier One of PRIO_PGRP, PRIO_USER * or PRIO_PROCESS. @@ -49,13 +49,13 @@ function pcntl_exec(string $path, array $args = null, array $envs = null): void * . A lower numerical value causes more favorable * scheduling. * @throws PcntlException - * + * */ function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCESS): int { error_clear_last(); $result = \pcntl_getpriority($pid, $process_identifier); - if ($result === FALSE) { + if ($result === false) { throw PcntlException::createFromPhpError(); } return $result; @@ -65,7 +65,7 @@ function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCE /** * pcntl_setpriority sets the priority of * pid. - * + * * @param int $priority priority is generally a value in the range * -20 to 20. The default priority * is 0 while a lower numerical value causes more @@ -76,31 +76,31 @@ function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCE * @param int $process_identifier One of PRIO_PGRP, PRIO_USER * or PRIO_PROCESS. * @throws PcntlException - * + * */ function pcntl_setpriority(int $priority, int $pid = null, int $process_identifier = PRIO_PROCESS): void { error_clear_last(); $result = \pcntl_setpriority($priority, $pid, $process_identifier); - if ($result === FALSE) { + if ($result === false) { throw PcntlException::createFromPhpError(); } } /** - * The pcntl_signal_dispatch function calls the signal + * The pcntl_signal_dispatch function calls the signal * handlers installed by pcntl_signal for each pending * signal. - * + * * @throws PcntlException - * + * */ function pcntl_signal_dispatch(): void { error_clear_last(); $result = \pcntl_signal_dispatch(); - if ($result === FALSE) { + if ($result === false) { throw PcntlException::createFromPhpError(); } } @@ -109,53 +109,51 @@ function pcntl_signal_dispatch(): void /** * The pcntl_sigprocmask function adds, removes or sets blocked * signals, depending on the how parameter. - * + * * @param int $how Sets the behavior of pcntl_sigprocmask. Possible - * values: - * + * values: + * * SIG_BLOCK: Add the signals to the * currently blocked signals. * SIG_UNBLOCK: Remove the signals from the * currently blocked signals. * SIG_SETMASK: Replace the currently * blocked signals by the given list of signals. - * + * * @param array $set List of signals. * @param array $oldset The oldset parameter is set to an array * containing the list of the previously blocked signals. * @throws PcntlException - * + * */ function pcntl_sigprocmask(int $how, array $set, array &$oldset = null): void { error_clear_last(); if ($oldset !== null) { $result = \pcntl_sigprocmask($how, $set, $oldset); - }else { + } else { $result = \pcntl_sigprocmask($how, $set); } - if ($result === FALSE) { + if ($result === false) { throw PcntlException::createFromPhpError(); } } /** - * - * - * @param int $errno + * + * + * @param int $errno * @return string Returns error description on success . * @throws PcntlException - * + * */ function pcntl_strerror(int $errno): string { error_clear_last(); $result = \pcntl_strerror($errno); - if ($result === FALSE) { + if ($result === false) { throw PcntlException::createFromPhpError(); } return $result; } - - diff --git a/generated/pcre.php b/generated/pcre.php index 1c265913..0ce9b1fa 100644 --- a/generated/pcre.php +++ b/generated/pcre.php @@ -9,10 +9,10 @@ * expression given in pattern and puts them in * matches in the order specified by * flags. - * + * * After the first match is found, the subsequent searches are continued * on from end of the last match. - * + * * @param string $pattern The pattern to search for, as a string. * @param string $subject The input string. * @param array $matches Array of all matches in multi-dimensional array ordered according to @@ -20,95 +20,95 @@ * @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 * PREG_SET_ORDER): - * - * + * + * * PREG_PATTERN_ORDER - * - * + * + * * Orders results so that $matches[0] is an array of full * pattern matches, $matches[1] is an array of strings matched by * the first parenthesized subpattern, and so on. - * - * - * - * - * + * + * + * + * + * * ]]> - * + * * The above example will output: - * + * * example: , this is a test * example: , this is a test * ]]> - * - * + * + * * So, $out[0] contains array of strings that matched full pattern, * and $out[1] contains array of strings enclosed by tags. - * - * - * - * + * + * + * + * * If the pattern contains named subpatterns, $matches * additionally contains entries for keys with the subpattern name. - * - * + * + * * If the pattern contains duplicate named subpatterns, only the rightmost * subpattern is stored in $matches[NAME]. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * - * + * + * * [1] => bar * ) * ]]> - * - * - * - * - * - * + * + * + * + * + * + * * PREG_SET_ORDER - * - * + * + * * Orders results so that $matches[0] is an array of first set * of matches, $matches[1] is an array of second set of matches, * and so on. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * + * * example: , example: * this is a test, this is a test * ]]> - * - * - * - * - * - * + * + * + * + * + * + * * PREG_OFFSET_CAPTURE - * - * + * + * * If this flag is passed, for every occurring match the appendant string * offset will also be returned. Note that this changes the value of * matches into an array of arrays where every element is an * array consisting of the matched string at offset 0 * and its string offset into subject at offset * 1. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * + * * Array * ( * [0] => Array @@ -116,9 +116,9 @@ * [0] => foobarbaz * [1] => 0 * ) - * + * * ) - * + * * [1] => Array * ( * [0] => Array @@ -126,9 +126,9 @@ * [0] => foo * [1] => 0 * ) - * + * * ) - * + * * [2] => Array * ( * [0] => Array @@ -136,9 +136,9 @@ * [0] => bar * [1] => 3 * ) - * + * * ) - * + * * [3] => Array * ( * [0] => Array @@ -146,105 +146,105 @@ * [0] => baz * [1] => 6 * ) - * + * * ) - * + * * ) * ]]> - * - * - * - * - * - * + * + * + * + * + * + * * PREG_UNMATCHED_AS_NULL - * - * + * + * * If this flag is passed, unmatched subpatterns are reported as NULL; * otherwise they are reported as an empty string. - * - * - * - * - * + * + * + * + * + * * Orders results so that $matches[0] is an array of full * pattern matches, $matches[1] is an array of strings matched by * the first parenthesized subpattern, and so on. - * - * - * - * + * + * + * + * * ]]> - * + * * The above example will output: - * + * * example: , this is a test * example: , this is a test * ]]> - * - * + * + * * So, $out[0] contains array of strings that matched full pattern, * and $out[1] contains array of strings enclosed by tags. - * - * - * + * + * + * * The above example will output: - * + * * So, $out[0] contains array of strings that matched full pattern, * and $out[1] contains array of strings enclosed by tags. - * + * * If the pattern contains named subpatterns, $matches * additionally contains entries for keys with the subpattern name. - * + * * If the pattern contains duplicate named subpatterns, only the rightmost * subpattern is stored in $matches[NAME]. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * - * + * + * * [1] => bar * ) * ]]> - * - * - * + * + * + * * The above example will output: - * + * * Orders results so that $matches[0] is an array of first set * of matches, $matches[1] is an array of second set of matches, * and so on. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * + * * example: , example: * this is a test, this is a test * ]]> - * - * - * + * + * + * * The above example will output: - * + * * If this flag is passed, for every occurring match the appendant string * offset will also be returned. Note that this changes the value of * matches into an array of arrays where every element is an * array consisting of the matched string at offset 0 * and its string offset into subject at offset * 1. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * + * * Array * ( * [0] => Array @@ -252,9 +252,9 @@ * [0] => foobarbaz * [1] => 0 * ) - * + * * ) - * + * * [1] => Array * ( * [0] => Array @@ -262,9 +262,9 @@ * [0] => foo * [1] => 0 * ) - * + * * ) - * + * * [2] => Array * ( * [0] => Array @@ -272,9 +272,9 @@ * [0] => bar * [1] => 3 * ) - * + * * ) - * + * * [3] => Array * ( * [0] => Array @@ -282,71 +282,71 @@ * [0] => baz * [1] => 6 * ) - * + * * ) - * + * * ) * ]]> - * - * - * + * + * + * * The above example will output: - * + * * If this flag is passed, unmatched subpatterns are reported as NULL; * otherwise they are reported as an empty string. - * + * * If no order flag is given, PREG_PATTERN_ORDER is * assumed. * @param int $offset Orders results so that $matches[0] is an array of full * pattern matches, $matches[1] is an array of strings matched by * the first parenthesized subpattern, and so on. - * - * - * - * + * + * + * + * * ]]> - * + * * The above example will output: - * + * * example: , this is a test * example: , this is a test * ]]> - * - * + * + * * So, $out[0] contains array of strings that matched full pattern, * and $out[1] contains array of strings enclosed by tags. - * - * - * + * + * + * * The above example will output: - * + * * So, $out[0] contains array of strings that matched full pattern, * and $out[1] contains array of strings enclosed by tags. - * + * * If the pattern contains named subpatterns, $matches * additionally contains entries for keys with the subpattern name. - * + * * If the pattern contains duplicate named subpatterns, only the rightmost * subpattern is stored in $matches[NAME]. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * - * + * + * * [1] => bar * ) * ]]> - * - * - * + * + * + * * The above example will output: * @return int Returns the number of full pattern matches (which might be zero), * . * @throws PcreException - * + * */ function preg_match_all(string $pattern, string $subject, array &$matches = null, int $flags = PREG_PATTERN_ORDER, int $offset = 0): int { @@ -357,10 +357,10 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null $result = \preg_match_all($pattern, $subject, $matches, $flags); } elseif ($matches !== null) { $result = \preg_match_all($pattern, $subject, $matches); - }else { + } else { $result = \preg_match_all($pattern, $subject); } - if ($result === FALSE) { + if ($result === false) { throw PcreException::createFromPhpError(); } return $result; @@ -370,7 +370,7 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null /** * Searches subject for a match to the regular * expression given in pattern. - * + * * @param string $pattern The pattern to search for, as a string. * @param string $subject The input string. * @param array $matches If matches is provided, then it is filled with @@ -379,69 +379,69 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null * will have the text that matched the first captured parenthesized * subpattern, and so on. * @param int $flags flags can be a combination of the following flags: - * - * + * + * * PREG_OFFSET_CAPTURE - * - * + * + * * If this flag is passed, for every occurring match the appendant string * offset will also be returned. Note that this changes the value of * matches into 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. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * + * * Array * ( * [0] => foobarbaz * [1] => 0 * ) - * + * * [1] => Array * ( * [0] => foo * [1] => 0 * ) - * + * * [2] => Array * ( * [0] => bar * [1] => 3 * ) - * + * * [3] => Array * ( * [0] => baz * [1] => 6 * ) - * + * * ) * ]]> - * - * - * - * - * - * + * + * + * + * + * + * * PREG_UNMATCHED_AS_NULL - * - * + * + * * If this flag is passed, unmatched subpatterns are reported as NULL; * otherwise they are reported as an empty string. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * - * + * + * * string(2) "ac" * [1]=> * string(1) "a" @@ -461,67 +461,67 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null * string(1) "c" * } * ]]> - * - * - * - * - * - * - * + * + * + * + * + * + * + * * If this flag is passed, for every occurring match the appendant string * offset will also be returned. Note that this changes the value of * matches into 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. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * + * * Array * ( * [0] => foobarbaz * [1] => 0 * ) - * + * * [1] => Array * ( * [0] => foo * [1] => 0 * ) - * + * * [2] => Array * ( * [0] => bar * [1] => 3 * ) - * + * * [3] => Array * ( * [0] => baz * [1] => 6 * ) - * + * * ) * ]]> - * - * - * + * + * + * * The above example will output: - * + * * If this flag is passed, unmatched subpatterns are reported as NULL; * otherwise they are reported as an empty string. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * - * + * + * * string(2) "ac" * [1]=> * string(1) "a" @@ -541,9 +541,9 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null * string(1) "c" * } * ]]> - * - * - * + * + * + * * The above example will output: * @param int $offset If this flag is passed, for every occurring match the appendant string * offset will also be returned. Note that this changes the value of @@ -551,47 +551,47 @@ function preg_match_all(string $pattern, string $subject, array &$matches = null * array consisting of the matched string at offset 0 * and its string offset into subject at offset * 1. - * - * - * + * + * + * * ]]> - * + * * The above example will output: - * + * * Array * ( * [0] => foobarbaz * [1] => 0 * ) - * + * * [1] => Array * ( * [0] => foo * [1] => 0 * ) - * + * * [2] => Array * ( * [0] => bar * [1] => 3 * ) - * + * * [3] => Array * ( * [0] => baz * [1] => 6 * ) - * + * * ) * ]]> - * - * - * + * + * + * * The above example will output: * @return int preg_match returns 1 if the pattern * matches given subject, 0 if it does not, . * @throws PcreException - * + * */ function preg_match(string $pattern, string $subject, array &$matches = null, int $flags = 0, int $offset = 0): int { @@ -602,10 +602,10 @@ function preg_match(string $pattern, string $subject, array &$matches = null, in $result = \preg_match($pattern, $subject, $matches, $flags); } elseif ($matches !== null) { $result = \preg_match($pattern, $subject, $matches); - }else { + } else { $result = \preg_match($pattern, $subject); } - if ($result === FALSE) { + if ($result === false) { throw PcreException::createFromPhpError(); } return $result; @@ -614,49 +614,49 @@ function preg_match(string $pattern, string $subject, array &$matches = null, in /** * Split the given string by a regular expression. - * + * * @param string $pattern The pattern to search for, as a string. * @param string $subject The input string. * @param int|null $limit If specified, then only substrings up to limit * are returned with the rest of the string being placed in the last * substring. A limit of -1 or 0 means "no limit" - * and, as is standard across PHP, you can use NULL to skip to the + * and, as is standard across PHP, you can use NULL to skip to the * flags parameter. * @param int $flags flags can be any combination of the following * flags (combined with the | bitwise operator): - * - * + * + * * PREG_SPLIT_NO_EMPTY - * - * + * + * * If this flag is set, only non-empty pieces will be returned by * preg_split. - * - * - * - * + * + * + * + * * PREG_SPLIT_DELIM_CAPTURE - * - * + * + * * If this flag is set, parenthesized expression in the delimiter pattern * will be captured and returned as well. - * - * - * - * + * + * + * + * * PREG_SPLIT_OFFSET_CAPTURE - * - * + * + * * If this flag is set, for every occurring match the appendant string * offset will also be returned. Note that this changes the return * 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. - * - * - * - * - * + * + * + * + * + * * If this flag is set, for every occurring match the appendant string * offset will also be returned. Note that this changes the return * value in an array where every element is an array consisting of the @@ -665,16 +665,14 @@ function preg_match(string $pattern, string $subject, array &$matches = null, in * @return array Returns an array containing substrings of subject * split along boundaries matched by pattern, . * @throws PcreException - * + * */ function preg_split(string $pattern, string $subject, int $limit = -1, int $flags = 0): array { error_clear_last(); $result = \preg_split($pattern, $subject, $limit, $flags); - if ($result === FALSE) { + if ($result === false) { throw PcreException::createFromPhpError(); } return $result; } - - diff --git a/generated/pdf.php b/generated/pdf.php index b0c69622..19c9b626 100644 --- a/generated/pdf.php +++ b/generated/pdf.php @@ -7,17 +7,17 @@ /** * Activates a previously created structure element or other content item. * Returns TRUE on success . - * - * @param resource $pdfdoc - * @param int $id + * + * @param resource $pdfdoc + * @param int $id * @throws PdfException - * + * */ function PDF_activate_item($pdfdoc, int $id): void { error_clear_last(); $result = \PDF_activate_item($pdfdoc, $id); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -26,27 +26,27 @@ function PDF_activate_item($pdfdoc, int $id): void /** * Add a link annotation to a target within the current PDF file. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_create_action with type=GoTo * and PDF_create_annotation with * type=Link instead. - * - * @param resource $pdfdoc - * @param float $lowerleftx - * @param float $lowerlefty - * @param float $upperrightx - * @param float $upperrighty - * @param int $page - * @param string $dest + * + * @param resource $pdfdoc + * @param float $lowerleftx + * @param float $lowerlefty + * @param float $upperrightx + * @param float $upperrighty + * @param int $page + * @param string $dest * @throws PdfException - * + * */ function PDF_add_locallink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, int $page, string $dest): void { error_clear_last(); $result = \PDF_add_locallink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $page, $dest); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -55,18 +55,18 @@ function PDF_add_locallink($pdfdoc, float $lowerleftx, float $lowerlefty, float /** * Creates a named destination on an arbitrary page in the current document. * Returns TRUE on success . - * - * @param resource $pdfdoc - * @param string $name - * @param string $optlist + * + * @param resource $pdfdoc + * @param string $name + * @param string $optlist * @throws PdfException - * + * */ function PDF_add_nameddest($pdfdoc, string $name, string $optlist): void { error_clear_last(); $result = \PDF_add_nameddest($pdfdoc, $name, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -74,28 +74,28 @@ function PDF_add_nameddest($pdfdoc, string $name, string $optlist): void /** * Sets an annotation for the current page. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_create_annotation with * type=Text instead. - * - * @param resource $pdfdoc - * @param float $llx - * @param float $lly - * @param float $urx - * @param float $ury - * @param string $contents - * @param string $title - * @param string $icon - * @param int $open - * @throws PdfException - * + * + * @param resource $pdfdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $contents + * @param string $title + * @param string $icon + * @param int $open + * @throws PdfException + * */ function PDF_add_note($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void { error_clear_last(); $result = \PDF_add_note($pdfdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -104,29 +104,29 @@ function PDF_add_note($pdfdoc, float $llx, float $lly, float $urx, float $ury, s /** * Add a file link annotation to a PDF target. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_create_action with * type=GoToR and * PDF_create_annotation with * type=Link instead. - * - * @param resource $pdfdoc - * @param float $bottom_left_x - * @param float $bottom_left_y - * @param float $up_right_x - * @param float $up_right_y - * @param string $filename - * @param int $page - * @param string $dest - * @throws PdfException - * + * + * @param resource $pdfdoc + * @param float $bottom_left_x + * @param float $bottom_left_y + * @param float $up_right_x + * @param float $up_right_y + * @param string $filename + * @param int $page + * @param string $dest + * @throws PdfException + * */ function PDF_add_pdflink($pdfdoc, float $bottom_left_x, float $bottom_left_y, float $up_right_x, float $up_right_y, string $filename, int $page, string $dest): void { error_clear_last(); $result = \PDF_add_pdflink($pdfdoc, $bottom_left_x, $bottom_left_y, $up_right_x, $up_right_y, $filename, $page, $dest); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -135,17 +135,17 @@ function PDF_add_pdflink($pdfdoc, float $bottom_left_x, float $bottom_left_y, fl /** * Adds an existing image as thumbnail for the current page. * Returns TRUE on success . - * - * @param resource $pdfdoc - * @param int $image + * + * @param resource $pdfdoc + * @param int $image * @throws PdfException - * + * */ function PDF_add_thumbnail($pdfdoc, int $image): void { error_clear_last(); $result = \PDF_add_thumbnail($pdfdoc, $image); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -154,26 +154,26 @@ function PDF_add_thumbnail($pdfdoc, int $image): void /** * Adds a weblink annotation to a target url on the Web. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_create_action with type=URI * and PDF_create_annotation with * type=Link instead. - * - * @param resource $pdfdoc - * @param float $lowerleftx - * @param float $lowerlefty - * @param float $upperrightx - * @param float $upperrighty - * @param string $url + * + * @param resource $pdfdoc + * @param float $lowerleftx + * @param float $lowerlefty + * @param float $upperrightx + * @param float $upperrighty + * @param string $url * @throws PdfException - * + * */ function PDF_add_weblink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, string $url): void { error_clear_last(); $result = \PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -181,29 +181,29 @@ function PDF_add_weblink($pdfdoc, float $lowerleftx, float $lowerlefty, float $u /** * Adds a file attachment annotation. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_create_annotation with * type=FileAttachment instead. - * - * @param resource $pdfdoc - * @param float $llx - * @param float $lly - * @param float $urx - * @param float $ury - * @param string $filename - * @param string $description - * @param string $author - * @param string $mimetype - * @param string $icon - * @throws PdfException - * + * + * @param resource $pdfdoc + * @param float $llx + * @param float $lly + * @param float $urx + * @param float $ury + * @param string $filename + * @param string $description + * @param string $author + * @param string $mimetype + * @param string $icon + * @throws PdfException + * */ function PDF_attach_file($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $filename, string $description, string $author, string $mimetype, string $icon): void { error_clear_last(); $result = \PDF_attach_file($pdfdoc, $llx, $lly, $urx, $ury, $filename, $description, $author, $mimetype, $icon); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -211,19 +211,19 @@ function PDF_attach_file($pdfdoc, float $llx, float $lly, float $urx, float $ury /** * Starts a layer for subsequent output on the page. Returns TRUE on success . - * + * * This function requires PDF 1.5. - * - * @param resource $pdfdoc - * @param int $layer + * + * @param resource $pdfdoc + * @param int $layer * @throws PdfException - * + * */ function PDF_begin_layer($pdfdoc, int $layer): void { error_clear_last(); $result = \PDF_begin_layer($pdfdoc, $layer); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -233,81 +233,81 @@ function PDF_begin_layer($pdfdoc, int $layer): void * Adds a new page to the document, and specifies various options. * The parameters width and height * are the dimensions of the new page in points. Returns TRUE on success . - * - * + * + * * Common Page Sizes in Points - * - * - * + * + * + * * name * size - * - * - * - * + * + * + * + * * A0 * 2380 x 3368 - * - * + * + * * A1 * 1684 x 2380 - * - * + * + * * A2 * 1190 x 1684 - * - * + * + * * A3 * 842 x 1190 - * - * + * + * * A4 * 595 x 842 - * - * + * + * * A5 * 421 x 595 - * - * + * + * * A6 * 297 x 421 - * - * + * + * * B5 * 501 x 709 - * - * + * + * * letter (8.5" x 11") * 612 x 792 - * - * + * + * * legal (8.5" x 14") * 612 x 1008 - * - * + * + * * ledger (17" x 11") * 1224 x 792 - * - * + * + * * 11" x 17" * 792 x 1224 - * - * - * - * - * - * @param resource $pdfdoc - * @param float $width - * @param float $height - * @param string $optlist - * @throws PdfException - * + * + * + * + * + * + * @param resource $pdfdoc + * @param float $width + * @param float $height + * @param string $optlist + * @throws PdfException + * */ function PDF_begin_page_ext($pdfdoc, float $width, float $height, string $optlist): void { error_clear_last(); $result = \PDF_begin_page_ext($pdfdoc, $width, $height, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -315,21 +315,21 @@ function PDF_begin_page_ext($pdfdoc, float $width, float $height, string $optlis /** * Adds a new page to the document. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_begin_page_ext instead. - * - * @param resource $pdfdoc - * @param float $width - * @param float $height + * + * @param resource $pdfdoc + * @param float $width + * @param float $height * @throws PdfException - * + * */ function PDF_begin_page($pdfdoc, float $width, float $height): void { error_clear_last(); $result = \PDF_begin_page($pdfdoc, $width, $height); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -337,19 +337,19 @@ function PDF_begin_page($pdfdoc, float $width, float $height): void /** * Adds a circle. Returns TRUE on success . - * - * @param resource $pdfdoc - * @param float $x - * @param float $y - * @param float $r + * + * @param resource $pdfdoc + * @param float $x + * @param float $y + * @param float $r * @throws PdfException - * + * */ function PDF_circle($pdfdoc, float $x, float $y, float $r): void { error_clear_last(); $result = \PDF_circle($pdfdoc, $x, $y, $r); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -357,16 +357,16 @@ function PDF_circle($pdfdoc, float $x, float $y, float $r): void /** * Uses the current path as clipping path, and terminate the path. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_clip($p): void { error_clear_last(); $result = \PDF_clip($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -374,17 +374,17 @@ function PDF_clip($p): void /** * Closes the page handle, and frees all page-related resources. Returns TRUE on success . - * - * @param resource $p - * @param int $page + * + * @param resource $p + * @param int $page * @throws PdfException - * + * */ function PDF_close_pdi_page($p, int $page): void { error_clear_last(); $result = \PDF_close_pdi_page($p, $page); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -392,20 +392,20 @@ function PDF_close_pdi_page($p, int $page): void /** * Closes all open page handles, and closes the input PDF document. Returns TRUE on success . - * - * This function is deprecated since PDFlib version 7, + * + * This function is deprecated since PDFlib version 7, * use PDF_close_pdi_document instead. - * - * @param resource $p - * @param int $doc + * + * @param resource $p + * @param int $doc * @throws PdfException - * + * */ function PDF_close_pdi($p, int $doc): void { error_clear_last(); $result = \PDF_close_pdi($p, $doc); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -414,19 +414,19 @@ function PDF_close_pdi($p, int $doc): void /** * Closes the generated PDF file, and frees all document-related resources. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_end_document instead. - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_close($p): void { error_clear_last(); $result = \PDF_close($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -434,16 +434,16 @@ function PDF_close($p): void /** * Closes the path, fills, and strokes it. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_closepath_fill_stroke($p): void { error_clear_last(); $result = \PDF_closepath_fill_stroke($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -451,16 +451,16 @@ function PDF_closepath_fill_stroke($p): void /** * Closes the path, and strokes it. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_closepath_stroke($p): void { error_clear_last(); $result = \PDF_closepath_stroke($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -468,16 +468,16 @@ function PDF_closepath_stroke($p): void /** * Closes the current path. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_closepath($p): void { error_clear_last(); $result = \PDF_closepath($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -485,22 +485,22 @@ function PDF_closepath($p): void /** * Concatenates a matrix to the current transformation matrix (CTM). Returns TRUE on success . - * - * @param resource $p - * @param float $a - * @param float $b - * @param float $c - * @param float $d - * @param float $e - * @param float $f + * + * @param resource $p + * @param float $a + * @param float $b + * @param float $c + * @param float $d + * @param float $e + * @param float $f * @throws PdfException - * + * */ function PDF_concat($p, float $a, float $b, float $c, float $d, float $e, float $f): void { error_clear_last(); $result = \PDF_concat($p, $a, $b, $c, $d, $e, $f); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -508,17 +508,17 @@ function PDF_concat($p, float $a, float $b, float $c, float $d, float $e, float /** * Prints text at the next line. Returns TRUE on success . - * - * @param resource $p - * @param string $text + * + * @param resource $p + * @param string $text * @throws PdfException - * + * */ function PDF_continue_text($p, string $text): void { error_clear_last(); $result = \PDF_continue_text($p, $text); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -527,22 +527,22 @@ function PDF_continue_text($p, string $text): void /** * Draws a Bezier curve from the current point, using 3 more control points. * Returns TRUE on success . - * - * @param resource $p - * @param float $x1 - * @param float $y1 - * @param float $x2 - * @param float $y2 - * @param float $x3 - * @param float $y3 + * + * @param resource $p + * @param float $x1 + * @param float $y1 + * @param float $x2 + * @param float $y2 + * @param float $x3 + * @param float $y3 * @throws PdfException - * + * */ function PDF_curveto($p, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void { error_clear_last(); $result = \PDF_curveto($p, $x1, $y1, $x2, $y2, $x3, $y3); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -550,16 +550,16 @@ function PDF_curveto($p, float $x1, float $y1, float $x2, float $y2, float $x3, /** * Deletes a PDFlib object, and frees all internal resources. Returns TRUE on success . - * - * @param resource $pdfdoc + * + * @param resource $pdfdoc * @throws PdfException - * + * */ function PDF_delete($pdfdoc): void { error_clear_last(); $result = \PDF_delete($pdfdoc); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -567,18 +567,18 @@ function PDF_delete($pdfdoc): void /** * Deactivates all active layers. Returns TRUE on success . - * + * * This function requires PDF 1.5. - * - * @param resource $pdfdoc + * + * @param resource $pdfdoc * @throws PdfException - * + * */ function PDF_end_layer($pdfdoc): void { error_clear_last(); $result = \PDF_end_layer($pdfdoc); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -586,17 +586,17 @@ function PDF_end_layer($pdfdoc): void /** * Finishes a page, and applies various options. Returns TRUE on success . - * - * @param resource $pdfdoc - * @param string $optlist + * + * @param resource $pdfdoc + * @param string $optlist * @throws PdfException - * + * */ function PDF_end_page_ext($pdfdoc, string $optlist): void { error_clear_last(); $result = \PDF_end_page_ext($pdfdoc, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -604,16 +604,16 @@ function PDF_end_page_ext($pdfdoc, string $optlist): void /** * Finishes the page. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_end_page($p): void { error_clear_last(); $result = \PDF_end_page($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -621,16 +621,16 @@ function PDF_end_page($p): void /** * Finishes the pattern definition. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_end_pattern($p): void { error_clear_last(); $result = \PDF_end_pattern($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -638,16 +638,16 @@ function PDF_end_pattern($p): void /** * Finishes a template definition. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_end_template($p): void { error_clear_last(); $result = \PDF_end_template($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -656,16 +656,16 @@ function PDF_end_template($p): void /** * Fills and strokes the current path with the current fill and stroke color. * Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_fill_stroke($p): void { error_clear_last(); $result = \PDF_fill_stroke($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -674,16 +674,16 @@ function PDF_fill_stroke($p): void /** * Fills the interior of the current path with the current fill color. * Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_fill($p): void { error_clear_last(); $result = \PDF_fill($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -692,20 +692,20 @@ function PDF_fill($p): void /** * Places an image or template on the page, subject to various options. * Returns TRUE on success . - * - * @param resource $pdfdoc - * @param int $image - * @param float $x - * @param float $y - * @param string $optlist + * + * @param resource $pdfdoc + * @param int $image + * @param float $x + * @param float $y + * @param string $optlist * @throws PdfException - * + * */ function PDF_fit_image($pdfdoc, int $image, float $x, float $y, string $optlist): void { error_clear_last(); $result = \PDF_fit_image($pdfdoc, $image, $x, $y, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -714,20 +714,20 @@ function PDF_fit_image($pdfdoc, int $image, float $x, float $y, string $optlist) /** * Places an imported PDF page on the page, subject to various options. * Returns TRUE on success . - * - * @param resource $pdfdoc - * @param int $page - * @param float $x - * @param float $y - * @param string $optlist + * + * @param resource $pdfdoc + * @param int $page + * @param float $x + * @param float $y + * @param string $optlist * @throws PdfException - * + * */ function PDF_fit_pdi_page($pdfdoc, int $page, float $x, float $y, string $optlist): void { error_clear_last(); $result = \PDF_fit_pdi_page($pdfdoc, $page, $x, $y, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -735,20 +735,20 @@ function PDF_fit_pdi_page($pdfdoc, int $page, float $x, float $y, string $optlis /** * Places a single line of text on the page, subject to various options. Returns TRUE on success . - * - * @param resource $pdfdoc - * @param string $text - * @param float $x - * @param float $y - * @param string $optlist + * + * @param resource $pdfdoc + * @param string $text + * @param float $x + * @param float $y + * @param string $optlist * @throws PdfException - * + * */ function PDF_fit_textline($pdfdoc, string $text, float $x, float $y, string $optlist): void { error_clear_last(); $result = \PDF_fit_textline($pdfdoc, $text, $x, $y, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -757,16 +757,16 @@ function PDF_fit_textline($pdfdoc, string $text, float $x, float $y, string $opt /** * Reset all color and graphics state parameters to their defaults. * Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_initgraphics($p): void { error_clear_last(); $result = \PDF_initgraphics($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -774,18 +774,18 @@ function PDF_initgraphics($p): void /** * Draws a line from the current point to another point. Returns TRUE on success . - * - * @param resource $p - * @param float $x - * @param float $y + * + * @param resource $p + * @param float $x + * @param float $y * @throws PdfException - * + * */ function PDF_lineto($p, float $x, float $y): void { error_clear_last(); $result = \PDF_lineto($p, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -794,18 +794,18 @@ function PDF_lineto($p, float $x, float $y): void /** * Finds a built-in spot color name, or makes a named spot color from the * current fill color. Returns TRUE on success . - * - * @param resource $p - * @param string $spotname - * @return int + * + * @param resource $p + * @param string $spotname + * @return int * @throws PdfException - * + * */ function PDF_makespotcolor($p, string $spotname): int { error_clear_last(); $result = \PDF_makespotcolor($p, $spotname); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } return $result; @@ -814,18 +814,18 @@ function PDF_makespotcolor($p, string $spotname): int /** * Sets the current point for graphics output. Returns TRUE on success . - * - * @param resource $p - * @param float $x - * @param float $y + * + * @param resource $p + * @param float $x + * @param float $y * @throws PdfException - * + * */ function PDF_moveto($p, float $x, float $y): void { error_clear_last(); $result = \PDF_moveto($p, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -834,20 +834,20 @@ function PDF_moveto($p, float $x, float $y): void /** * Creates a new PDF file using the supplied file name. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * PDF_begin_document instead. - * - * @param resource $p - * @param string $filename + * + * @param resource $p + * @param string $filename * @throws PdfException - * + * */ function PDF_open_file($p, string $filename): void { error_clear_last(); $result = \PDF_open_file($p, $filename); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -855,23 +855,23 @@ function PDF_open_file($p, string $filename): void /** * Places an image and scales it. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 5, use * PDF_fit_image instead. - * - * @param resource $pdfdoc - * @param int $image - * @param float $x - * @param float $y - * @param float $scale + * + * @param resource $pdfdoc + * @param int $image + * @param float $x + * @param float $y + * @param float $scale * @throws PdfException - * + * */ function PDF_place_image($pdfdoc, int $image, float $x, float $y, float $scale): void { error_clear_last(); $result = \PDF_place_image($pdfdoc, $image, $x, $y, $scale); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -879,24 +879,24 @@ function PDF_place_image($pdfdoc, int $image, float $x, float $y, float $scale): /** * Places a PDF page and scales it. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 5, use * PDF_fit_pdi_page instead. - * - * @param resource $pdfdoc - * @param int $page - * @param float $x - * @param float $y - * @param float $sx - * @param float $sy + * + * @param resource $pdfdoc + * @param int $page + * @param float $x + * @param float $y + * @param float $sx + * @param float $sy * @throws PdfException - * + * */ function PDF_place_pdi_page($pdfdoc, int $page, float $x, float $y, float $sx, float $sy): void { error_clear_last(); $result = \PDF_place_pdi_page($pdfdoc, $page, $x, $y, $sx, $sy); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -904,20 +904,20 @@ function PDF_place_pdi_page($pdfdoc, int $page, float $x, float $y, float $sx, f /** * Draws a rectangle. Returns TRUE on success . - * - * @param resource $p - * @param float $x - * @param float $y - * @param float $width - * @param float $height + * + * @param resource $p + * @param float $x + * @param float $y + * @param float $width + * @param float $height * @throws PdfException - * + * */ function PDF_rect($p, float $x, float $y, float $width, float $height): void { error_clear_last(); $result = \PDF_rect($p, $x, $y, $width, $height); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -925,16 +925,16 @@ function PDF_rect($p, float $x, float $y, float $width, float $height): void /** * Restores the most recently saved graphics state. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_restore($p): void { error_clear_last(); $result = \PDF_restore($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -942,17 +942,17 @@ function PDF_restore($p): void /** * Rotates the coordinate system. Returns TRUE on success . - * - * @param resource $p - * @param float $phi + * + * @param resource $p + * @param float $phi * @throws PdfException - * + * */ function PDF_rotate($p, float $phi): void { error_clear_last(); $result = \PDF_rotate($p, $phi); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -960,16 +960,16 @@ function PDF_rotate($p, float $phi): void /** * Saves the current graphics state. Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_save($p): void { error_clear_last(); $result = \PDF_save($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -977,18 +977,18 @@ function PDF_save($p): void /** * Scales the coordinate system. Returns TRUE on success . - * - * @param resource $p - * @param float $sx - * @param float $sy + * + * @param resource $p + * @param float $sx + * @param float $sy * @throws PdfException - * + * */ function PDF_scale($p, float $sx, float $sy): void { error_clear_last(); $result = \PDF_scale($p, $sx, $sy); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -996,23 +996,23 @@ function PDF_scale($p, float $sx, float $sy): void /** * Sets the border color for all kinds of annotations. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * the option annotcolor in * PDF_create_annotation instead. - * - * @param resource $p - * @param float $red - * @param float $green - * @param float $blue + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue * @throws PdfException - * + * */ function PDF_set_border_color($p, float $red, float $green, float $blue): void { error_clear_last(); $result = \PDF_set_border_color($p, $red, $green, $blue); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1020,22 +1020,22 @@ function PDF_set_border_color($p, float $red, float $green, float $blue): void /** * Sets the border dash style for all kinds of annotations. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * the option dasharray in * PDF_create_annotation instead. - * - * @param resource $pdfdoc - * @param float $black - * @param float $white + * + * @param resource $pdfdoc + * @param float $black + * @param float $white * @throws PdfException - * + * */ function PDF_set_border_dash($pdfdoc, float $black, float $white): void { error_clear_last(); $result = \PDF_set_border_dash($pdfdoc, $black, $white); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1043,23 +1043,23 @@ function PDF_set_border_dash($pdfdoc, float $black, float $white): void /** * Sets the border style for all kinds of annotations. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 6, use * the options borderstyle and * linewidth in * PDF_create_annotation instead. - * - * @param resource $pdfdoc - * @param string $style - * @param float $width + * + * @param resource $pdfdoc + * @param string $style + * @param float $width * @throws PdfException - * + * */ function PDF_set_border_style($pdfdoc, string $style, float $width): void { error_clear_last(); $result = \PDF_set_border_style($pdfdoc, $style, $width); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1068,18 +1068,18 @@ function PDF_set_border_style($pdfdoc, string $style, float $width): void /** * Fill document information field key with * value. Returns TRUE on success . - * - * @param resource $p - * @param string $key - * @param string $value + * + * @param resource $p + * @param string $key + * @param string $value * @throws PdfException - * + * */ function PDF_set_info($p, string $key, string $value): void { error_clear_last(); $result = \PDF_set_info($p, $key, $value); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1087,20 +1087,20 @@ function PDF_set_info($p, string $key, string $value): void /** * Defines hierarchical and group relationships among layers. Returns TRUE on success . - * + * * This function requires PDF 1.5. - * - * @param resource $pdfdoc - * @param string $type - * @param string $optlist + * + * @param resource $pdfdoc + * @param string $type + * @param string $optlist * @throws PdfException - * + * */ function PDF_set_layer_dependency($pdfdoc, string $type, string $optlist): void { error_clear_last(); $result = \PDF_set_layer_dependency($pdfdoc, $type, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1108,18 +1108,18 @@ function PDF_set_layer_dependency($pdfdoc, string $type, string $optlist): void /** * Sets some PDFlib parameter with string type. Returns TRUE on success . - * - * @param resource $p - * @param string $key - * @param string $value + * + * @param resource $p + * @param string $key + * @param string $value * @throws PdfException - * + * */ function PDF_set_parameter($p, string $key, string $value): void { error_clear_last(); $result = \PDF_set_parameter($p, $key, $value); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1127,18 +1127,18 @@ function PDF_set_parameter($p, string $key, string $value): void /** * Sets the position for text output on the page. Returns TRUE on success . - * - * @param resource $p - * @param float $x - * @param float $y + * + * @param resource $p + * @param float $x + * @param float $y * @throws PdfException - * + * */ function PDF_set_text_pos($p, float $x, float $y): void { error_clear_last(); $result = \PDF_set_text_pos($p, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1146,18 +1146,18 @@ function PDF_set_text_pos($p, float $x, float $y): void /** * Sets the value of some PDFlib parameter with numerical type. Returns TRUE on success . - * - * @param resource $p - * @param string $key - * @param float $value + * + * @param resource $p + * @param string $key + * @param float $value * @throws PdfException - * + * */ function PDF_set_value($p, string $key, float $value): void { error_clear_last(); $result = \PDF_set_value($p, $key, $value); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1165,22 +1165,22 @@ function PDF_set_value($p, string $key, float $value): void /** * Sets the current color space and color. Returns TRUE on success . - * - * @param resource $p - * @param string $fstype - * @param string $colorspace - * @param float $c1 - * @param float $c2 - * @param float $c3 - * @param float $c4 + * + * @param resource $p + * @param string $fstype + * @param string $colorspace + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 * @throws PdfException - * + * */ function PDF_setcolor($p, string $fstype, string $colorspace, float $c1, float $c2, float $c3, float $c4): void { error_clear_last(); $result = \PDF_setcolor($p, $fstype, $colorspace, $c1, $c2, $c3, $c4); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1189,18 +1189,18 @@ function PDF_setcolor($p, string $fstype, string $colorspace, float $c1, float $ /** * Sets the current dash pattern to b black * and w white units. Returns TRUE on success . - * - * @param resource $pdfdoc - * @param float $b - * @param float $w + * + * @param resource $pdfdoc + * @param float $b + * @param float $w * @throws PdfException - * + * */ function PDF_setdash($pdfdoc, float $b, float $w): void { error_clear_last(); $result = \PDF_setdash($pdfdoc, $b, $w); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1208,17 +1208,17 @@ function PDF_setdash($pdfdoc, float $b, float $w): void /** * Sets a dash pattern defined by an option list. Returns TRUE on success . - * - * @param resource $pdfdoc - * @param string $optlist + * + * @param resource $pdfdoc + * @param string $optlist * @throws PdfException - * + * */ function PDF_setdashpattern($pdfdoc, string $optlist): void { error_clear_last(); $result = \PDF_setdashpattern($pdfdoc, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1226,17 +1226,17 @@ function PDF_setdashpattern($pdfdoc, string $optlist): void /** * Sets the flatness parameter. Returns TRUE on success . - * - * @param resource $pdfdoc - * @param float $flatness + * + * @param resource $pdfdoc + * @param float $flatness * @throws PdfException - * + * */ function PDF_setflat($pdfdoc, float $flatness): void { error_clear_last(); $result = \PDF_setflat($pdfdoc, $flatness); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1246,18 +1246,18 @@ function PDF_setflat($pdfdoc, float $flatness): void * Sets the current font in the specified fontsize, using a * font handle returned by PDF_load_font. * Returns TRUE on success . - * - * @param resource $pdfdoc - * @param int $font - * @param float $fontsize + * + * @param resource $pdfdoc + * @param int $font + * @param float $fontsize * @throws PdfException - * + * */ function PDF_setfont($pdfdoc, int $font, float $fontsize): void { error_clear_last(); $result = \PDF_setfont($pdfdoc, $font, $fontsize); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1266,20 +1266,20 @@ function PDF_setfont($pdfdoc, int $font, float $fontsize): void /** * Sets the current fill color to a gray value between 0 and 1 inclusive. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 4, use * PDF_setcolor instead. - * - * @param resource $p - * @param float $g + * + * @param resource $p + * @param float $g * @throws PdfException - * + * */ function PDF_setgray_fill($p, float $g): void { error_clear_last(); $result = \PDF_setgray_fill($p, $g); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1288,20 +1288,20 @@ function PDF_setgray_fill($p, float $g): void /** * Sets the current stroke color to a gray value between 0 and 1 inclusive. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 4, use * PDF_setcolor instead. - * - * @param resource $p - * @param float $g + * + * @param resource $p + * @param float $g * @throws PdfException - * + * */ function PDF_setgray_stroke($p, float $g): void { error_clear_last(); $result = \PDF_setgray_stroke($p, $g); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1309,20 +1309,20 @@ function PDF_setgray_stroke($p, float $g): void /** * Sets the current fill and stroke color to a gray value between 0 and 1 inclusive. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 4, use * PDF_setcolor instead. - * - * @param resource $p - * @param float $g + * + * @param resource $p + * @param float $g * @throws PdfException - * + * */ function PDF_setgray($p, float $g): void { error_clear_last(); $result = \PDF_setgray($p, $g); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1331,17 +1331,17 @@ function PDF_setgray($p, float $g): void /** * Sets the linejoin parameter to specify the shape * at the corners of paths that are stroked. Returns TRUE on success . - * - * @param resource $p - * @param int $value + * + * @param resource $p + * @param int $value * @throws PdfException - * + * */ function PDF_setlinejoin($p, int $value): void { error_clear_last(); $result = \PDF_setlinejoin($p, $value); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1349,17 +1349,17 @@ function PDF_setlinejoin($p, int $value): void /** * Sets the current line width. Returns TRUE on success . - * - * @param resource $p - * @param float $width + * + * @param resource $p + * @param float $width * @throws PdfException - * + * */ function PDF_setlinewidth($p, float $width): void { error_clear_last(); $result = \PDF_setlinewidth($p, $width); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1367,22 +1367,22 @@ function PDF_setlinewidth($p, float $width): void /** * Explicitly sets the current transformation matrix. Returns TRUE on success . - * - * @param resource $p - * @param float $a - * @param float $b - * @param float $c - * @param float $d - * @param float $e - * @param float $f + * + * @param resource $p + * @param float $a + * @param float $b + * @param float $c + * @param float $d + * @param float $e + * @param float $f * @throws PdfException - * + * */ function PDF_setmatrix($p, float $a, float $b, float $c, float $d, float $e, float $f): void { error_clear_last(); $result = \PDF_setmatrix($p, $a, $b, $c, $d, $e, $f); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1390,17 +1390,17 @@ function PDF_setmatrix($p, float $a, float $b, float $c, float $d, float $e, flo /** * Sets the miter limit.Returns TRUE on success . - * - * @param resource $pdfdoc - * @param float $miter + * + * @param resource $pdfdoc + * @param float $miter * @throws PdfException - * + * */ function PDF_setmiterlimit($pdfdoc, float $miter): void { error_clear_last(); $result = \PDF_setmiterlimit($pdfdoc, $miter); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1408,22 +1408,22 @@ function PDF_setmiterlimit($pdfdoc, float $miter): void /** * Sets the current fill color to the supplied RGB values. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 4, use * PDF_setcolor instead. - * - * @param resource $p - * @param float $red - * @param float $green - * @param float $blue + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue * @throws PdfException - * + * */ function PDF_setrgbcolor_fill($p, float $red, float $green, float $blue): void { error_clear_last(); $result = \PDF_setrgbcolor_fill($p, $red, $green, $blue); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1431,22 +1431,22 @@ function PDF_setrgbcolor_fill($p, float $red, float $green, float $blue): void /** * Sets the current stroke color to the supplied RGB values. Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 4, use * PDF_setcolor instead. - * - * @param resource $p - * @param float $red - * @param float $green - * @param float $blue + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue * @throws PdfException - * + * */ function PDF_setrgbcolor_stroke($p, float $red, float $green, float $blue): void { error_clear_last(); $result = \PDF_setrgbcolor_stroke($p, $red, $green, $blue); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1455,22 +1455,22 @@ function PDF_setrgbcolor_stroke($p, float $red, float $green, float $blue): void /** * Sets the current fill and stroke color to the supplied RGB values. * Returns TRUE on success . - * + * * This function is deprecated since PDFlib version 4, use * PDF_setcolor instead. - * - * @param resource $p - * @param float $red - * @param float $green - * @param float $blue + * + * @param resource $p + * @param float $red + * @param float $green + * @param float $blue * @throws PdfException - * + * */ function PDF_setrgbcolor($p, float $red, float $green, float $blue): void { error_clear_last(); $result = \PDF_setrgbcolor($p, $red, $green, $blue); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1478,19 +1478,19 @@ function PDF_setrgbcolor($p, float $red, float $green, float $blue): void /** * Prints text in the current font. Returns TRUE on success . - * - * @param resource $p - * @param string $text - * @param float $x - * @param float $y + * + * @param resource $p + * @param string $text + * @param float $x + * @param float $y * @throws PdfException - * + * */ function PDF_show_xy($p, string $text, float $x, float $y): void { error_clear_last(); $result = \PDF_show_xy($p, $text, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1499,17 +1499,17 @@ function PDF_show_xy($p, string $text, float $x, float $y): void /** * Prints text in the current font and size at * the current position. Returns TRUE on success . - * - * @param resource $pdfdoc - * @param string $text + * + * @param resource $pdfdoc + * @param string $text * @throws PdfException - * + * */ function PDF_show($pdfdoc, string $text): void { error_clear_last(); $result = \PDF_show($pdfdoc, $text); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1518,18 +1518,18 @@ function PDF_show($pdfdoc, string $text): void /** * Skews the coordinate system in x and y direction by alpha * and beta degrees, respectively. Returns TRUE on success . - * - * @param resource $p - * @param float $alpha - * @param float $beta + * + * @param resource $p + * @param float $alpha + * @param float $beta * @throws PdfException - * + * */ function PDF_skew($p, float $alpha, float $beta): void { error_clear_last(); $result = \PDF_skew($p, $alpha, $beta); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } @@ -1538,18 +1538,16 @@ function PDF_skew($p, float $alpha, float $beta): void /** * Strokes the path with the current color and line width, and clear it. * Returns TRUE on success . - * - * @param resource $p + * + * @param resource $p * @throws PdfException - * + * */ function PDF_stroke($p): void { error_clear_last(); $result = \PDF_stroke($p); - if ($result === FALSE) { + if ($result === false) { throw PdfException::createFromPhpError(); } } - - diff --git a/generated/pgsql.php b/generated/pgsql.php index ca68f16a..0769d2c5 100644 --- a/generated/pgsql.php +++ b/generated/pgsql.php @@ -5,49 +5,49 @@ use Safe\Exceptions\PgsqlException; /** - * pg_cancel_query cancels an asynchronous query sent with + * pg_cancel_query cancels an asynchronous query sent with * pg_send_query, pg_send_query_params - * or pg_send_execute. You cannot cancel a query executed using + * or pg_send_execute. You cannot cancel a query executed using * pg_query. - * + * * @param resource $connection PostgreSQL database connection resource. * @throws PgsqlException - * + * */ function pg_cancel_query($connection): void { error_clear_last(); $result = \pg_cancel_query($connection); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } /** - * PostgreSQL supports automatic character set conversion between + * PostgreSQL supports automatic character set conversion between * server and client for certain character sets. * pg_client_encoding returns the client * encoding as a string. The returned string will be one of the * standard PostgreSQL encoding identifiers. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @return string The client encoding, . * @throws PgsqlException - * + * */ function pg_client_encoding($connection = null): string { error_clear_last(); if ($connection !== null) { $result = \pg_client_encoding($connection); - }else { + } else { $result = \pg_client_encoding(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -58,26 +58,26 @@ function pg_client_encoding($connection = null): string * pg_close closes the non-persistent * connection to a PostgreSQL database associated with the given * connection resource. - * + * * If there is open large object resource on the connection, do not * close the connection before closing all large object resources. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @throws PgsqlException - * + * */ function pg_close($connection = null): void { error_clear_last(); if ($connection !== null) { $result = \pg_close($connection); - }else { + } else { $result = \pg_close(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -86,16 +86,16 @@ function pg_close($connection = null): void /** * pg_connection_reset resets the connection. * It is useful for error recovery. - * + * * @param resource $connection PostgreSQL database connection resource. * @throws PgsqlException - * + * */ function pg_connection_reset($connection): void { error_clear_last(); $result = \pg_connection_reset($connection); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -104,14 +104,14 @@ function pg_connection_reset($connection): void /** * pg_convert checks and converts the values in * assoc_array into suitable values for use in an SQL - * statement. Precondition for pg_convert is the + * statement. Precondition for pg_convert is the * existence of a table table_name which has at least * as many columns as assoc_array has elements. The * fieldnames in table_name must match the indices in * assoc_array and the corresponding datatypes must be * compatible. Returns an array with the converted values on success, FALSE * otherwise. - * + * * @param resource $connection PostgreSQL database connection resource. * @param string $table_name Name of the table against which to convert types. * @param array $assoc_array Data to be converted. @@ -120,13 +120,13 @@ function pg_connection_reset($connection): void * PGSQL_CONV_IGNORE_NOT_NULL, combined. * @return array An array of converted values, . * @throws PgsqlException - * + * */ function pg_convert($connection, string $table_name, array $assoc_array, int $options = 0): array { error_clear_last(); $result = \pg_convert($connection, $table_name, $assoc_array, $options); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -134,10 +134,10 @@ function pg_convert($connection, string $table_name, array $assoc_array, int $op /** - * pg_copy_from inserts records into a table from - * rows. It issues a COPY FROM SQL command + * pg_copy_from inserts records into a table from + * rows. It issues a COPY FROM SQL command * internally to insert records. - * + * * @param resource $connection PostgreSQL database connection resource. * @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. @@ -149,7 +149,7 @@ function pg_convert($connection, string $table_name, array $assoc_array, int $op * @param string $null_as How SQL NULL values are represented in the * rows. Default is \N ("\\N"). * @throws PgsqlException - * + * */ function pg_copy_from($connection, string $table_name, array $rows, string $delimiter = null, string $null_as = null): void { @@ -158,10 +158,10 @@ function pg_copy_from($connection, string $table_name, array $rows, string $deli $result = \pg_copy_from($connection, $table_name, $rows, $delimiter, $null_as); } elseif ($delimiter !== null) { $result = \pg_copy_from($connection, $table_name, $rows, $delimiter); - }else { + } else { $result = \pg_copy_from($connection, $table_name, $rows); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -171,25 +171,25 @@ function pg_copy_from($connection, string $table_name, array $rows, string $deli * pg_dbname returns the name of the database * that the given PostgreSQL connection * resource. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. - * @return string A string containing the name of the database the + * @return string A string containing the name of the database the * connection is to, . * @throws PgsqlException - * + * */ function pg_dbname($connection = null): string { error_clear_last(); if ($connection !== null) { $result = \pg_dbname($connection); - }else { + } else { $result = \pg_dbname(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -202,21 +202,21 @@ function pg_dbname($connection = null): string * in assoc_array. If options * is specified, pg_convert is applied * to assoc_array with the specified options. - * + * * If options is specified, * pg_convert is applied to * assoc_array with the specified flags. - * + * * By default pg_delete passes raw values. Values * must be escaped or PGSQL_DML_ESCAPE option must be * specified. PGSQL_DML_ESCAPE quotes and escapes * paramters/identifiers. Therefore, table/column names became case * sensitive. - * + * * Note that neither escape nor prepared query can protect LIKE query, * JSON, Array, Regex, etc. These parameters should be handled * according to their contexts. i.e. Escape/validate values. - * + * * @param resource $connection PostgreSQL database connection resource. * @param string $table_name Name of the table from which to delete rows. * @param array $assoc_array An array whose keys are field names in the table table_name, @@ -232,13 +232,13 @@ function pg_dbname($connection = null): string * @return mixed Returns TRUE on success . Returns string if PGSQL_DML_STRING is passed * via options. * @throws PgsqlException - * + * */ function pg_delete($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC) { error_clear_last(); $result = \pg_delete($connection, $table_name, $assoc_array, $options); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -252,61 +252,61 @@ function pg_delete($connection, string $table_name, array $assoc_array, int $opt * pg_put_line. pg_end_copy * must be issued, otherwise the PostgreSQL server may get out of * sync with the frontend and will report an error. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @throws PgsqlException - * + * */ function pg_end_copy($connection = null): void { error_clear_last(); if ($connection !== null) { $result = \pg_end_copy($connection); - }else { + } else { $result = \pg_end_copy(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } /** - * Sends a request to execute a prepared statement with given parameters, and + * Sends a request to execute a prepared statement with given parameters, and * waits for the result. - * - * pg_execute is like pg_query_params, - * but the command to be executed is - * specified by naming a previously-prepared statement, instead of giving a - * query string. This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. - * The statement must have been prepared previously in the current session. + * + * pg_execute is like pg_query_params, + * but the command to be executed is + * specified by naming a previously-prepared statement, instead of giving a + * query string. This feature allows commands that will be used repeatedly to + * be parsed and planned just once, rather than each time they are executed. + * The statement must have been prepared previously in the current session. * pg_execute is supported only against PostgreSQL 7.4 or * higher connections; it will fail when using earlier versions. - * - * The parameters are identical to pg_query_params, except that the name of a + * + * The parameters are identical to pg_query_params, except that the name of a * prepared statement is given instead of a query string. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param string $stmtname The name of the prepared statement to execute. if * "" is specified, then the unnamed statement is executed. The name must have - * been previously prepared using pg_prepare, + * 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 * in the original prepared query string. The number of elements in the array * must match the number of placeholders. - * + * * Elements are converted to strings by calling this function. * @return resource A query result resource on success . * @throws PgsqlException - * + * */ function pg_execute($connection = null, string $stmtname = null, array $params = null) { @@ -317,10 +317,10 @@ function pg_execute($connection = null, string $stmtname = null, array $params = $result = \pg_execute($connection, $stmtname); } elseif ($connection !== null) { $result = \pg_execute($connection); - }else { + } else { $result = \pg_execute(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -332,20 +332,20 @@ function pg_execute($connection = null, string $stmtname = null, array $params = * occupying the given field_number in the * given PostgreSQL result resource. Field * numbering starts from 0. - * + * * @param resource $result PostgreSQL query result resource, returned by pg_query, * pg_query_params or pg_execute * (among others). * @param int $field_number Field number, starting from 0. * @return string The field name, . * @throws PgsqlException - * + * */ function pg_field_name($result, int $field_number): string { error_clear_last(); $result = \pg_field_name($result, $field_number); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -356,20 +356,20 @@ function pg_field_name($result, int $field_number): string * pg_field_type returns a string containing the * base type name of the given field_number in the * given PostgreSQL result resource. - * + * * @param resource $result PostgreSQL query result resource, returned by pg_query, * pg_query_params or pg_execute * (among others). * @param int $field_number Field number, starting from 0. * @return string A string containing the base name of the field's type, . * @throws PgsqlException - * + * */ function pg_field_type($result, int $field_number): string { error_clear_last(); $result = \pg_field_type($result, $field_number); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -379,19 +379,19 @@ function pg_field_type($result, int $field_number): string /** * pg_flush flushes any outbound query data waiting to be * sent on the connection. - * + * * @param resource $connection PostgreSQL database connection resource. * @return mixed Returns TRUE if the flush was successful or no data was waiting to be * flushed, 0 if part of the pending data was flushed but * more remains . * @throws PgsqlException - * + * */ function pg_flush($connection) { error_clear_last(); $result = \pg_flush($connection); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -401,22 +401,22 @@ function pg_flush($connection) /** * pg_free_result frees the memory and data associated with the * specified PostgreSQL query result resource. - * + * * This function need only be called if memory - * consumption during script execution is a problem. Otherwise, all result memory will + * consumption during script execution is a problem. Otherwise, all result memory will * be automatically freed when the script ends. - * + * * @param resource $result PostgreSQL query result resource, returned by pg_query, * pg_query_params or pg_execute * (among others). * @throws PgsqlException - * + * */ function pg_free_result($result): void { error_clear_last(); $result = \pg_free_result($result); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -426,25 +426,25 @@ function pg_free_result($result): void * pg_host returns the host name of the given * PostgreSQL connection resource is * connected to. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. - * @return string A string containing the name of the host the + * @return string A string containing the name of the host the * connection is to, . * @throws PgsqlException - * + * */ function pg_host($connection = null): string { error_clear_last(); if ($connection !== null) { $result = \pg_host($connection); - }else { + } else { $result = \pg_host(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -457,21 +457,21 @@ function pg_host($connection = null): string * by table_name. If options * is specified, pg_convert is applied * to assoc_array with the specified options. - * + * * If options is specified, * pg_convert is applied to * assoc_array with the specified flags. - * + * * By default pg_insert passes raw values. Values * must be escaped or PGSQL_DML_ESCAPE option must be * specified. PGSQL_DML_ESCAPE quotes and escapes * paramters/identifiers. Therefore, table/column names became case * sensitive. - * + * * Note that neither escape nor prepared query can protect LIKE query, * JSON, Array, Regex, etc. These parameters should be handled * according to their contexts. i.e. Escape/validate values. - * + * * @param resource $connection PostgreSQL database connection resource. * @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 assoc_array has elements. @@ -488,13 +488,13 @@ function pg_host($connection = null): string * @return mixed Returns the connection resource on success, . Returns string if PGSQL_DML_STRING is passed * via options. * @throws PgsqlException - * + * */ function pg_insert($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC) { error_clear_last(); $result = \pg_insert($connection, $table_name, $assoc_array, $options); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -504,33 +504,33 @@ function pg_insert($connection, string $table_name, array $assoc_array, int $opt /** * pg_last_error returns the last error message * for a given connection. - * + * * Error messages may be overwritten by internal PostgreSQL (libpq) * function calls. It may not return an appropriate error message if * multiple errors occur inside a PostgreSQL module function. - * + * * Use pg_result_error, pg_result_error_field, * pg_result_status and * pg_connection_status for better error handling. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. - * @return string A string containing the last error message on the + * @return string A string containing the last error message on the * given connection, . * @throws PgsqlException - * + * */ function pg_last_error($connection = null): string { error_clear_last(); if ($connection !== null) { $result = \pg_last_error($connection); - }else { + } else { $result = \pg_last_error(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -543,36 +543,36 @@ function pg_last_error($connection = null): string * connection. The PostgreSQL server sends notice * messages in several cases, for instance when creating a SERIAL * column in a table. - * + * * With pg_last_notice, you can avoid issuing useless * queries by checking whether or not the notice is related to your transaction. - * + * * Notice message tracking can be set to optional by setting 1 for * pgsql.ignore_notice in php.ini. - * + * * Notice message logging can be set to optional by setting 0 for * pgsql.log_notice in php.ini. * Unless pgsql.ignore_notice is set * to 0, notice message cannot be logged. - * + * * @param resource $connection PostgreSQL database connection resource. * @param int $option One of PGSQL_NOTICE_LAST (to return last notice), * PGSQL_NOTICE_ALL (to return all notices), * or PGSQL_NOTICE_CLEAR (to clear notices). - * @return string A string containing the last notice on the + * @return string A string containing the last notice on the * given connection with * PGSQL_NOTICE_LAST, * an array with PGSQL_NOTICE_ALL, * a boolean with PGSQL_NOTICE_CLEAR, * . * @throws PgsqlException - * + * */ function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST) { error_clear_last(); $result = \pg_last_notice($connection, $option); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -582,23 +582,23 @@ function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST) /** * pg_last_oid is used to retrieve the * OID assigned to an inserted row. - * + * * OID field became an optional field from PostgreSQL 7.2 and will * not be present by default in PostgreSQL 8.1. When the - * OID field is not present in a table, the programmer must use + * OID field is not present in a table, the programmer must use * pg_result_status to check for successful * insertion. - * + * * To get the value of a SERIAL field in an inserted * row, it is necessary to use the PostgreSQL CURRVAL * function, naming the sequence whose last value is required. If the * name of the sequence is unknown, the pg_get_serial_sequence * PostgreSQL 8.0 function is necessary. - * + * * PostgreSQL 8.1 has a function LASTVAL that returns * the value of the most recently used sequence in the session. This avoids * the need for naming the sequence, table or column altogether. - * + * * @param resource $result PostgreSQL query result resource, returned by pg_query, * pg_query_params or pg_execute * (among others). @@ -606,13 +606,13 @@ function pg_last_notice($connection, int $option = PGSQL_NOTICE_LAST) * row in the specified connection, or * no available OID. * @throws PgsqlException - * + * */ function pg_last_oid($result): string { error_clear_last(); $result = \pg_last_oid($result); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -623,19 +623,19 @@ function pg_last_oid($result): string * pg_lo_close closes a large * object. large_object is a resource for the * large object from pg_lo_open. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * + * * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. * @throws PgsqlException - * + * */ function pg_lo_close($large_object): void { error_clear_last(); $result = \pg_lo_close($large_object); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -645,19 +645,19 @@ function pg_lo_close($large_object): void * pg_lo_export takes a large object in a * PostgreSQL database and saves its contents to a file on the local * filesystem. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param int $oid The OID of the large object in the database. * @param string $pathname The full path and file name of the file in which to write the * large object on the client filesystem. * @throws PgsqlException - * + * */ function pg_lo_export($connection = null, int $oid = null, string $pathname = null): void { @@ -668,10 +668,10 @@ function pg_lo_export($connection = null, int $oid = null, string $pathname = nu $result = \pg_lo_export($connection, $oid); } elseif ($connection !== null) { $result = \pg_lo_export($connection); - }else { + } else { $result = \pg_lo_export(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -680,26 +680,26 @@ function pg_lo_export($connection = null, int $oid = null, string $pathname = nu /** * pg_lo_open opens a large object in the database * and returns large object resource so that it can be manipulated. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param int $oid The OID of the large object in the database. - * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and + * @param string $mode Can be either "r" for read-only, "w" for write only or "rw" for read and * write. * @return resource A large object resource . * @throws PgsqlException - * + * */ function pg_lo_open($connection, int $oid, string $mode) { error_clear_last(); $result = \pg_lo_open($connection, $oid, $mode); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -711,20 +711,20 @@ function pg_lo_open($connection, int $oid, string $mode) * it straight through to the browser after sending all pending * headers. Mainly intended for sending binary data like images or * sound. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * + * * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. * @return int Number of bytes read . * @throws PgsqlException - * + * */ function pg_lo_read_all($large_object): int { error_clear_last(); $result = \pg_lo_read_all($large_object); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -735,22 +735,22 @@ function pg_lo_read_all($large_object): int * pg_lo_read reads at most * len bytes from a large object and * returns it as a string. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * + * * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. * @param int $len An optional maximum number of bytes to return. * @return string A string containing len bytes from the * large object, . * @throws PgsqlException - * + * */ function pg_lo_read($large_object, int $len = 8192): string { error_clear_last(); $result = \pg_lo_read($large_object, $len); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -760,23 +760,23 @@ function pg_lo_read($large_object, int $len = 8192): string /** * pg_lo_seek seeks a position within a large object * resource. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * + * * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. * @param int $offset The number of bytes to seek. - * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), + * @param int $whence One of the constants PGSQL_SEEK_SET (seek from object start), * PGSQL_SEEK_CUR (seek from current position) * or PGSQL_SEEK_END (seek from object end) . * @throws PgsqlException - * + * */ function pg_lo_seek($large_object, int $offset, int $whence = PGSQL_SEEK_CUR): void { error_clear_last(); $result = \pg_lo_seek($large_object, $offset, $whence); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -785,20 +785,20 @@ function pg_lo_seek($large_object, int $offset, int $whence = PGSQL_SEEK_CUR): v /** * pg_lo_truncate truncates a large object * resource. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * + * * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. * @param int $size The number of bytes to truncate. * @throws PgsqlException - * + * */ function pg_lo_truncate($large_object, int $size): void { error_clear_last(); $result = \pg_lo_truncate($large_object, $size); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -807,23 +807,23 @@ function pg_lo_truncate($large_object, int $size): void /** * pg_lo_unlink deletes a large object with the * oid. Returns TRUE on success . - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param int $oid The OID of the large object in the database. * @throws PgsqlException - * + * */ function pg_lo_unlink($connection, int $oid): void { error_clear_last(); $result = \pg_lo_unlink($connection, $oid); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -832,10 +832,10 @@ function pg_lo_unlink($connection, int $oid): void /** * pg_lo_write writes data into a large object * at the current seek position. - * + * * To use the large object interface, it is necessary to * enclose it within a transaction block. - * + * * @param resource $large_object PostgreSQL large object (LOB) resource, returned by pg_lo_open. * @param string $data The data to be written to the large object. If len is * specified and is less than the length of data, only @@ -845,17 +845,17 @@ function pg_lo_unlink($connection, int $oid): void * the length of data. * @return int The number of bytes written to the large object, . * @throws PgsqlException - * + * */ function pg_lo_write($large_object, string $data, int $len = null): int { error_clear_last(); if ($len !== null) { $result = \pg_lo_write($large_object, $data, $len); - }else { + } else { $result = \pg_lo_write($large_object, $data); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -865,19 +865,19 @@ function pg_lo_write($large_object, string $data, int $len = null): int /** * pg_meta_data returns table definition for * table_name as an array. - * + * * @param resource $connection PostgreSQL database connection resource. * @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, . * @throws PgsqlException - * + * */ function pg_meta_data($connection, string $table_name, bool $extended = false): array { error_clear_last(); $result = \pg_meta_data($connection, $table_name, $extended); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -888,25 +888,25 @@ function pg_meta_data($connection, string $table_name, bool $extended = false): * pg_options will return a string containing * the options specified on the given PostgreSQL * connection resource. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @return string A string containing the connection * options, . * @throws PgsqlException - * + * */ function pg_options($connection = null): string { error_clear_last(); if ($connection !== null) { $result = \pg_options($connection); - }else { + } else { $result = \pg_options(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -916,23 +916,23 @@ function pg_options($connection = null): string /** * pg_ping pings a database connection and tries to * reconnect it if it is broken. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @throws PgsqlException - * + * */ function pg_ping($connection = null): void { error_clear_last(); if ($connection !== null) { $result = \pg_ping($connection); - }else { + } else { $result = \pg_ping(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -942,26 +942,26 @@ function pg_ping($connection = null): void * pg_port returns the port number that the * given PostgreSQL connection resource is * connected to. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @return int An int containing the port number of the database - * server the connection is to, + * server the connection is to, * . * @throws PgsqlException - * + * */ function pg_port($connection = null): int { error_clear_last(); if ($connection !== null) { $result = \pg_port($connection); - }else { + } else { $result = \pg_port(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -969,39 +969,39 @@ function pg_port($connection = null): int /** - * pg_prepare creates a prepared statement for later execution with - * pg_execute or pg_send_execute. - * This feature allows commands that will be used repeatedly to - * be parsed and planned just once, rather than each time they are executed. + * pg_prepare creates a prepared statement for later execution with + * pg_execute or pg_send_execute. + * This feature allows commands that will be used repeatedly to + * be parsed and planned just once, rather than each time they are executed. * pg_prepare is supported only against PostgreSQL 7.4 or * higher connections; it will fail when using earlier versions. - * - * The function creates a prepared statement named stmtname from the query - * string, which must contain a single SQL command. stmtname may be "" to - * create an unnamed statement, in which case any pre-existing unnamed - * statement is automatically replaced; otherwise it is an error if the - * statement name is already defined in the current session. If any parameters + * + * The function creates a prepared statement named stmtname from the query + * string, which must contain a single SQL command. stmtname may be "" to + * create an unnamed statement, in which case any pre-existing unnamed + * statement is automatically replaced; otherwise it is an error if the + * statement name is already defined in the current session. If any parameters * are used, they are referred to in the query as $1, $2, etc. - * - * Prepared statements for use with pg_prepare can also be created by - * executing SQL PREPARE statements. (But pg_prepare is more flexible since it - * does not require parameter types to be pre-specified.) Also, although there + * + * Prepared statements for use with pg_prepare can also be created by + * executing SQL PREPARE statements. (But pg_prepare is more flexible since it + * does not require parameter types to be pre-specified.) Also, although there * is no PHP function for deleting a prepared statement, the SQL DEALLOCATE * statement can be used for that purpose. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param string $stmtname The name to give the prepared statement. Must be unique per-connection. If * "" is specified, then an unnamed statement is created, overwriting any * previously defined unnamed statement. * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters + * (multiple statements separated by semi-colons are not allowed.) If any parameters * are used, they are referred to as $1, $2, etc. * @return resource A query result resource on success . * @throws PgsqlException - * + * */ function pg_prepare($connection = null, string $stmtname = null, string $query = null) { @@ -1012,10 +1012,10 @@ function pg_prepare($connection = null, string $stmtname = null, string $query = $result = \pg_prepare($connection, $stmtname); } elseif ($connection !== null) { $result = \pg_prepare($connection); - }else { + } else { $result = \pg_prepare(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -1026,23 +1026,23 @@ function pg_prepare($connection = null, string $stmtname = null, string $query = * pg_put_line sends a NULL-terminated string * to the PostgreSQL backend server. This is needed in conjunction * with PostgreSQL's COPY FROM command. - * + * * COPY is a high-speed data loading interface - * supported by PostgreSQL. Data is passed in without being parsed, + * supported by PostgreSQL. Data is passed in without being parsed, * and in a single transaction. - * + * * An alternative to using raw pg_put_line commands - * is to use pg_copy_from. This is a far simpler + * is to use pg_copy_from. This is a far simpler * interface. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param string $data A line of text to be sent directly to the PostgreSQL backend. A NULL * terminator is added automatically. * @throws PgsqlException - * + * */ function pg_put_line($connection = null, string $data = null): void { @@ -1051,48 +1051,48 @@ function pg_put_line($connection = null, string $data = null): void $result = \pg_put_line($connection, $data); } elseif ($connection !== null) { $result = \pg_put_line($connection); - }else { + } else { $result = \pg_put_line(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } /** - * Submits a command to the server and waits for the result, with the ability + * Submits a command to the server and waits for the result, with the ability * to pass parameters separately from the SQL command text. - * - * pg_query_params is like pg_query, - * but offers additional functionality: parameter - * values can be specified separately from the command string proper. + * + * pg_query_params is like pg_query, + * but offers additional functionality: parameter + * values can be specified separately from the command string proper. * pg_query_params is supported only against PostgreSQL 7.4 or * higher connections; it will fail when using earlier versions. - * + * * If parameters are used, they are referred to in the * query string as $1, $2, etc. The same parameter may * appear more than once in the query; the same value * will be used in that case. params specifies the * actual values of the parameters. A NULL value in this array means the * corresponding parameter is SQL NULL. - * - * The primary advantage of pg_query_params over pg_query - * is that parameter values - * may be separated from the query string, thus avoiding the need for tedious - * and error-prone quoting and escaping. Unlike pg_query, - * pg_query_params allows at - * most one SQL command in the given string. (There can be semicolons in it, + * + * The primary advantage of pg_query_params over pg_query + * is that parameter values + * may be separated from the query string, thus avoiding the need for tedious + * and error-prone quoting and escaping. Unlike pg_query, + * pg_query_params allows at + * most one SQL command in the given string. (There can be semicolons in it, * but not more than one nonempty command.) - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters + * (multiple statements separated by semi-colons are not allowed.) If any parameters * are used, they are referred to as $1, $2, etc. - * + * * User-supplied values should always be passed as parameters, not * interpolated into the query string, where they form possible * SQL injection @@ -1102,13 +1102,13 @@ function pg_put_line($connection = null, string $data = null): void * @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. - * + * * Values intended for bytea fields are not supported as * parameters. Use pg_escape_bytea instead, or use the * large object functions. * @return resource A query result resource on success . * @throws PgsqlException - * + * */ function pg_query_params($connection = null, string $query = null, array $params = null) { @@ -1119,10 +1119,10 @@ function pg_query_params($connection = null, string $query = null, array $params $result = \pg_query_params($connection, $query); } elseif ($connection !== null) { $result = \pg_query_params($connection); - }else { + } else { $result = \pg_query_params(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -1134,39 +1134,39 @@ function pg_query_params($connection = null, string $query = null, array $params * on the specified database connection. * pg_query_params should be preferred * in most cases. - * + * * If an error occurs, and FALSE is returned, details of the error can * be retrieved using the pg_last_error * function if the connection is valid. - * - * - * + * + * + * * Although connection can be omitted, it * is not recommended, since it can be the cause of hard to find * bugs in scripts. - * - * - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @param string $query The SQL statement or statements to be executed. When multiple statements are passed to the function, * they are automatically executed as one transaction, unless there are explicit BEGIN/COMMIT commands * included in the query string. However, using multiple transactions in one function call is not recommended. - * + * * String interpolation of user-supplied data is extremely dangerous and is * likely to lead to SQL * injection vulnerabilities. In most cases * pg_query_params should be preferred, passing * user-supplied values as parameters rather than substituting them into * the query string. - * + * * Any user-supplied data substituted directly into a query string should * be properly escaped. * @return resource A query result resource on success . * @throws PgsqlException - * + * */ function pg_query($connection = null, string $query = null) { @@ -1175,10 +1175,10 @@ function pg_query($connection = null, string $query = null) $result = \pg_query($connection, $query); } elseif ($connection !== null) { $result = \pg_query($connection); - }else { + } else { $result = \pg_query(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -1188,20 +1188,20 @@ function pg_query($connection = null, string $query = null) /** * pg_result_seek sets the internal row offset in * a result resource. - * + * * @param resource $result PostgreSQL query result resource, returned by pg_query, * pg_query_params or pg_execute * (among others). * @param int $offset Row to move the internal offset to in the result resource. * Rows are numbered starting from zero. * @throws PgsqlException - * + * */ function pg_result_seek($result, int $offset): void { error_clear_last(); $result = \pg_result_seek($result, $offset); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -1213,21 +1213,21 @@ function pg_result_seek($result, int $offset): void * field=>value. For a successful query, it returns an * array containing all records and fields that match the condition * specified by assoc_array. - * + * * If options is specified, * pg_convert is applied to * assoc_array with the specified flags. - * + * * By default pg_select passes raw values. Values * must be escaped or PGSQL_DML_ESCAPE option must be * specified. PGSQL_DML_ESCAPE quotes and escapes * paramters/identifiers. Therefore, table/column names became case * sensitive. - * + * * Note that neither escape nor prepared query can protect LIKE query, * JSON, Array, Regex, etc. These parameters should be handled * according to their contexts. i.e. Escape/validate values. - * + * * @param resource $connection PostgreSQL database connection resource. * @param string $table_name Name of the table from which to select rows. * @param array $assoc_array An array whose keys are field names in the table table_name, @@ -1240,17 +1240,17 @@ function pg_result_seek($result, int $offset): void * PGSQL_DML_STRING combined. If PGSQL_DML_STRING is part of the * options then query string is returned. When PGSQL_DML_NO_CONV * or PGSQL_DML_ESCAPE is set, it does not call pg_convert internally. - * @param int $result_type + * @param int $result_type * @return mixed Returns TRUE on success . Returns string if PGSQL_DML_STRING is passed * via options. * @throws PgsqlException - * + * */ function pg_select($connection, string $table_name, array $assoc_array, int $options = PGSQL_DML_EXEC, int $result_type = PGSQL_ASSOC) { error_clear_last(); $result = \pg_select($connection, $table_name, $assoc_array, $options, $result_type); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -1258,31 +1258,31 @@ function pg_select($connection, string $table_name, array $assoc_array, int $opt /** - * Submits a command and separate parameters to the server without + * Submits a command and separate parameters to the server without * waiting for the result(s). - * - * This is equivalent to pg_send_query except that query - * parameters can be specified separately from the - * query string. The function's parameters are - * handled identically to pg_query_params. Like - * pg_query_params, it will not work on pre-7.4 PostgreSQL + * + * This is equivalent to pg_send_query except that query + * parameters can be specified separately from the + * query string. The function's parameters are + * handled identically to pg_query_params. Like + * pg_query_params, it will not work on pre-7.4 PostgreSQL * connections, and it allows only one command in the query string. - * + * * @param resource $connection PostgreSQL database connection resource. * @param string $query The parameterized SQL statement. Must contain only a single statement. - * (multiple statements separated by semi-colons are not allowed.) If any parameters + * (multiple statements separated by semi-colons are not allowed.) If any parameters * are used, they are referred to as $1, $2, etc. * @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. * @throws PgsqlException - * + * */ function pg_send_query_params($connection, string $query, array $params): void { error_clear_last(); $result = \pg_send_query_params($connection, $query, $params); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -1294,29 +1294,29 @@ function pg_send_query_params($connection, string $query, array $params): void * pg_query, it can send multiple queries at once to * PostgreSQL and get the results one by one using * pg_get_result. - * + * * Script execution is not blocked while the queries are executing. Use * pg_connection_busy to check if the connection is * busy (i.e. the query is executing). Queries may be cancelled using * pg_cancel_query. - * + * * Although the user can send multiple queries at once, multiple queries * cannot be sent over a busy connection. If a query is sent while * the connection is busy, it waits until the last query is finished and * discards all its results. - * + * * @param resource $connection PostgreSQL database connection resource. * @param string $query The SQL statement or statements to be executed. - * + * * Data inside the query should be properly escaped. * @throws PgsqlException - * + * */ function pg_send_query($connection, string $query): void { error_clear_last(); $result = \pg_send_query($connection, $query); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -1325,17 +1325,17 @@ function pg_send_query($connection, string $query): void /** * pg_socket returns a read only resource * corresponding to the socket underlying the given PostgreSQL connection. - * + * * @param resource $connection PostgreSQL database connection resource. * @return resource A socket resource on success . * @throws PgsqlException - * + * */ function pg_socket($connection) { error_clear_last(); $result = \pg_socket($connection); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -1347,33 +1347,33 @@ function pg_socket($connection) * frontend/backend communication to a file. To fully understand the results, * one needs to be familiar with the internals of PostgreSQL * communication protocol. - * + * * For those who are not, it can still be * useful for tracing errors in queries sent to the server, you * could do for example grep '^To backend' * trace.log and see what queries actually were sent to the * PostgreSQL server. For more information, refer to the * PostgreSQL Documentation. - * + * * @param string $pathname The full path and file name of the file in which to write the * trace log. Same as in fopen. * @param string $mode An optional file access mode, same as for fopen. - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. * @throws PgsqlException - * + * */ function pg_trace(string $pathname, string $mode = "w", $connection = null): void { error_clear_last(); if ($connection !== null) { $result = \pg_trace($pathname, $mode, $connection); - }else { + } else { $result = \pg_trace($pathname, $mode); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } } @@ -1383,25 +1383,25 @@ function pg_trace(string $pathname, string $mode = "w", $connection = null): voi * pg_tty returns the TTY name that server * side debugging output is sent to on the given PostgreSQL * connection resource. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. - * @return string A string containing the debug TTY of + * @return string A string containing the debug TTY of * the connection, . * @throws PgsqlException - * + * */ function pg_tty($connection = null): string { error_clear_last(); if ($connection !== null) { $result = \pg_tty($connection); - }else { + } else { $result = \pg_tty(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -1414,25 +1414,25 @@ function pg_tty($connection = null): string * options is specified, * pg_convert is applied to * data with specified options. - * + * * pg_update updates records specified by * assoc_array which has * field=>value. - * + * * If options is specified, * pg_convert is applied to * assoc_array with the specified flags. - * + * * By default pg_update passes raw values. Values * must be escaped or PGSQL_DML_ESCAPE option must be * specified. PGSQL_DML_ESCAPE quotes and escapes * paramters/identifiers. Therefore, table/column names became case * sensitive. - * + * * Note that neither escape nor prepared query can protect LIKE query, * JSON, Array, Regex, etc. These parameters should be handled * according to their contexts. i.e. Escape/validate values. - * + * * @param resource $connection PostgreSQL database connection resource. * @param string $table_name Name of the table into which to update rows. * @param array $data An array whose keys are field names in the table table_name, @@ -1450,13 +1450,13 @@ function pg_tty($connection = null): string * @return mixed Returns TRUE on success . Returns string if PGSQL_DML_STRING is passed * via options. * @throws PgsqlException - * + * */ function pg_update($connection, string $table_name, array $data, array $condition, int $options = PGSQL_DML_EXEC) { error_clear_last(); $result = \pg_update($connection, $table_name, $data, $condition, $options); - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; @@ -1467,31 +1467,29 @@ function pg_update($connection, string $table_name, array $data, array $conditio * pg_version returns an array with the client, protocol * and server version. Protocol and server versions are only available if PHP * was compiled with PostgreSQL 7.4 or later. - * + * * For more detailed server information, use pg_parameter_status. - * - * @param resource $connection PostgreSQL database connection resource. When - * connection is not present, the default connection - * is used. The default connection is the last connection made by + * + * @param resource $connection PostgreSQL database connection resource. When + * connection is not present, the default connection + * is used. The default connection is the last connection made by * pg_connect or pg_pconnect. - * @return array Returns an array with client, protocol + * @return array Returns an array with client, protocol * and server keys and values (if available). Returns * FALSE on error or invalid connection. * @throws PgsqlException - * + * */ function pg_version($connection = null): array { error_clear_last(); if ($connection !== null) { $result = \pg_version($connection); - }else { + } else { $result = \pg_version(); } - if ($result === FALSE) { + if ($result === false) { throw PgsqlException::createFromPhpError(); } return $result; } - - diff --git a/generated/posix.php b/generated/posix.php index 8ab284f9..9be7f74e 100644 --- a/generated/posix.php +++ b/generated/posix.php @@ -6,25 +6,25 @@ /** * posix_access checks the user's permission of a file. - * + * * @param string $file The name of the file to be tested. * @param int $mode A mask consisting of one or more of POSIX_F_OK, * POSIX_R_OK, POSIX_W_OK and * POSIX_X_OK. - * + * * POSIX_R_OK, POSIX_W_OK and * POSIX_X_OK request checking whether the file * exists and has read, write and execute permissions, respectively. * POSIX_F_OK just requests checking for the * existence of the file. * @throws PosixException - * + * */ function posix_access(string $file, int $mode = POSIX_F_OK): void { error_clear_last(); $result = \posix_access($file, $mode); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -32,62 +32,62 @@ function posix_access(string $file, int $mode = POSIX_F_OK): void /** * Gets information about a group provided its name. - * + * * @param string $name The name of the group * @return array Returns an array on success, . * The array elements returned are: - * + * * The group information array - * - * - * + * + * + * * Element * Description - * - * - * - * + * + * + * + * * name - * + * * The name element contains the name of the group. This is * a short, usually less than 16 character "handle" of the * group, not the real, full name. This should be the same as * the name parameter used when * calling the function, and hence redundant. - * - * - * + * + * + * * passwd - * + * * The passwd element contains the group's password in an * encrypted format. Often, for example on a system employing * "shadow" passwords, an asterisk is returned instead. - * - * - * + * + * + * * gid - * + * * Group ID of the group in numeric form. - * - * - * + * + * + * * members - * + * * This consists of an array of * string's for all the members in the group. - * - * - * - * - * + * + * + * + * + * * @throws PosixException - * + * */ function posix_getgrnam(string $name): array { error_clear_last(); $result = \posix_getgrnam($name); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } return $result; @@ -97,17 +97,17 @@ function posix_getgrnam(string $name): array /** * Returns the process group identifier of the process * pid . - * + * * @param int $pid The process id. * @return int Returns the identifier, as an integer. * @throws PosixException - * + * */ function posix_getpgid(int $pid): int { error_clear_last(); $result = \posix_getpgid($pid); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } return $result; @@ -116,17 +116,17 @@ function posix_getpgid(int $pid): int /** * Calculates the group access list for the user specified in name. - * + * * @param string $name The user to calculate the list for. * @param int $base_group_id Typically the group number from the password file. * @throws PosixException - * + * */ function posix_initgroups(string $name, int $base_group_id): void { error_clear_last(); $result = \posix_initgroups($name, $base_group_id); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -135,17 +135,17 @@ function posix_initgroups(string $name, int $base_group_id): void /** * Send the signal sig to the process with * the process identifier pid. - * + * * @param int $pid The process identifier. * @param int $sig One of the PCNTL signals constants. * @throws PosixException - * + * */ function posix_kill(int $pid, int $sig): void { error_clear_last(); $result = \posix_kill($pid, $sig); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -155,7 +155,7 @@ function posix_kill(int $pid, int $sig): void * posix_mkfifo creates a special * FIFO file which exists in the file system and acts as * a bidirectional communication endpoint for processes. - * + * * @param string $pathname Path to the FIFO file. * @param int $mode The second parameter mode has to be given in * octal notation (e.g. 0644). The permission of the newly created @@ -163,13 +163,13 @@ function posix_kill(int $pid, int $sig): void * umask. The permissions of the created file are * (mode & ~umask). * @throws PosixException - * + * */ function posix_mkfifo(string $pathname, int $mode): void { error_clear_last(); $result = \posix_mkfifo($pathname, $mode); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -177,7 +177,7 @@ function posix_mkfifo(string $pathname, int $mode): void /** * Creates a special or ordinary file. - * + * * @param string $pathname The file to create * @param int $mode This parameter is constructed by a bitwise OR between file type (one of * the following constants: POSIX_S_IFREG, @@ -188,13 +188,13 @@ function posix_mkfifo(string $pathname, int $mode): void * S_IFCHR or S_IFBLK). * @param int $minor The minor device kernel identifier. * @throws PosixException - * + * */ function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0): void { error_clear_last(); $result = \posix_mknod($pathname, $mode, $major, $minor); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -204,16 +204,16 @@ function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0 * Set the effective group ID of the current process. This is a * privileged function and needs appropriate privileges (usually * root) on the system to be able to perform this function. - * + * * @param int $gid The group id. * @throws PosixException - * + * */ function posix_setegid(int $gid): void { error_clear_last(); $result = \posix_setegid($gid); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -223,16 +223,16 @@ function posix_setegid(int $gid): void * Set the effective user ID of the current process. This is a privileged * function and needs appropriate privileges (usually root) on * the system to be able to perform this function. - * + * * @param int $uid The user id. * @throws PosixException - * + * */ function posix_seteuid(int $uid): void { error_clear_last(); $result = \posix_seteuid($uid); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -245,16 +245,16 @@ function posix_seteuid(int $uid): void * appropriate order of function calls is * posix_setgid first, * posix_setuid last. - * + * * @param int $gid The group id. * @throws PosixException - * + * */ function posix_setgid(int $gid): void { error_clear_last(); $result = \posix_setgid($gid); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -263,17 +263,17 @@ function posix_setgid(int $gid): void /** * Let the process pid join the process group * pgid. - * + * * @param int $pid The process id. * @param int $pgid The process group id. * @throws PosixException - * + * */ function posix_setpgid(int $pid, int $pgid): void { error_clear_last(); $result = \posix_setpgid($pid, $pgid); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -282,14 +282,14 @@ function posix_setpgid(int $pid, int $pgid): void /** * posix_setrlimit sets the soft and hard limits for a * given system resource. - * - * + * + * * Each resource has an associated soft and hard limit. The soft * limit is the value that the kernel enforces for the corresponding * resource. The hard limit acts as a ceiling for the soft limit. * An unprivileged process may only set its soft limit to a value * from 0 to the hard limit, and irreversibly lower its hard limit. - * + * * @param int $resource The * resource limit constant * corresponding to the limit that is being set. @@ -298,13 +298,13 @@ function posix_setpgid(int $pid, int $pgid): void * @param int $hardlimit The hard limit, in whatever unit the resource limit requires, or * POSIX_RLIMIT_INFINITY. * @throws PosixException - * + * */ function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): void { error_clear_last(); $result = \posix_setrlimit($resource, $softlimit, $hardlimit); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } @@ -314,18 +314,16 @@ function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): void * Set the real user ID of the current process. This is a privileged * function that needs appropriate privileges (usually root) on * the system to be able to perform this function. - * + * * @param int $uid The user id. * @throws PosixException - * + * */ function posix_setuid(int $uid): void { error_clear_last(); $result = \posix_setuid($uid); - if ($result === FALSE) { + if ($result === false) { throw PosixException::createFromPhpError(); } } - - diff --git a/generated/ps.php b/generated/ps.php index cb62e0eb..c77647bf 100644 --- a/generated/ps.php +++ b/generated/ps.php @@ -10,11 +10,11 @@ * is a rectangle * with its lower left corner at (llx, lly) and its upper right corner at * (urx, ury). The rectangle has by default a thin blue border. - * + * * The note will not be visible if the document * is printed or viewed but it will show up if the document is converted to * pdf by either Acrobat Distiller™ or Ghostview. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $llx The x-coordinate of the lower left corner. @@ -23,13 +23,13 @@ * @param float $ury The y-coordinate of the upper right corner. * @param string $filename The path of the program to be started, when the link is clicked on. * @throws PsException - * + * */ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename): void { error_clear_last(); $result = \ps_add_launchlink($psdoc, $llx, $lly, $urx, $ury, $filename); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -39,16 +39,16 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur * Places a hyperlink at the given position pointing to a page in the same * document. Clicking on the link will jump to the given page. The first page * in a document has number 1. - * + * * The hyperlink's source position is a rectangle with its lower left corner at * (llx, lly) and its upper * right corner at (urx, ury). * The rectangle has by default a thin blue border. - * + * * The note will not be visible if the document * is printed or viewed but it will show up if the document is converted to * pdf by either Acrobat Distiller™ or Ghostview. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $llx The x-coordinate of the lower left corner. @@ -61,13 +61,13 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur * fitwidth, fitheight, or * fitbbox. * @throws PsException - * + * */ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury, int $page, string $dest): void { error_clear_last(); $result = \ps_add_locallink($psdoc, $llx, $lly, $urx, $ury, $page, $dest); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -79,11 +79,11 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury * a page. They * are shown either folded or unfolded. If folded, the specified icon * is used as a placeholder. - * + * * The note will not be visible if the document * is printed or viewed but it will show up if the document is converted to * pdf by either Acrobat Distiller™ or Ghostview. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $llx The x-coordinate of the lower left corner. @@ -100,13 +100,13 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury * @param int $open If open is unequal to zero the note will * be shown unfolded after opening the document with a pdf viewer. * @throws PsException - * + * */ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void { error_clear_last(); $result = \ps_add_note($psdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -116,16 +116,16 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str * Places a hyperlink at the given position pointing to a second pdf document. * Clicking on the link will branch to the document at the given page. The * first page in a document has number 1. - * + * * The hyperlink's source position is a rectangle with its lower left corner at * (llx, lly) and its upper * right corner at (urx, ury). * The rectangle has by default a thin blue border. - * + * * The note will not be visible if the document * is printed or viewed but it will show up if the document is converted to * pdf by either Acrobat Distiller™ or Ghostview. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $llx The x-coordinate of the lower left corner. @@ -140,30 +140,30 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str * fitwidth, fitheight, or * fitbbox. * @throws PsException - * + * */ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename, int $page, string $dest): void { error_clear_last(); $result = \ps_add_pdflink($psdoc, $llx, $lly, $urx, $ury, $filename, $page, $dest); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } /** - * Places a hyperlink at the given position pointing to a web page. The + * Places a hyperlink at the given position pointing to a web page. The * hyperlink's source position is a rectangle with its lower left corner at * (llx, lly) and * its upper right corner at (urx, * ury). The rectangle has by default a thin * blue border. - * + * * The note will not be visible if the document * is printed or viewed but it will show up if the document is converted to * pdf by either Acrobat Distiller™ or Ghostview. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $llx The x-coordinate of the lower left corner. @@ -173,13 +173,13 @@ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, * @param string $url The url of the hyperlink to be opened when clicking on * this link, e.g. http://www.php.net. * @throws PsException - * + * */ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, string $url): void { error_clear_last(); $result = \ps_add_weblink($psdoc, $llx, $lly, $urx, $ury, $url); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -193,7 +193,7 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, * ps_arcn to draw clockwise). The subpath added * to the current path starts on the arc at angle alpha * and ends on the arc at angle beta. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x The x-coordinate of the circle's middle point. @@ -202,13 +202,13 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, * @param float $alpha The start angle given in degrees. * @param float $beta The end angle given in degrees. * @throws PsException - * + * */ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void { error_clear_last(); $result = \ps_arc($psdoc, $x, $y, $radius, $alpha, $beta); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -222,7 +222,7 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ * ps_arc to draw counterclockwise). The subpath added to * the current path starts on the arc at angle beta and * ends on the arc at angle alpha. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x The x-coordinate of the circle's middle point. @@ -231,13 +231,13 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ * @param float $alpha The starting angle given in degrees. * @param float $beta The end angle given in degrees. * @throws PsException - * + * */ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void { error_clear_last(); $result = \ps_arcn($psdoc, $x, $y, $radius, $alpha, $beta); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -253,7 +253,7 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float * document into PDF. This function places pdfmarks into the document which * can set the size for each page indiviually. The resulting PDF document will * have different page sizes. - * + * * Though PostScript does not know different page sizes, pslib places * a bounding box for each page into the document. This size is evaluated * by some PostScript viewers and will have precedence over the BoundingBox @@ -261,10 +261,10 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float * you set a BoundingBox whose lower left corner is not (0, 0), because the * bounding box of the page will always have a lower left corner (0, 0) * and overwrites the global setting. - * + * * Each page is encapsulated into save/restore. This means, that most of the * settings made on one page will not be retained on the next page. - * + * * If there is up to the first call of ps_begin_page no * call of ps_findfont, then the header of the PostScript * document will be output and the bounding box will be set to the size of @@ -276,19 +276,19 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float * BoundingBox and possibly Orientation * before any ps_findfont or * ps_begin_page calls. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $width The width of the page in pixel, e.g. 596 for A4 format. * @param float $height The height of the page in pixel, e.g. 842 for A4 format. * @throws PsException - * + * */ function ps_begin_page($psdoc, float $width, float $height): void { error_clear_last(); $result = \ps_begin_page($psdoc, $width, $height); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -299,7 +299,7 @@ function ps_begin_page($psdoc, float $width, float $height): void * which can be used for filling areas. It is used like a color by calling * ps_setcolor and setting the color space to * pattern. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $width The width of the pattern in pixel. @@ -311,13 +311,13 @@ function ps_begin_page($psdoc, float $width, float $height): void * @param int $painttype Must be 1 or 2. * @return int The identifier of the pattern . * @throws PsException - * + * */ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, float $ystep, int $painttype): int { error_clear_last(); $result = \ps_begin_pattern($psdoc, $width, $height, $xstep, $ystep, $painttype); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } return $result; @@ -331,20 +331,20 @@ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, flo * through out the document, e.g. like a company logo. All drawing functions * may be used within a template. The template will not be drawn until * it is placed by ps_place_image. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $width The width of the template in pixel. * @param float $height The height of the template in pixel. * @return int Returns TRUE on success . * @throws PsException - * + * */ function ps_begin_template($psdoc, float $width, float $height): int { error_clear_last(); $result = \ps_begin_template($psdoc, $width, $height); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } return $result; @@ -360,20 +360,20 @@ function ps_begin_template($psdoc, float $width, float $height): int * as a subpath. If the last drawing operation does not end in point * (x+radius, * y) then there will be a gap in the path. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x The x-coordinate of the circle's middle point. * @param float $y The y-coordinate of the circle's middle point. * @param float $radius The radius of the circle * @throws PsException - * + * */ function ps_circle($psdoc, float $x, float $y, float $radius): void { error_clear_last(); $result = \ps_circle($psdoc, $x, $y, $radius); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -382,17 +382,17 @@ function ps_circle($psdoc, float $x, float $y, float $radius): void /** * Takes the current path and uses it to define the border of a clipping area. * Everything drawn outside of that area will not be visible. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_clip($psdoc): void { error_clear_last(); $result = \ps_clip($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -401,20 +401,20 @@ function ps_clip($psdoc): void /** * Closes an image and frees its resources. Once an image is closed * it cannot be used anymore. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param int $imageid Resource identifier of the image as returned by * ps_open_image or * ps_open_image_file. * @throws PsException - * + * */ function ps_close_image($psdoc, int $imageid): void { error_clear_last(); $result = \ps_close_image($psdoc, $imageid); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -422,24 +422,24 @@ function ps_close_image($psdoc, int $imageid): void /** * Closes the PostScript document. - * + * * This function writes the trailer of the PostScript document. * It also writes the bookmark tree. ps_close does * not free any resources, which is done by ps_delete. - * + * * This function is also called by ps_delete if it * has not been called before. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_close($psdoc): void { error_clear_last(); $result = \ps_close($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -448,17 +448,17 @@ function ps_close($psdoc): void /** * Connects the last point with first point of a path and draws the resulting * closed line. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_closepath_stroke($psdoc): void { error_clear_last(); $result = \ps_closepath_stroke($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -467,17 +467,17 @@ function ps_closepath_stroke($psdoc): void /** * Connects the last point with the first point of a path. The resulting * path can be used for stroking, filling, clipping, etc.. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_closepath($psdoc): void { error_clear_last(); $result = \ps_closepath($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -489,18 +489,18 @@ function ps_closepath($psdoc): void * ps_set_value. The actual position of the * text is determined by the values "textx" and "texty" which can be requested * with ps_get_value - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $text The text to output. * @throws PsException - * + * */ function ps_continue_text($psdoc, string $text): void { error_clear_last(); $result = \ps_continue_text($psdoc, $text); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -509,7 +509,7 @@ function ps_continue_text($psdoc, string $text): void /** * Add a section of a cubic Bézier curve described by the three given control * points to the current path. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x1 x-coordinate of first control point. @@ -519,13 +519,13 @@ function ps_continue_text($psdoc, string $text): void * @param float $x3 x-coordinate of third control point. * @param float $y3 y-coordinate of third control point. * @throws PsException - * + * */ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void { error_clear_last(); $result = \ps_curveto($psdoc, $x1, $y1, $x2, $y2, $x3, $y3); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -538,17 +538,17 @@ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x * ps_close not just closes the file but also outputs a * trailor containing PostScript comments like the number of pages in the * document and adding the bookmark hierarchy. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_delete($psdoc): void { error_clear_last(); $result = \ps_delete($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -559,17 +559,17 @@ function ps_delete($psdoc): void * Ending a page will leave the current drawing context, which e.g. requires * to reload fonts if they were loading within the page, and to set many * other drawing parameters like the line width, or color.. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_end_page($psdoc): void { error_clear_last(); $result = \ps_end_page($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -579,17 +579,17 @@ function ps_end_page($psdoc): void * Ends a pattern which was started with ps_begin_pattern. * Once a pattern has been ended, it can be used like a color to fill * areas. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_end_pattern($psdoc): void { error_clear_last(); $result = \ps_end_pattern($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -598,17 +598,17 @@ function ps_end_pattern($psdoc): void /** * Ends a template which was started with ps_begin_template. * Once a template has been ended, it can be used like an image. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_end_template($psdoc): void { error_clear_last(); $result = \ps_end_template($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -617,17 +617,17 @@ function ps_end_template($psdoc): void /** * Fills and draws the path constructed with previously called drawing * functions like ps_lineto. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_fill_stroke($psdoc): void { error_clear_last(); $result = \ps_fill_stroke($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -636,17 +636,17 @@ function ps_fill_stroke($psdoc): void /** * Fills the path constructed with previously called drawing functions like * ps_lineto. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_fill($psdoc): void { error_clear_last(); $result = \ps_fill($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -658,116 +658,116 @@ function ps_fill($psdoc): void * functions. Parameters are by definition string * values. This function cannot be used to retrieve resources which were also * set by ps_set_parameter. - * + * * The parameter name can have the following values. - * - * - * + * + * + * * fontname - * - * + * + * * The name of the currently active font or the font whose * identifier is passed in parameter modifier. - * - * - * - * + * + * + * + * * fontencoding - * - * + * + * * The encoding of the currently active font. - * - * - * - * + * + * + * + * * dottedversion - * - * + * + * * The version of the underlying pslib library in the format * <major>.<minor>.<subminor> - * - * - * - * + * + * + * + * * scope - * - * + * + * * The current drawing scope. Can be object, document, null, page, * pattern, path, template, prolog, font, glyph. - * - * - * - * + * + * + * + * * ligaturedisolvechar - * - * + * + * * The character which dissolves a ligature. If your are using a font * which contains the ligature `ff' and `|' is the char to dissolve the * ligature, then `f|f' will result in two `f' instead of the ligature `ff'. - * - * - * - * + * + * + * + * * imageencoding - * - * + * + * * The encoding used for encoding images. Can be either * hex or 85. hex encoding * uses two bytes in the postscript file each byte in the image. * 85 stand for Ascii85 encoding. - * - * - * - * + * + * + * + * * linenumbermode - * - * + * + * * Set to paragraph if lines are numbered * within a paragraph or box if they are * numbered within the surrounding box. - * - * - * - * + * + * + * + * * linebreak - * - * + * + * * Only used if text is output with ps_show_boxed. * If set to TRUE a carriage return will add a line * break. - * - * - * - * + * + * + * + * * parbreak - * - * + * + * * Only used if text is output with ps_show_boxed. * If set to TRUE a carriage return will start * a new paragraph. - * - * - * - * + * + * + * + * * hyphenation - * - * + * + * * Only used if text is output with ps_show_boxed. * If set to TRUE the paragraph will be hyphenated * if a hypen dictionary is set and exists. - * - * - * - * + * + * + * + * * hyphendict - * - * + * + * * Filename of the dictionary used for hyphenation pattern. - * - * - * - * - * + * + * + * + * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $name Name of the parameter. @@ -776,17 +776,17 @@ function ps_fill($psdoc): void * passed. * @return string Returns the value of the parameter . * @throws PsException - * + * */ function ps_get_parameter($psdoc, string $name, float $modifier = null): string { error_clear_last(); if ($modifier !== null) { $result = \ps_get_parameter($psdoc, $name, $modifier); - }else { + } else { $result = \ps_get_parameter($psdoc, $name); } - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } return $result; @@ -798,27 +798,27 @@ function ps_get_parameter($psdoc, string $name, float $modifier = null): string * value hyphenminchars (set by ps_set_value) and * the parameter hyphendict (set by ps_set_parameter). * hyphendict must be set before calling this function. - * + * * This function requires the locale category LC_CTYPE to be set properly. * This is done when the extension is initialized by using the environment * variables. On Unix systems read the man page of locale for more information. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $text text should not contain any non alpha * characters. Possible positions for breaks are returned in an array of - * interger numbers. Each number is the position of the char in + * 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 * the text . * @throws PsException - * + * */ function ps_hyphenate($psdoc, string $text): array { error_clear_last(); $result = \ps_hyphenate($psdoc, $text); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } return $result; @@ -828,19 +828,19 @@ function ps_hyphenate($psdoc, string $text): array /** * This function is * currently not documented; only its argument list is available. - * - * + * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. - * @param string $file + * @param string $file * @throws PsException - * + * */ function ps_include_file($psdoc, string $file): void { error_clear_last(); $result = \ps_include_file($psdoc, $file); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -850,19 +850,19 @@ function ps_include_file($psdoc, string $file): void * Adds a straight line from the current point to the given coordinates to the * current path. Use ps_moveto to set the starting point * of the line. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x x-coordinate of the end point of the line. * @param float $y y-coordinate of the end point of the line. * @throws PsException - * + * */ function ps_lineto($psdoc, float $x, float $y): void { error_clear_last(); $result = \ps_lineto($psdoc, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -873,19 +873,19 @@ function ps_lineto($psdoc, float $x, float $y): void * ps_moveto after a previous path has been ended then it * will start a new path. If this function is called in the middle of a path * it will just set the current point and start a subpath. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x x-coordinate of the point to move to. * @param float $y y-coordinate of the point to move to. * @throws PsException - * + * */ function ps_moveto($psdoc, float $x, float $y): void { error_clear_last(); $result = \ps_moveto($psdoc, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -896,17 +896,17 @@ function ps_moveto($psdoc, float $x, float $y): void * memory, it just sets up everything. ps_new is usually * followed by a call of ps_open_file to actually create * the postscript document. - * + * * @return resource Resource of PostScript document . The return value * is passed to all other functions as the first argument. * @throws PsException - * + * */ function ps_new() { error_clear_last(); $result = \ps_new(); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } return $result; @@ -916,24 +916,24 @@ function ps_new() /** * Creates a new file on disk and writes the PostScript document into it. The * file will be closed when ps_close is called. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $filename The name of the postscript file. * If filename is not passed the document will be * created in memory and all output will go straight to the browser. * @throws PsException - * + * */ function ps_open_file($psdoc, string $filename = null): void { error_clear_last(); if ($filename !== null) { $result = \ps_open_file($psdoc, $filename); - }else { + } else { $result = \ps_open_file($psdoc); } - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -943,10 +943,10 @@ function ps_open_file($psdoc, string $filename = null): void * Places a formerly loaded image on the page. The image can be scaled. * If the image shall be rotated as well, you will have to rotate the * coordinate system before with ps_rotate. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. - * @param int $imageid The resource identifier of the image as returned by + * @param int $imageid The resource identifier of the image as returned by * ps_open_image or * ps_open_image_file. * @param float $x x-coordinate of the lower left corner of the image. @@ -955,13 +955,13 @@ function ps_open_file($psdoc, string $filename = null): void * in a resolution of 72 dpi, because each pixel is equivalent to * 1 point. * @throws PsException - * + * */ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): void { error_clear_last(); $result = \ps_place_image($psdoc, $imageid, $x, $y, $scale); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -974,7 +974,7 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): * If it is called within a path it will add the rectangle as a subpath. If * the last drawing operation does not end in the lower left corner then there * will be a gap in the path. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x x-coordinate of the lower left corner of the rectangle. @@ -982,13 +982,13 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): * @param float $width The width of the image. * @param float $height The height of the image. * @throws PsException - * + * */ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void { error_clear_last(); $result = \ps_rect($psdoc, $x, $y, $width, $height); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1000,17 +1000,17 @@ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void * ps_restore. All coordinate transformations, line * style settings, color settings, etc. are being restored to the state * before the call of ps_save. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_restore($psdoc): void { error_clear_last(); $result = \ps_restore($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1018,18 +1018,18 @@ function ps_restore($psdoc): void /** * Sets the rotation of the coordinate system. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $rot Angle of rotation in degree. * @throws PsException - * + * */ function ps_rotate($psdoc, float $rot): void { error_clear_last(); $result = \ps_rotate($psdoc, $rot); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1039,17 +1039,17 @@ function ps_rotate($psdoc, float $rot): void * Saves the current graphics context, containing colors, translation and * rotation settings and some more. A saved context can be restored with * ps_restore. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_save($psdoc): void { error_clear_last(); $result = \ps_save($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1057,19 +1057,19 @@ function ps_save($psdoc): void /** * Sets horizontal and vertical scaling of the coordinate system. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x Scaling factor in horizontal direction. * @param float $y Scaling factor in vertical direction. * @throws PsException - * + * */ function ps_scale($psdoc, float $x, float $y): void { error_clear_last(); $result = \ps_scale($psdoc, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1082,20 +1082,20 @@ function ps_scale($psdoc, float $x, float $y): void * pdf and viewed in a pdf viewer. This rectangle is not visible in * the postscript document. * This function sets the color of the rectangle's border line. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $red The red component of the border color. * @param float $green The green component of the border color. * @param float $blue The blue component of the border color. * @throws PsException - * + * */ function ps_set_border_color($psdoc, float $red, float $green, float $blue): void { error_clear_last(); $result = \ps_set_border_color($psdoc, $red, $green, $blue); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1109,19 +1109,19 @@ function ps_set_border_color($psdoc, float $red, float $green, float $blue): voi * the postscript document. * This function sets the length of the black and white portion of a * dashed border line. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $black The length of the dash. * @param float $white The length of the gap between dashes. * @throws PsException - * + * */ function ps_set_border_dash($psdoc, float $black, float $white): void { error_clear_last(); $result = \ps_set_border_dash($psdoc, $black, $white); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1134,20 +1134,20 @@ function ps_set_border_dash($psdoc, float $black, float $white): void * pdf and viewed in a pdf viewer. This rectangle is not visible in * the postscript document. * This function sets the appearance and width of the border line. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $style style can be solid or * dashed. * @param float $width The line width of the border. * @throws PsException - * + * */ function ps_set_border_style($psdoc, string $style, float $width): void { error_clear_last(); $result = \ps_set_border_style($psdoc, $style, $width); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1158,16 +1158,16 @@ function ps_set_border_style($psdoc, string $style, float $width): void * as a comment in the header of the PostScript file. If the document is * converted to pdf this fields will also be used for the document * information. - * + * * The BoundingBox is usually set to the value given to the * first page. This only works if ps_findfont has not * been called before. In such cases the BoundingBox would be left unset * unless you set it explicitly with this function. - * + * * This function will have no effect anymore when the header of the postscript * file has been already written. It must be called before the first page * or the first call of ps_findfont. - * + * * @param resource $p Resource identifier of the postscript file * as returned by ps_new. * @param string $key The name of the information field to set. The values which can be @@ -1183,18 +1183,18 @@ function ps_set_border_style($psdoc, string $style, float $width): void * The first two numbers are the coordinates of the lower left corner of * the page. The last two numbers are the coordinates of the upper * right corner. - * + * * Up to version 0.2.6 of pslib, the BoundingBox and Orientation * will be overwritten by ps_begin_page, * unless ps_findfont has been called before. * @throws PsException - * + * */ function ps_set_info($p, string $key, string $val): void { error_clear_last(); $result = \ps_set_info($p, $key, $val); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1203,19 +1203,19 @@ function ps_set_info($p, string $key, string $val): void /** * Sets several parameters which are used by many functions. Parameters are by * definition string values. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $name For a list of possible names see ps_get_parameter. * @param string $value The value of the parameter. * @throws PsException - * + * */ function ps_set_parameter($psdoc, string $name, string $value): void { error_clear_last(); $result = \ps_set_parameter($psdoc, $name, $value); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1226,23 +1226,23 @@ function ps_set_parameter($psdoc, string $name, string $value): void * and y value separately by calling ps_set_value and * choosing textx respectively texty as * the value name. - * + * * If you want to output text at a certain position it is more convenient * to use ps_show_xy instead of setting the text position * and calling ps_show. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x x-coordinate of the new text position. * @param float $y y-coordinate of the new text position. * @throws PsException - * + * */ function ps_set_text_pos($psdoc, float $x, float $y): void { error_clear_last(); $result = \ps_set_text_pos($psdoc, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1251,71 +1251,71 @@ function ps_set_text_pos($psdoc, float $x, float $y): void /** * Sets several values which are used by many functions. Parameters are by * definition float values. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $name The name can be one of the following: - * - * + * + * * textrendering - * - * + * + * * The way how text is shown. - * - * - * - * + * + * + * + * * textx - * - * + * + * * The x coordinate for text output. - * - * - * - * + * + * + * + * * texty - * - * + * + * * The y coordinate for text output. - * - * - * - * + * + * + * + * * wordspacing - * - * + * + * * The distance between words relative to the width of a space. - * - * - * - * + * + * + * + * * leading - * - * + * + * * The distance between lines in pixels. - * - * - * - * - * + * + * + * + * + * * The way how text is shown. - * + * * The x coordinate for text output. - * + * * The y coordinate for text output. - * + * * The distance between words relative to the width of a space. - * + * * The distance between lines in pixels. * @param float $value The way how text is shown. * @throws PsException - * + * */ function ps_set_value($psdoc, string $name, float $value): void { error_clear_last(); $result = \ps_set_value($psdoc, $name, $value); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1323,14 +1323,14 @@ function ps_set_value($psdoc, string $name, float $value): void /** * Sets the color for drawing, filling, or both. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. - * @param string $type The parameter type can be + * @param string $type The parameter type can be * both, fill, or * fillstroke. * @param string $colorspace The colorspace should be one of gray, - * rgb, cmyk, + * rgb, cmyk, * spot, pattern. Depending on the * colorspace either only the first, the first three or all parameters * will be used. @@ -1344,13 +1344,13 @@ function ps_set_value($psdoc, string $name, float $value): void * @param float $c4 This must only be set in cmyk colorspace and specifies the black * component. * @throws PsException - * + * */ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float $c2, float $c3, float $c4): void { error_clear_last(); $result = \ps_setcolor($psdoc, $type, $colorspace, $c1, $c2, $c3, $c4); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1358,19 +1358,19 @@ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float /** * Sets the length of the black and white portions of a dashed line. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $on The length of the dash. * @param float $off The length of the gap between dashes. * @throws PsException - * + * */ function ps_setdash($psdoc, float $on, float $off): void { error_clear_last(); $result = \ps_setdash($psdoc, $on, $off); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1379,19 +1379,19 @@ function ps_setdash($psdoc, float $on, float $off): void /** * This function is * currently not documented; only its argument list is available. - * - * + * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $value The value must be between 0.2 and 1. * @throws PsException - * + * */ function ps_setflat($psdoc, float $value): void { error_clear_last(); $result = \ps_setflat($psdoc, $value); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1401,19 +1401,19 @@ function ps_setflat($psdoc, float $value): void * Sets a font, which has to be loaded before with * ps_findfont. Outputting text without setting a font * results in an error. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param int $fontid The font identifier as returned by ps_findfont. * @param float $size The size of the font. * @throws PsException - * + * */ function ps_setfont($psdoc, int $fontid, float $size): void { error_clear_last(); $result = \ps_setfont($psdoc, $fontid, $size); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1421,18 +1421,18 @@ function ps_setfont($psdoc, int $fontid, float $size): void /** * Sets the gray value for all following drawing operations. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $gray The value must be between 0 (white) and 1 (black). * @throws PsException - * + * */ function ps_setgray($psdoc, float $gray): void { error_clear_last(); $result = \ps_setgray($psdoc, $gray); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1440,7 +1440,7 @@ function ps_setgray($psdoc, float $gray): void /** * Sets how line ends look like. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param int $type The type of line ends. Possible values are @@ -1448,13 +1448,13 @@ function ps_setgray($psdoc, float $gray): void * PS_LINECAP_ROUND, or * PS_LINECAP_SQUARED. * @throws PsException - * + * */ function ps_setlinecap($psdoc, int $type): void { error_clear_last(); $result = \ps_setlinecap($psdoc, $type); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1462,7 +1462,7 @@ function ps_setlinecap($psdoc, int $type): void /** * Sets how lines are joined. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param int $type The way lines are joined. Possible values are @@ -1470,13 +1470,13 @@ function ps_setlinecap($psdoc, int $type): void * PS_LINEJOIN_ROUND, or * PS_LINEJOIN_BEVEL. * @throws PsException - * + * */ function ps_setlinejoin($psdoc, int $type): void { error_clear_last(); $result = \ps_setlinejoin($psdoc, $type); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1484,18 +1484,18 @@ function ps_setlinejoin($psdoc, int $type): void /** * Sets the line width for all following drawing operations. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $width The width of lines in points. * @throws PsException - * + * */ function ps_setlinewidth($psdoc, float $width): void { error_clear_last(); $result = \ps_setlinewidth($psdoc, $width); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1506,20 +1506,20 @@ function ps_setlinewidth($psdoc, float $width): void * PS_LINEJOIN_MITER, then * the resulting spike will be very long. The miter limit is the maximum * ratio of the miter length (the length of the spike) and the line width. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $value The maximum ratio between the miter length and the line width. Larger * values (> 10) will result in very long spikes when two lines meet * in a small angle. Keep the default unless you know what you are doing. * @throws PsException - * + * */ function ps_setmiterlimit($psdoc, float $value): void { error_clear_last(); $result = \ps_setmiterlimit($psdoc, $value); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1528,19 +1528,19 @@ function ps_setmiterlimit($psdoc, float $value): void /** * This function is * currently not documented; only its argument list is available. - * - * + * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. - * @param int $mode + * @param int $mode * @throws PsException - * + * */ function ps_setoverprintmode($psdoc, int $mode): void { error_clear_last(); $result = \ps_setoverprintmode($psdoc, $mode); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1550,19 +1550,19 @@ function ps_setoverprintmode($psdoc, int $mode): void * Sets the length of the black and white portions of a dashed line. * ps_setpolydash is used to set more complicated dash * patterns. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $arr arr is a list of length elements alternately for * the black and white portion. * @throws PsException - * + * */ function ps_setpolydash($psdoc, float $arr): void { error_clear_last(); $result = \ps_setpolydash($psdoc, $arr); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1572,7 +1572,7 @@ function ps_setpolydash($psdoc, float $arr): void * Creates a pattern based on a shading, which has to be created before with * ps_shading. Shading patterns can be used like regular * patterns. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param int $shadingid The identifier of a shading previously created with @@ -1580,13 +1580,13 @@ function ps_setpolydash($psdoc, float $arr): void * @param string $optlist This argument is not currently used. * @return int The identifier of the pattern . * @throws PsException - * + * */ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int { error_clear_last(); $result = \ps_shading_pattern($psdoc, $shadingid, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } return $result; @@ -1596,10 +1596,10 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int /** * Creates a shading, which can be used by ps_shfill or * ps_shading_pattern. - * + * * The color of the shading can be in any color space except for * pattern. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $type The type of shading can be either radial or @@ -1617,21 +1617,21 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int * optlist must also contain the parameters * r0 and r1 with the radius of the * start and end circle. - * @param float $y1 - * @param float $c1 - * @param float $c2 - * @param float $c3 - * @param float $c4 - * @param string $optlist + * @param float $y1 + * @param float $c1 + * @param float $c2 + * @param float $c3 + * @param float $c4 + * @param string $optlist * @return int Returns the identifier of the pattern . * @throws PsException - * + * */ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float $y1, float $c1, float $c2, float $c3, float $c4, string $optlist): int { error_clear_last(); $result = \ps_shading($psdoc, $type, $x0, $y0, $x1, $y1, $c1, $c2, $c3, $c4, $optlist); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } return $result; @@ -1643,19 +1643,19 @@ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float * ps_shading. This is an alternative way to creating * a pattern from a shading ps_shading_pattern and using * the pattern as the filling color. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param int $shadingid The identifier of a shading previously created with * ps_shading. * @throws PsException - * + * */ function ps_shfill($psdoc, int $shadingid): void { error_clear_last(); $result = \ps_shfill($psdoc, $shadingid); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1663,20 +1663,20 @@ function ps_shfill($psdoc, int $shadingid): void /** * Output a text at the given text position. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $text The text to be output. * @param float $x x-coordinate of the lower left corner of the box surrounding the text. * @param float $y y-coordinate of the lower left corner of the box surrounding the text. * @throws PsException - * + * */ function ps_show_xy($psdoc, string $text, float $x, float $y): void { error_clear_last(); $result = \ps_show_xy($psdoc, $text, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1685,21 +1685,21 @@ function ps_show_xy($psdoc, string $text, float $x, float $y): void /** * This function is * currently not documented; only its argument list is available. - * - * - * @param resource $psdoc - * @param string $text - * @param int $len - * @param float $xcoor - * @param float $ycoor + * + * + * @param resource $psdoc + * @param string $text + * @param int $len + * @param float $xcoor + * @param float $ycoor * @throws PsException - * + * */ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor): void { error_clear_last(); $result = \ps_show_xy2($psdoc, $text, $len, $xcoor, $ycoor); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1711,22 +1711,22 @@ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor) * and texty with the function * ps_set_value. The function will issue an * error if a font was not set before with ps_setfont. - * + * * ps_show evaluates the following parameters and values * as set by ps_set_parameter and * ps_set_value. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $text The text to be output. * @throws PsException - * + * */ function ps_show($psdoc, string $text): void { error_clear_last(); $result = \ps_show($psdoc, $text); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1734,19 +1734,19 @@ function ps_show($psdoc, string $text): void /** * Output text at the current position. Do not print more than len characters. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param string $text The text to be output. * @param int $len The maximum number of characters to print. * @throws PsException - * + * */ function ps_show2($psdoc, string $text, int $len): void { error_clear_last(); $result = \ps_show2($psdoc, $text, $len); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1755,17 +1755,17 @@ function ps_show2($psdoc, string $text, int $len): void /** * Draws the path constructed with previously called drawing functions like * ps_lineto. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @throws PsException - * + * */ function ps_stroke($psdoc): void { error_clear_last(); $result = \ps_stroke($psdoc); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1775,18 +1775,18 @@ function ps_stroke($psdoc): void * Output the glyph at position ord in the font * encoding vector of the current font. The font encoding for a font can be * set when loading the font with ps_findfont. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param int $ord The position of the glyph in the font encoding vector. * @throws PsException - * + * */ function ps_symbol($psdoc, int $ord): void { error_clear_last(); $result = \ps_symbol($psdoc, $ord); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } @@ -1794,21 +1794,19 @@ function ps_symbol($psdoc, int $ord): void /** * Sets a new initial point of the coordinate system. - * + * * @param resource $psdoc Resource identifier of the postscript file * as returned by ps_new. * @param float $x x-coordinate of the origin of the translated coordinate system. * @param float $y y-coordinate of the origin of the translated coordinate system. * @throws PsException - * + * */ function ps_translate($psdoc, float $x, float $y): void { error_clear_last(); $result = \ps_translate($psdoc, $x, $y); - if ($result === FALSE) { + if ($result === false) { throw PsException::createFromPhpError(); } } - - diff --git a/generated/pspell.php b/generated/pspell.php index 9bd6b4f6..ae6f028b 100644 --- a/generated/pspell.php +++ b/generated/pspell.php @@ -5,53 +5,53 @@ use Safe\Exceptions\PspellException; /** - * - * - * @param int $dictionary_link + * + * + * @param int $dictionary_link * @param string $word The added word. * @throws PspellException - * + * */ function pspell_add_to_personal(int $dictionary_link, string $word): void { error_clear_last(); $result = \pspell_add_to_personal($dictionary_link, $word); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } /** - * - * - * @param int $dictionary_link + * + * + * @param int $dictionary_link * @param string $word The added word. * @throws PspellException - * + * */ function pspell_add_to_session(int $dictionary_link, string $word): void { error_clear_last(); $result = \pspell_add_to_session($dictionary_link, $word); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } /** - * - * - * @param int $dictionary_link + * + * + * @param int $dictionary_link * @throws PspellException - * + * */ function pspell_clear_session(int $dictionary_link): void { error_clear_last(); $result = \pspell_clear_session($dictionary_link); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } @@ -59,7 +59,7 @@ function pspell_clear_session(int $dictionary_link): void /** * Create a config used to open a dictionary. - * + * * pspell_config_create has a very similar syntax to * pspell_new. In fact, using * pspell_config_create immediately followed by @@ -68,10 +68,10 @@ function pspell_clear_session(int $dictionary_link): void * pspell_config_* functions before calling * pspell_new_config to take advantage of some * advanced functionality. - * + * * For more information and examples, check out inline manual pspell * website:http://aspell.net/. - * + * * @param string $language The language parameter is the language code which consists of the * two letter ISO 639 language code and an optional two letter ISO * 3166 country code after a dash or underscore. @@ -88,7 +88,7 @@ function pspell_clear_session(int $dictionary_link): void * using. * @return int Retuns a pspell config identifier, . * @throws PspellException - * + * */ function pspell_config_create(string $language, string $spelling = null, string $jargon = null, string $encoding = null): int { @@ -99,10 +99,10 @@ function pspell_config_create(string $language, string $spelling = null, string $result = \pspell_config_create($language, $spelling, $jargon); } elseif ($spelling !== null) { $result = \pspell_config_create($language, $spelling); - }else { + } else { $result = \pspell_config_create($language); } - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } return $result; @@ -112,18 +112,18 @@ function pspell_config_create(string $language, string $spelling = null, string /** * This function is * currently not documented; only its argument list is available. - * - * - * @param int $conf - * @param string $directory + * + * + * @param int $conf + * @param string $directory * @throws PspellException - * + * */ function pspell_config_data_dir(int $conf, string $directory): void { error_clear_last(); $result = \pspell_config_data_dir($conf, $directory); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } @@ -132,74 +132,74 @@ function pspell_config_data_dir(int $conf, string $directory): void /** * This function is * currently not documented; only its argument list is available. - * - * - * @param int $conf - * @param string $directory + * + * + * @param int $conf + * @param string $directory * @throws PspellException - * + * */ function pspell_config_dict_dir(int $conf, string $directory): void { error_clear_last(); $result = \pspell_config_dict_dir($conf, $directory); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } /** - * - * - * @param int $dictionary_link + * + * + * @param int $dictionary_link * @param int $n Words less than n characters will be skipped. * @throws PspellException - * + * */ function pspell_config_ignore(int $dictionary_link, int $n): void { error_clear_last(); $result = \pspell_config_ignore($dictionary_link, $n); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } /** - * - * - * @param int $dictionary_link + * + * + * @param int $dictionary_link * @param int $mode The mode parameter is the mode in which spellchecker will work. * There are several modes available: - * - * - * + * + * + * * PSPELL_FAST - Fast mode (least number of * suggestions) - * - * - * - * + * + * + * + * * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * + * + * + * + * * PSPELL_BAD_SPELLERS - Slow mode (a lot of * suggestions) - * - * - * + * + * + * * @throws PspellException - * + * */ function pspell_config_mode(int $dictionary_link, int $mode): void { error_clear_last(); $result = \pspell_config_mode($dictionary_link, $mode); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } @@ -210,21 +210,21 @@ function pspell_config_mode(int $dictionary_link, int $mode): void * loaded and used in addition to the standard one after you call * pspell_new_config. The file is also the file where * pspell_save_wordlist will save personal wordlist to. - * + * * pspell_config_personal should be used on a config * before calling pspell_new_config. - * - * @param int $dictionary_link + * + * @param int $dictionary_link * @param string $file The personal wordlist. If the file does not exist, it will be created. * The file should be writable by whoever PHP runs as (e.g. nobody). * @throws PspellException - * + * */ function pspell_config_personal(int $dictionary_link, string $file): void { error_clear_last(); $result = \pspell_config_personal($dictionary_link, $file); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } @@ -232,26 +232,26 @@ function pspell_config_personal(int $dictionary_link, string $file): void /** * Set a file that contains replacement pairs. - * + * * The replacement pairs improve the quality of the spellchecker. When a word * is misspelled, and a proper suggestion was not found in the list, * pspell_store_replacement can be used to store a * replacement pair and then pspell_save_wordlist to * save the wordlist along with the replacement pairs. - * + * * pspell_config_repl should be used on a config * before calling pspell_new_config. - * - * @param int $dictionary_link + * + * @param int $dictionary_link * @param string $file The file should be writable by whoever PHP runs as (e.g. nobody). * @throws PspellException - * + * */ function pspell_config_repl(int $dictionary_link, string $file): void { error_clear_last(); $result = \pspell_config_repl($dictionary_link, $file); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } @@ -263,21 +263,21 @@ function pspell_config_repl(int $dictionary_link, string $file): void * there should be a space between the two words. Changing this setting only * affects the results returned by pspell_check; * pspell_suggest will still return suggestions. - * + * * pspell_config_runtogether should be used on a config * before calling pspell_new_config. - * - * @param int $dictionary_link + * + * @param int $dictionary_link * @param bool $flag TRUE if run-together words should be treated as legal compounds, * FALSE otherwise. * @throws PspellException - * + * */ function pspell_config_runtogether(int $dictionary_link, bool $flag): void { error_clear_last(); $result = \pspell_config_runtogether($dictionary_link, $flag); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } @@ -291,20 +291,20 @@ function pspell_config_runtogether(int $dictionary_link, bool $flag): void * replacement pairs will be saved by * pspell_save_wordlist anyway, and if it is not, * the replacement pairs will not be saved. - * + * * pspell_config_save_repl should be used on a config * before calling pspell_new_config. - * - * @param int $dictionary_link + * + * @param int $dictionary_link * @param bool $flag TRUE if replacement pairs should be saved, FALSE otherwise. * @throws PspellException - * + * */ function pspell_config_save_repl(int $dictionary_link, bool $flag): void { error_clear_last(); $result = \pspell_config_save_repl($dictionary_link, $flag); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } @@ -314,10 +314,10 @@ function pspell_config_save_repl(int $dictionary_link, bool $flag): void * pspell_new opens up a new dictionary and * returns the dictionary link identifier for use in other pspell * functions. - * + * * For more information and examples, check out inline manual pspell * website:http://aspell.net/. - * + * * @param string $language The language parameter is the language code which consists of the * two letter ISO 639 language code and an optional two letter ISO * 3166 country code after a dash or underscore. @@ -334,35 +334,35 @@ function pspell_config_save_repl(int $dictionary_link, bool $flag): void * using. * @param int $mode The mode parameter is the mode in which spellchecker will work. * There are several modes available: - * - * - * + * + * + * * PSPELL_FAST - Fast mode (least number of * suggestions) - * - * - * - * + * + * + * + * * PSPELL_NORMAL - Normal mode (more suggestions) - * - * - * - * + * + * + * + * * PSPELL_BAD_SPELLERS - Slow mode (a lot of * suggestions) - * - * - * - * + * + * + * + * * PSPELL_RUN_TOGETHER - Consider run-together words * as legal compounds. That is, "thecat" will be a legal compound, * although there should be a space between the two words. Changing this * setting only affects the results returned by * pspell_check; pspell_suggest * will still return suggestions. - * - * - * + * + * + * * Mode is a bitmask constructed from different constants listed above. * However, PSPELL_FAST, * PSPELL_NORMAL and @@ -370,7 +370,7 @@ function pspell_config_save_repl(int $dictionary_link, bool $flag): void * should select only one of them. * @return int Returns the dictionary link identifier on success . * @throws PspellException - * + * */ function pspell_new(string $language, string $spelling = null, string $jargon = null, string $encoding = null, int $mode = 0): int { @@ -383,10 +383,10 @@ function pspell_new(string $language, string $spelling = null, string $jargon = $result = \pspell_new($language, $spelling, $jargon); } elseif ($spelling !== null) { $result = \pspell_new($language, $spelling); - }else { + } else { $result = \pspell_new($language); } - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } return $result; @@ -394,40 +394,38 @@ function pspell_new(string $language, string $spelling = null, string $jargon = /** - * - * + * + * * @param int $dictionary_link A dictionary link identifier opened with * pspell_new_personal. * @throws PspellException - * + * */ function pspell_save_wordlist(int $dictionary_link): void { error_clear_last(); $result = \pspell_save_wordlist($dictionary_link); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } /** - * - * + * + * * @param int $dictionary_link A dictionary link identifier, opened with * pspell_new_personal * @param string $misspelled The misspelled word. * @param string $correct The fixed spelling for the misspelled word. * @throws PspellException - * + * */ function pspell_store_replacement(int $dictionary_link, string $misspelled, string $correct): void { error_clear_last(); $result = \pspell_store_replacement($dictionary_link, $misspelled, $correct); - if ($result === FALSE) { + if ($result === false) { throw PspellException::createFromPhpError(); } } - - diff --git a/generated/readline.php b/generated/readline.php index 052befdc..a1c52c75 100644 --- a/generated/readline.php +++ b/generated/readline.php @@ -6,16 +6,16 @@ /** * This function adds a line to the command line history. - * + * * @param string $line The line to be added in the history. * @throws ReadlineException - * + * */ function readline_add_history(string $line): void { error_clear_last(); $result = \readline_add_history($line); - if ($result === FALSE) { + if ($result === false) { throw ReadlineException::createFromPhpError(); } } @@ -23,18 +23,18 @@ function readline_add_history(string $line): void /** * Sets up a readline callback interface then prints - * prompt and immediately returns. + * prompt and immediately returns. * Calling this function twice without removing the previous * callback interface will automatically and conveniently overwrite the old * interface. - * + * * The callback feature is useful when combined with * stream_select as it allows interleaving of IO and * user input, unlike readline. - * - * + * + * * Readline Callback Interface Example - * + * * 10) { * $prompting = false; * readline_callback_handler_remove(); @@ -42,12 +42,12 @@ function readline_add_history(string $line): void * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback'); * } * } - * + * * $c = 1; * $prompting = true; - * + * * readline_callback_handler_install("[$c] Enter something: ", 'rl_callback'); - * + * * while ($prompting) { * $w = NULL; * $e = NULL; @@ -57,24 +57,24 @@ function readline_add_history(string $line): void * readline_callback_read_char(); * } * } - * + * * echo "Prompting disabled. All done.\n"; * ?> * ]]> - * - * - * + * + * + * * @param string $prompt The prompt message. * @param callable $callback The callback function takes one parameter; the * user input returned. * @throws ReadlineException - * + * */ function readline_callback_handler_install(string $prompt, callable $callback): void { error_clear_last(); $result = \readline_callback_handler_install($prompt, $callback); - if ($result === FALSE) { + if ($result === false) { throw ReadlineException::createFromPhpError(); } } @@ -82,15 +82,15 @@ function readline_callback_handler_install(string $prompt, callable $callback): /** * This function clears the entire command line history. - * + * * @throws ReadlineException - * + * */ function readline_clear_history(): void { error_clear_last(); $result = \readline_clear_history(); - if ($result === FALSE) { + if ($result === false) { throw ReadlineException::createFromPhpError(); } } @@ -99,17 +99,17 @@ function readline_clear_history(): void /** * This function registers a completion function. This is the same kind of * functionality you'd get if you hit your tab key while using Bash. - * + * * @param callable $function You must supply the name of an existing function which accepts a * partial command line and returns an array of possible matches. * @throws ReadlineException - * + * */ function readline_completion_function(callable $function): void { error_clear_last(); $result = \readline_completion_function($function); - if ($result === FALSE) { + if ($result === false) { throw ReadlineException::createFromPhpError(); } } @@ -117,20 +117,20 @@ function readline_completion_function(callable $function): void /** * This function reads a command history from a file. - * + * * @param string $filename Path to the filename containing the command history. * @throws ReadlineException - * + * */ function readline_read_history(string $filename = null): void { error_clear_last(); if ($filename !== null) { $result = \readline_read_history($filename); - }else { + } else { $result = \readline_read_history(); } - if ($result === FALSE) { + if ($result === false) { throw ReadlineException::createFromPhpError(); } } @@ -138,22 +138,20 @@ function readline_read_history(string $filename = null): void /** * This function writes the command history to a file. - * + * * @param string $filename Path to the saved file. * @throws ReadlineException - * + * */ function readline_write_history(string $filename = null): void { error_clear_last(); if ($filename !== null) { $result = \readline_write_history($filename); - }else { + } else { $result = \readline_write_history(); } - if ($result === FALSE) { + if ($result === false) { throw ReadlineException::createFromPhpError(); } } - - diff --git a/generated/rrd.php b/generated/rrd.php index 9ecae2d2..9bb3b5c5 100644 --- a/generated/rrd.php +++ b/generated/rrd.php @@ -6,20 +6,18 @@ /** * 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 * for whole list of options. * @throws RrdException - * + * */ function rrd_create(string $filename, array $options): void { error_clear_last(); $result = \rrd_create($filename, $options); - if ($result === FALSE) { + if ($result === false) { throw RrdException::createFromPhpError(); } } - - diff --git a/generated/sem.php b/generated/sem.php index 004db4c9..5b0c68f1 100644 --- a/generated/sem.php +++ b/generated/sem.php @@ -6,16 +6,16 @@ /** * Checks whether the message queue key exists. - * + * * @param int $key Queue key. * @throws SemException - * + * */ function msg_queue_exists(int $key): void { error_clear_last(); $result = \msg_queue_exists($key); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -25,8 +25,8 @@ function msg_queue_exists(int $key): void * msg_receive will receive the first message from the * specified queue of the type specified by * desiredmsgtype. - * - * @param resource $queue + * + * @param resource $queue * @param int $desiredmsgtype If desiredmsgtype is 0, the message from the front * of the queue is returned. If desiredmsgtype is * greater than 0, then the first message of that type is returned. @@ -51,56 +51,56 @@ function msg_queue_exists(int $key): void * and then returned to your script. This allows you to easily receive * arrays or complex object structures from other PHP scripts, or if you * are using the WDDX serializer, from any WDDX compatible source. - * + * * If unserialize is FALSE, the message will be * returned as a binary-safe string. * @param int $flags The optional flags allows you to pass flags to the * low-level msgrcv system call. It defaults to 0, but you may specify one * or more of the following values (by adding or ORing them together). - * + * * Flag values for msg_receive - * - * - * + * + * + * * MSG_IPC_NOWAIT * If there are no messages of the * desiredmsgtype, return immediately and do not * wait. The function will fail and return an integer value * corresponding to MSG_ENOMSG. - * - * - * + * + * + * * MSG_EXCEPT * Using this flag in combination with a * desiredmsgtype greater than 0 will cause the * function to receive the first message that is not equal to * desiredmsgtype. - * - * + * + * * MSG_NOERROR - * + * * If the message is longer than maxsize, * setting this flag will truncate the message to * maxsize and will not signal an error. - * - * - * - * - * + * + * + * + * + * * @param int $errorcode If the function fails, the optional errorcode * will be set to the value of the system errno variable. * @throws SemException - * + * */ function msg_receive($queue, int $desiredmsgtype, int &$msgtype, int $maxsize, &$message, bool $unserialize = true, int $flags = 0, int &$errorcode = null): void { error_clear_last(); if ($errorcode !== null) { $result = \msg_receive($queue, $desiredmsgtype, $msgtype, $maxsize, $message, $unserialize, $flags, $errorcode); - }else { + } else { $result = \msg_receive($queue, $desiredmsgtype, $msgtype, $maxsize, $message, $unserialize, $flags); } - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -111,16 +111,16 @@ function msg_receive($queue, int $desiredmsgtype, int &$msgtype, int $maxsize, & * by the queue. Only use this function when all * processes have finished working with the message queue and you need to * release the system resources held by it. - * + * * @param resource $queue Message queue resource handle * @throws SemException - * + * */ function msg_remove_queue($queue): void { error_clear_last(); $result = \msg_remove_queue($queue); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -130,10 +130,10 @@ function msg_remove_queue($queue): void * msg_send sends a message of type * msgtype (which MUST be greater than 0) to * the message queue specified by queue. - * - * @param resource $queue - * @param int $msgtype - * @param mixed $message + * + * @param resource $queue + * @param int $msgtype + * @param mixed $message * @param bool $serialize The optional serialize controls how the * message is sent. serialize * defaults to TRUE which means that the message is @@ -151,19 +151,19 @@ function msg_remove_queue($queue): void * errorcode to MSG_EAGAIN, * indicating that you should try to send your message again a little * later on. - * @param int $errorcode + * @param int $errorcode * @throws SemException - * + * */ function msg_send($queue, int $msgtype, $message, bool $serialize = true, bool $blocking = true, int &$errorcode = null): void { error_clear_last(); if ($errorcode !== null) { $result = \msg_send($queue, $msgtype, $message, $serialize, $blocking, $errorcode); - }else { + } else { $result = \msg_send($queue, $msgtype, $message, $serialize, $blocking); } - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -173,24 +173,24 @@ function msg_send($queue, int $msgtype, $message, bool $serialize = true, bool $ * msg_set_queue allows you to change the values of the * msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the * underlying message queue data structure. - * + * * Changing the data structure will require that PHP be running as the same * user that created the queue, owns the queue (as determined by the * existing msg_perm.xxx fields), or be running with root privileges. * root privileges are required to raise the msg_qbytes values above the * system defined limit. - * + * * @param resource $queue Message queue resource handle * @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 - * + * */ function msg_set_queue($queue, array $data): void { error_clear_last(); $result = \msg_set_queue($queue, $data); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -201,11 +201,11 @@ function msg_set_queue($queue, array $data): void * semaphore can be acquired. A process attempting to acquire a semaphore which * it has already acquired will block forever if acquiring the semaphore would * cause its maximum number of semaphore to be exceeded. - * + * * After processing a request, any semaphores acquired by the process but not * explicitly released will be released automatically and a warning will be * generated. - * + * * @param resource $sem_identifier sem_identifier is a semaphore resource, * obtained from sem_get. * @param bool $nowait Specifies if the process shouldn't wait for the semaphore to be acquired. @@ -213,13 +213,13 @@ function msg_set_queue($queue, array $data): void * false immediately if a semaphore cannot be immediately * acquired. * @throws SemException - * + * */ function sem_acquire($sem_identifier, bool $nowait = false): void { error_clear_last(); $result = \sem_acquire($sem_identifier, $nowait); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -228,12 +228,12 @@ function sem_acquire($sem_identifier, bool $nowait = false): void /** * sem_get returns an id that can be used to * access the System V semaphore with the given key. - * + * * A second call to sem_get for the same key * will return a different semaphore identifier, but both * identifiers access the same underlying semaphore. - * - * @param int $key + * + * @param int $key * @param int $max_acquire The number of processes that can acquire the semaphore simultaneously * is set to max_acquire. * @param int $perm The semaphore permissions. Actually this value is @@ -243,13 +243,13 @@ function sem_acquire($sem_identifier, bool $nowait = false): void * shutdown. * @return resource Returns a positive semaphore identifier on success, . * @throws SemException - * + * */ function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1) { error_clear_last(); $result = \sem_get($key, $max_acquire, $perm, $auto_release); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } return $result; @@ -260,20 +260,20 @@ function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_rel * sem_release releases the semaphore if it * is currently acquired by the calling process, otherwise * a warning is generated. - * + * * After releasing the semaphore, sem_acquire * may be called to re-acquire it. - * + * * @param resource $sem_identifier A Semaphore resource handle as returned by * sem_get. * @throws SemException - * + * */ function sem_release($sem_identifier): void { error_clear_last(); $result = \sem_release($sem_identifier); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -281,19 +281,19 @@ function sem_release($sem_identifier): void /** * sem_remove removes the given semaphore. - * + * * After removing the semaphore, it is no longer accessible. - * + * * @param resource $sem_identifier A semaphore resource identifier as returned * by sem_get. * @throws SemException - * + * */ function sem_remove($sem_identifier): void { error_clear_last(); $result = \sem_remove($sem_identifier); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -303,12 +303,12 @@ function sem_remove($sem_identifier): void * shm_put_var inserts or updates the * variable with the given * variable_key. - * + * * Warnings (E_WARNING level) will be issued if * shm_identifier is not a valid SysV shared memory * index or if there was not enough shared memory remaining to complete your * request. - * + * * @param resource $shm_identifier A shared memory resource handle as returned by * shm_attach * @param int $variable_key The variable key. @@ -317,13 +317,13 @@ function sem_remove($sem_identifier): void * this means all types except for resources and some internal objects * that cannot be serialized. * @throws SemException - * + * */ function shm_put_var($shm_identifier, int $variable_key, $variable): void { error_clear_last(); $result = \shm_put_var($shm_identifier, $variable_key, $variable); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -332,18 +332,18 @@ function shm_put_var($shm_identifier, int $variable_key, $variable): void /** * Removes a variable with a given variable_key * and frees the occupied memory. - * + * * @param resource $shm_identifier The shared memory identifier as returned by * shm_attach * @param int $variable_key The variable key. * @throws SemException - * + * */ function shm_remove_var($shm_identifier, int $variable_key): void { error_clear_last(); $result = \shm_remove_var($shm_identifier, $variable_key); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } @@ -352,19 +352,17 @@ function shm_remove_var($shm_identifier, int $variable_key): void /** * shm_remove removes the shared memory * shm_identifier. All data will be destroyed. - * + * * @param resource $shm_identifier The shared memory identifier as returned by * shm_attach * @throws SemException - * + * */ function shm_remove($shm_identifier): void { error_clear_last(); $result = \shm_remove($shm_identifier); - if ($result === FALSE) { + if ($result === false) { throw SemException::createFromPhpError(); } } - - diff --git a/generated/session.php b/generated/session.php index 2599a05b..5e3184ad 100644 --- a/generated/session.php +++ b/generated/session.php @@ -7,15 +7,15 @@ /** * session_abort finishes session without saving * data. Thus the original values in session data are kept. - * + * * @throws SessionException - * + * */ function session_abort(): void { error_clear_last(); $result = \session_abort(); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -25,19 +25,19 @@ function session_abort(): void * session_decode decodes the serialized session data provided in * $data, and populates the $_SESSION superglobal * with the result. - * + * * By default, the unserialization method used is internal to PHP, and is not the same as unserialize. * The serialization method can be set using session.serialize_handler. - * + * * @param string $data The encoded data to be stored. * @throws SessionException - * + * */ function session_decode(string $data): void { error_clear_last(); $result = \session_decode($data); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -48,22 +48,22 @@ function session_decode(string $data): void * session ID must also be unset. If a cookie is used to propagate the * session ID (default behavior), then the session cookie must be deleted. * setcookie may be used for that. - * + * * When session.use_strict_mode * is enabled. You do not have to remove obsolete session ID cookie because * session module will not accept session ID cookie when there is no * data associated to the session ID and set new session ID cookie. * Enabling session.use_strict_mode * is recommended for all sites. - * + * * @throws SessionException - * + * */ function session_destroy(): void { error_clear_last(); $result = \session_destroy(); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -72,23 +72,23 @@ function session_destroy(): void /** * session_regenerate_id will replace the current * session id with a new one, and keep the current session information. - * + * * When session.use_trans_sid * is enabled, output must be started after session_regenerate_id * call. Otherwise, old session ID is used. - * + * * @param bool $delete_old_session Whether to delete the old associated session file or not. * You should not delete old session if you need to avoid * races caused by deletion or detect/avoid session hijack * attacks. * @throws SessionException - * + * */ function session_regenerate_id(bool $delete_old_session = false): void { error_clear_last(); $result = \session_regenerate_id($delete_old_session); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -100,36 +100,36 @@ function session_regenerate_id(bool $delete_old_session = false): void * variable or an array consisting of variable names or other arrays. For * each name, session_register registers the global * variable with that name in the current session. - * + * * You can also create a session variable by simply setting the * appropriate member of the $_SESSION array. - * - * - * + * + * + * * ]]> - * - * - * + * + * + * * If session_start was not called before this function * is called, an implicit call to session_start with no * parameters will be made. $_SESSION does not mimic * this behavior and requires session_start before use. - * + * * @param mixed $name A string holding the name of a variable or an array consisting of * variable names or other arrays. - * @param mixed $params + * @param mixed $params * @throws SessionException - * + * */ -function session_register($name, ...$params): void +function session_register($name, ...$params): void { error_clear_last(); if ($params !== null) { $result = \session_register($name, $params); - }else { + } else { $result = \session_register($name); } - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -139,15 +139,15 @@ function session_register($name, ...$params): void * session_reset reinitializes a session with * original values stored in session storage. This function requires an active session and * discards changes in $_SESSION. - * + * * @throws SessionException - * + * */ function session_reset(): void { error_clear_last(); $result = \session_reset(); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -158,10 +158,10 @@ function session_reset(): void * function only lasts for the duration of the script. Thus, you need to * call session_set_cookie_params for every request and * before session_start is called. - * + * * This function updates the runtime ini values of the corresponding PHP ini configuration * keys which can be retrieved with the ini_get. - * + * * @param int $lifetime Lifetime of the * session cookie, defined in seconds. * @param string $path Path on the domain where @@ -176,7 +176,7 @@ function session_reset(): void * httponly * flag when setting the session cookie. * @throws SessionException - * + * */ function session_set_cookie_params(int $lifetime, string $path = null, string $domain = null, bool $secure = false, bool $httponly = false): void { @@ -189,10 +189,10 @@ function session_set_cookie_params(int $lifetime, string $path = null, string $d $result = \session_set_cookie_params($lifetime, $path, $domain); } elseif ($path !== null) { $result = \session_set_cookie_params($lifetime, $path); - }else { + } else { $result = \session_set_cookie_params($lifetime); } - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -201,16 +201,16 @@ function session_set_cookie_params(int $lifetime, string $path = null, string $d /** * session_unregister unregisters the global variable * named name from the current session. - * + * * @param string $name The variable name. * @throws SessionException - * + * */ function session_unregister(string $name): void { error_clear_last(); $result = \session_unregister($name); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -219,15 +219,15 @@ function session_unregister(string $name): void /** * The session_unset function frees all session variables * currently registered. - * + * * @throws SessionException - * + * */ function session_unset(): void { error_clear_last(); $result = \session_unset(); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } @@ -235,7 +235,7 @@ function session_unset(): void /** * End the current session and store session data. - * + * * Session data is usually stored after your script terminated without the * need to call session_write_close, but as session data * is locked to prevent concurrent writes only one script may operate on a @@ -243,17 +243,15 @@ function session_unset(): void * experience the frames loading one by one due to this locking. You can * reduce the time needed to load all the frames by ending the session as * soon as all changes to session variables are done. - * + * * @throws SessionException - * + * */ function session_write_close(): void { error_clear_last(); $result = \session_write_close(); - if ($result === FALSE) { + if ($result === false) { throw SessionException::createFromPhpError(); } } - - diff --git a/generated/shmop.php b/generated/shmop.php index 40cdf7d4..6a46b23c 100644 --- a/generated/shmop.php +++ b/generated/shmop.php @@ -6,17 +6,17 @@ /** * shmop_delete is used to delete a shared memory block. - * - * @param int $shmid The shared memory block resource created by + * + * @param int $shmid The shared memory block resource created by * shmop_open * @throws ShmopException - * + * */ function shmop_delete($shmid): void { error_clear_last(); $result = \shmop_delete($shmid); - if ($result === FALSE) { + if ($result === false) { throw ShmopException::createFromPhpError(); } } @@ -24,23 +24,21 @@ function shmop_delete($shmid): void /** * shmop_read will read a string from shared memory block. - * - * @param int $shmid The shared memory block identifier created by + * + * @param int $shmid The shared memory block identifier created by * shmop_open * @param int $start Offset from which to start reading * @param int $count The number of bytes to read * @return string Returns the data . * @throws ShmopException - * + * */ function shmop_read($shmid, int $start, int $count): string { error_clear_last(); $result = \shmop_read($shmid, $start, $count); - if ($result === FALSE) { + if ($result === false) { throw ShmopException::createFromPhpError(); } return $result; } - - diff --git a/generated/simplexml.php b/generated/simplexml.php index 97404050..7f86765d 100644 --- a/generated/simplexml.php +++ b/generated/simplexml.php @@ -8,24 +8,22 @@ * This function takes a node of a DOM * document and makes it into a SimpleXML node. This new object can * then be used as a native SimpleXML element. - * + * * @param DOMNode $node A DOM Element node * @param string $class_name You may use this optional parameter so that - * simplexml_import_dom will return an object of - * the specified class. That class should extend the + * simplexml_import_dom will return an object of + * the specified class. That class should extend the * SimpleXMLElement class. * @return SimpleXMLElement Returns a SimpleXMLElement . * @throws SimplexmlException - * + * */ function simplexml_import_dom(DOMNode $node, string $class_name = "SimpleXMLElement"): SimpleXMLElement { error_clear_last(); $result = \simplexml_import_dom($node, $class_name); - if ($result === FALSE) { + if ($result === false) { throw SimplexmlException::createFromPhpError(); } return $result; } - - diff --git a/generated/sockets.php b/generated/sockets.php index 8e56c390..12c50e0b 100644 --- a/generated/sockets.php +++ b/generated/sockets.php @@ -18,13 +18,13 @@ * has been made non-blocking using * socket_set_blocking or * socket_set_nonblock, FALSE will be returned. - * + * * The socket resource returned by * socket_accept may not be used to accept new * connections. The original listening socket * socket, however, remains open and may be * reused. - * + * * @param resource $socket A valid socket resource created with socket_create. * @return resource Returns a new socket resource on success, . The actual * error code can be retrieved by calling @@ -32,13 +32,13 @@ * socket_strerror to get a textual explanation of the * error. * @throws SocketsException - * + * */ function socket_accept($socket) { error_clear_last(); $result = \socket_accept($socket); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -50,12 +50,12 @@ function socket_accept($socket) * described by socket. This has to be done before * a connection is be established using socket_connect * or socket_listen. - * + * * @param resource $socket A valid socket resource created with socket_create. * @param string $address If the socket is of the AF_INET family, the * address is an IP in dotted-quad notation * (e.g. 127.0.0.1). - * + * * If the socket is of the AF_UNIX family, the * address is the path of a * Unix-domain socket (e.g. /tmp/my.sock). @@ -63,13 +63,13 @@ function socket_accept($socket) * binding an AF_INET socket, and designates * the port on which to listen for connections. * @throws SocketsException - * + * */ function socket_bind($socket, string $address, int $port = 0): void { error_clear_last(); $result = \socket_bind($socket, $address, $port); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } } @@ -79,10 +79,10 @@ function socket_bind($socket, string $address, int $port = 0): void * socket_create_listen creates a new socket resource of * type AF_INET listening on all * local interfaces on the given port waiting for new connections. - * + * * This function is meant to ease the task of creating a new socket which * only listens to accept new connections. - * + * * @param int $port The port on which to listen on all interfaces. * @param int $backlog The backlog parameter defines the maximum length * the queue of pending connections may grow to. @@ -95,13 +95,13 @@ function socket_bind($socket, string $address, int $port = 0): void * socket_strerror to get a textual explanation of the * error. * @throws SocketsException - * + * */ function socket_create_listen(int $port, int $backlog = 128) { error_clear_last(); $result = \socket_create_listen($port, $backlog); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -112,12 +112,12 @@ function socket_create_listen(int $port, int $backlog = 128) * socket_create_pair creates two connected and * indistinguishable sockets, and stores them in fd. * This function is commonly used in IPC (InterProcess Communication). - * + * * @param int $domain The domain parameter specifies the protocol * family to be used by the socket. See socket_create * for the full list. * @param int $type The type parameter selects the type of communication - * to be used by the socket. See socket_create for the + * to be used by the socket. See socket_create for the * full list. * @param int $protocol The protocol parameter sets the specific * protocol within the specified domain to be used @@ -126,18 +126,18 @@ function socket_create_listen(int $port, int $backlog = 128) * the desired protocol is TCP, or UDP the corresponding constants * SOL_TCP, and SOL_UDP * can also be used. - * - * See socket_create for the full list of supported + * + * See socket_create for the full list of supported * protocols. * @param resource[] $fd Reference to an array in which the two socket resources will be inserted. * @throws SocketsException - * + * */ function socket_create_pair(int $domain, int $type, int $protocol, array &$fd): void { error_clear_last(); $result = \socket_create_pair($domain, $type, $protocol, $fd); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } } @@ -147,7 +147,7 @@ function socket_create_pair(int $domain, int $type, int $protocol, array &$fd): * Creates and returns a socket resource, also referred to as an endpoint * of communication. A typical network connection is made up of 2 sockets, one * performing the role of the client, and another performing the role of the server. - * + * * @param int $domain The domain parameter specifies the protocol * family to be used by the socket. * @param int $type The type parameter selects the type of communication @@ -165,13 +165,13 @@ function socket_create_pair(int $domain, int $type, int $protocol, array &$fd): * socket_strerror to get a textual explanation of the * error. * @throws SocketsException - * + * */ function socket_create(int $domain, int $type, int $protocol) { error_clear_last(); $result = \socket_create($domain, $type, $protocol); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -179,18 +179,18 @@ function socket_create(int $domain, int $type, int $protocol) /** - * - * - * @param resource $socket + * + * + * @param resource $socket * @return resource Return resource . * @throws SocketsException - * + * */ function socket_export_stream($socket) { error_clear_last(); $result = \socket_export_stream($socket); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -201,7 +201,7 @@ function socket_export_stream($socket) * The socket_get_option function retrieves the value for * the option specified by the optname parameter for the * specified socket. - * + * * @param resource $socket A valid socket resource created with socket_create * or socket_accept. * @param int $level The level parameter specifies the protocol @@ -211,33 +211,33 @@ function socket_export_stream($socket) * TCP, can be used by * specifying the protocol number of that level. Protocol numbers can be * found by using the getprotobyname function. - * @param int $optname Reports whether the socket lingers on - * socket_close if data is present. By default, + * @param int $optname Reports whether the socket lingers on + * socket_close if data is present. By default, * when the socket is closed, it attempts to send all unsent data. - * In the case of a connection-oriented socket, + * In the case of a connection-oriented socket, * socket_close will wait for its peer to * acknowledge the data. - * - * If l_onoff is non-zero and - * l_linger is zero, all the - * unsent data will be discarded and RST (reset) is sent to the + * + * If l_onoff is non-zero and + * l_linger is zero, all the + * unsent data will be discarded and RST (reset) is sent to the * peer in the case of a connection-oriented socket. - * - * On the other hand, if l_onoff is + * + * On the other hand, if l_onoff is * non-zero and l_linger is non-zero, - * socket_close will block until all the data + * socket_close will block until all the data * is sent or the time specified in l_linger - * elapses. If the socket is non-blocking, + * elapses. If the socket is non-blocking, * socket_close will fail and return an error. * @return mixed Returns the value of the given option, s. * @throws SocketsException - * + * */ function socket_get_option($socket, int $level, int $optname) { error_clear_last(); $result = \socket_get_option($socket, $level, $optname); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -249,11 +249,11 @@ function socket_get_option($socket, int $level, int $optname) * using socket_create and bound to a name with * socket_bind, it may be told to listen for incoming * connections on socket. - * + * * socket_listen is applicable only to sockets of * type SOCK_STREAM or * SOCK_SEQPACKET. - * + * * @param resource $socket A valid socket resource created with socket_create * or socket_addrinfo_bind * @param int $backlog A maximum of backlog incoming connections will be @@ -261,7 +261,7 @@ function socket_get_option($socket, int $level, int $optname) * full the client may receive an error with an indication of * ECONNREFUSED, or, if the underlying protocol supports * retransmission, the request may be ignored so that retries may succeed. - * + * * The maximum number passed to the backlog * parameter highly depends on the underlying platform. On Linux, it is * silently truncated to SOMAXCONN. On win32, if @@ -270,13 +270,13 @@ function socket_get_option($socket, int $level, int $optname) * reasonable value. There is no standard provision to * find out the actual backlog value on this platform. * @throws SocketsException - * + * */ function socket_listen($socket, int $backlog = 0): void { error_clear_last(); $result = \socket_listen($socket, $backlog); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } } @@ -287,7 +287,7 @@ function socket_listen($socket, int $backlog = 0): void * resource socket created by the * socket_create or * socket_accept functions. - * + * * @param resource $socket A valid socket resource created with socket_create * or socket_accept. * @param int $length The maximum number of bytes read is specified by the @@ -296,20 +296,20 @@ function socket_listen($socket, int $backlog = 0): void * or \0 to end reading (depending on the type * parameter, see below). * @param int $type Optional type parameter is a named constant: - * - * - * + * + * + * * PHP_BINARY_READ (Default) - use the system * recv() function. Safe for reading binary data. - * - * - * - * + * + * + * + * * PHP_NORMAL_READ - reading stops at * \n or \r. - * - * - * + * + * + * * @return string socket_read returns the data as a string on success, * (including if the remote host has closed the * connection). The error code can be retrieved with @@ -317,13 +317,13 @@ function socket_listen($socket, int $backlog = 0): void * socket_strerror to get a textual representation of * the error. * @throws SocketsException - * + * */ function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string { error_clear_last(); $result = \socket_read($socket, $length, $type); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -334,57 +334,57 @@ function socket_read($socket, int $length, int $type = PHP_BINARY_READ): string * The function socket_send sends * len bytes to the socket * socket from buf. - * + * * @param resource $socket A valid socket resource created with socket_create * or socket_accept. * @param string $buf A buffer containing the data that will be sent to the remote host. - * @param int $len The number of bytes that will be sent to the remote host from + * @param int $len The number of bytes that will be sent to the remote host from * buf. - * @param int $flags The value of flags can be any combination of + * @param int $flags The value of flags can be any combination of * the following flags, joined with the binary OR (|) * operator. - * + * * Possible values for flags - * - * - * + * + * + * * MSG_OOB - * + * * Send OOB (out-of-band) data. - * - * - * + * + * + * * MSG_EOR - * + * * Indicate a record mark. The sent data completes the record. - * - * - * + * + * + * * MSG_EOF - * + * * Close the sender side of the socket and include an appropriate * notification of this at the end of the sent data. The sent data * completes the transaction. - * - * - * + * + * + * * MSG_DONTROUTE - * + * * Bypass routing, use direct interface. - * - * - * - * - * + * + * + * + * + * * @return int socket_send returns the number of bytes sent, . * @throws SocketsException - * + * */ function socket_send($socket, string $buf, int $len, int $flags): int { error_clear_last(); $result = \socket_send($socket, $buf, $len, $flags); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -392,20 +392,20 @@ function socket_send($socket, string $buf, int $len, int $flags): int /** - * - * - * @param resource $socket - * @param array $message - * @param int $flags + * + * + * @param resource $socket + * @param array $message + * @param int $flags * @return int Returns the number of bytes sent, . * @throws SocketsException - * + * */ function socket_sendmsg($socket, array $message, int $flags = 0): int { error_clear_last(); $result = \socket_sendmsg($socket, $message, $flags); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -417,60 +417,60 @@ function socket_sendmsg($socket, array $message, int $flags = 0): int * len bytes from buf * through the socket socket to the * port at the address addr. - * + * * @param resource $socket A valid socket resource created using socket_create. * @param string $buf The sent data will be taken from buffer buf. * @param int $len len bytes from buf will be * sent. - * @param int $flags The value of flags can be any combination of + * @param int $flags The value of flags can be any combination of * the following flags, joined with the binary OR (|) * operator. - * + * * Possible values for flags - * - * - * + * + * + * * MSG_OOB - * + * * Send OOB (out-of-band) data. - * - * - * + * + * + * * MSG_EOR - * + * * Indicate a record mark. The sent data completes the record. - * - * - * + * + * + * * MSG_EOF - * + * * Close the sender side of the socket and include an appropriate * notification of this at the end of the sent data. The sent data * completes the transaction. - * - * - * + * + * + * * MSG_DONTROUTE - * + * * Bypass routing, use direct interface. - * - * - * - * - * + * + * + * + * + * * @param string $addr IP address of the remote host. * @param int $port port is the remote port number at which the data * will be sent. * @return int socket_sendto returns the number of bytes sent to the * remote host, . * @throws SocketsException - * + * */ function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, int $port = 0): int { error_clear_last(); $result = \socket_sendto($socket, $buf, $len, $flags, $addr, $port); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; @@ -478,49 +478,49 @@ function socket_sendto($socket, string $buf, int $len, int $flags, string $addr, /** - * The socket_set_block function removes the - * O_NONBLOCK flag on the socket specified by the + * The socket_set_block function removes the + * O_NONBLOCK flag on the socket specified by the * socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on + * + * When an operation (e.g. receive, send, connect, accept, ...) is performed on * a blocking socket, the script will pause its execution until it receives * a signal or it can perform the operation. - * + * * @param resource $socket A valid socket resource created with socket_create * or socket_accept. * @throws SocketsException - * + * */ function socket_set_block($socket): void { error_clear_last(); $result = \socket_set_block($socket); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } } /** - * The socket_set_nonblock function sets the + * The socket_set_nonblock function sets the * O_NONBLOCK flag on the socket specified by * the socket parameter. - * - * When an operation (e.g. receive, send, connect, accept, ...) is performed on - * a non-blocking socket, the script will not pause its execution until it receives a + * + * When an operation (e.g. receive, send, connect, accept, ...) is performed on + * a non-blocking socket, the script will not pause its execution until it receives a * signal or it can perform the operation. Rather, if the operation would result * in a block, the called function will fail. - * + * * @param resource $socket A valid socket resource created with socket_create * or socket_accept. * @throws SocketsException - * + * */ function socket_set_nonblock($socket): void { error_clear_last(); $result = \socket_set_nonblock($socket); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } } @@ -530,29 +530,29 @@ function socket_set_nonblock($socket): void * The socket_set_option function sets the option * specified by the optname parameter, at the * specified protocol level, to the value pointed to - * by the optval parameter for the + * by the optval parameter for the * socket. - * + * * @param resource $socket A valid socket resource created with socket_create * or socket_accept. * @param int $level The level parameter specifies the protocol * level at which the option resides. For example, to retrieve options at * the socket level, a level parameter of * SOL_SOCKET would be used. Other levels, such as - * TCP, can be used by specifying the protocol number of that level. - * Protocol numbers can be found by using the + * TCP, can be used by specifying the protocol number of that level. + * Protocol numbers can be found by using the * getprotobyname function. * @param int $optname The available socket options are the same as those for the * socket_get_option function. * @param int|string|array $optval The option value. * @throws SocketsException - * + * */ function socket_set_option($socket, int $level, int $optname, $optval): void { error_clear_last(); $result = \socket_set_option($socket, $level, $optname, $optval); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } } @@ -562,42 +562,42 @@ function socket_set_option($socket, int $level, int $optname, $optval): void * The socket_shutdown function allows you to stop * incoming, outgoing or all data (the default) from being sent through the * socket - * + * * @param resource $socket A valid socket resource created with socket_create. * @param int $how The value of how can be one of the following: - * + * * possible values for how - * - * - * + * + * + * * 0 - * + * * Shutdown socket reading - * - * - * + * + * + * * 1 - * + * * Shutdown socket writing - * - * - * + * + * + * * 2 - * + * * Shutdown socket reading and writing - * - * - * - * - * + * + * + * + * + * * @throws SocketsException - * + * */ function socket_shutdown($socket, int $how = 2): void { error_clear_last(); $result = \socket_shutdown($socket, $how); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } } @@ -607,8 +607,8 @@ function socket_shutdown($socket, int $how = 2): void * The function socket_write writes to the * socket from the given * buffer. - * - * @param resource $socket + * + * @param resource $socket * @param string $buffer The buffer to be written. * @param int $length The optional parameter length can specify an * alternate length of bytes written to the socket. If this length is @@ -620,16 +620,14 @@ function socket_shutdown($socket, int $how = 2): void * socket_strerror to get a textual explanation of the * error. * @throws SocketsException - * + * */ function socket_write($socket, string $buffer, int $length = 0): int { error_clear_last(); $result = \socket_write($socket, $buffer, $length); - if ($result === FALSE) { + if ($result === false) { throw SocketsException::createFromPhpError(); } return $result; } - - diff --git a/generated/sodium.php b/generated/sodium.php index 608176b1..56358c0d 100644 --- a/generated/sodium.php +++ b/generated/sodium.php @@ -5,8 +5,8 @@ use Safe\Exceptions\SodiumException; /** - * - * + * + * * @param int $length integer; The length of the password hash to generate, in bytes. * @param string $password string; The password to generate a hash for. * @param string $salt string A salt to add to the password before hashing. The salt should be unpredictable, ideally generated from a good random mumber source such as random_bytes, and have a length of at least SODIUM_CRYPTO_PWHASH_SALTBYTES bytes. @@ -14,26 +14,24 @@ * @param int $memlimit The maximum amount of RAM that the function will use, in bytes. There are constants to help you choose an appropriate value, in order of size: SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE, and SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE. Typically these should be paired with the matching opslimit values. * @param int $alg integer A number indicating the hash algorithm to use. By default SODIUM_CRYPTO_PWHASH_ALG_DEFAULT (the currently recommended algorithm, which can change from one version of libsodium to another), or explicitly using SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13, representing the Argon2id algorithm version 1.3. * @return string Returns the hashed password, . - * + * * The used algorithm, opslimit, memlimit and salt are embedded within the hash, so * all information needed to verify the hash is included. This allows * the password_verify function to verify the hash without * needing separate storage for the salt or algorithm information. * @throws SodiumException - * + * */ function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $alg = null): string { error_clear_last(); if ($alg !== null) { $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit, $alg); - }else { + } else { $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit); } - if ($result === FALSE) { + if ($result === false) { throw SodiumException::createFromPhpError(); } return $result; } - - diff --git a/generated/spl.php b/generated/spl.php index f909f6b4..8e367045 100644 --- a/generated/spl.php +++ b/generated/spl.php @@ -7,19 +7,19 @@ /** * This function returns an array with the names of the interfaces that the * given class and its parents implement. - * + * * @param mixed $class An object (class instance) or a string (class or interface name). * @param bool $autoload Whether to allow this function to load the class automatically through * the __autoload magic method. * @return array An array on success, . * @throws SplException - * + * */ function class_implements($class, bool $autoload = true): array { error_clear_last(); $result = \class_implements($class, $autoload); - if ($result === FALSE) { + if ($result === false) { throw SplException::createFromPhpError(); } return $result; @@ -29,19 +29,19 @@ function class_implements($class, bool $autoload = true): array /** * This function returns an array with the name of the parent classes of * the given class. - * + * * @param mixed $class An object (class instance) or a string (class name). * @param bool $autoload Whether to allow this function to load the class automatically through * the __autoload magic method. * @return array An array on success, . * @throws SplException - * + * */ function class_parents($class, bool $autoload = true): array { error_clear_last(); $result = \class_parents($class, $autoload); - if ($result === FALSE) { + if ($result === false) { throw SplException::createFromPhpError(); } return $result; @@ -52,19 +52,19 @@ function class_parents($class, bool $autoload = true): array * This function returns an array with the names of the traits that the * given class uses. This does however not include * any traits used by a parent class. - * + * * @param mixed $class An object (class instance) or a string (class name). * @param bool $autoload Whether to allow this function to load the class automatically through * the __autoload magic method. * @return array An array on success, . * @throws SplException - * + * */ function class_uses($class, bool $autoload = true): array { error_clear_last(); $result = \class_uses($class, $autoload); - if ($result === FALSE) { + if ($result === false) { throw SplException::createFromPhpError(); } return $result; @@ -75,21 +75,19 @@ function class_uses($class, bool $autoload = true): array * Removes a function from the autoload queue. If the queue * is activated and empty after removing the given function then it will * be deactivated. - * + * * When this function results in the queue being deactivated, any * __autoload function that previously existed will not be reactivated. - * + * * @param mixed $autoload_function The autoload function being unregistered. * @throws SplException - * + * */ function spl_autoload_unregister($autoload_function): void { error_clear_last(); $result = \spl_autoload_unregister($autoload_function); - if ($result === FALSE) { + if ($result === false) { throw SplException::createFromPhpError(); } } - - diff --git a/generated/sqlsrv.php b/generated/sqlsrv.php index 89c36698..9848bf9b 100644 --- a/generated/sqlsrv.php +++ b/generated/sqlsrv.php @@ -5,46 +5,46 @@ use Safe\Exceptions\SqlsrvException; /** - * The transaction begun by sqlsrv_begin_transaction includes - * all statements that were executed after the call to - * sqlsrv_begin_transaction and before calls to - * sqlsrv_rollback or sqlsrv_commit. - * Explicit transactions should be started and committed or rolled back using - * these functions instead of executing SQL statements that begin and committ/roll - * back transactions. For more information, see + * The transaction begun by sqlsrv_begin_transaction includes + * all statements that were executed after the call to + * sqlsrv_begin_transaction and before calls to + * sqlsrv_rollback or sqlsrv_commit. + * Explicit transactions should be started and committed or rolled back using + * these functions instead of executing SQL statements that begin and committ/roll + * back transactions. For more information, see * SQLSRV Transactions. - * + * * @param resource $conn The connection resource returned by a call to sqlsrv_connect. * @throws SqlsrvException - * + * */ function sqlsrv_begin_transaction($conn): void { error_clear_last(); $result = \sqlsrv_begin_transaction($conn); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } /** - * Cancels a statement. Any results associated with the statement that have not - * been consumed are deleted. After sqlsrv_cancel has been - * called, the specified statement can be re-executed if it was created with - * sqlsrv_prepare. Calling sqlsrv_cancel - * is not necessary if all the results associated with the statement have been + * Cancels a statement. Any results associated with the statement that have not + * been consumed are deleted. After sqlsrv_cancel has been + * called, the specified statement can be re-executed if it was created with + * sqlsrv_prepare. Calling sqlsrv_cancel + * is not necessary if all the results associated with the statement have been * consumed. - * + * * @param resource $stmt The statement resource to be cancelled. * @throws SqlsrvException - * + * */ function sqlsrv_cancel($stmt): void { error_clear_last(); $result = \sqlsrv_cancel($stmt); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } @@ -52,40 +52,40 @@ function sqlsrv_cancel($stmt): void /** * Closes an open connection and releases resourses associated with the connection. - * + * * @param resource $conn The connection to be closed. * @throws SqlsrvException - * + * */ function sqlsrv_close($conn): void { error_clear_last(); $result = \sqlsrv_close($conn); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } /** - * Commits a transaction that was begun with sqlsrv_begin_transaction. - * The connection is returned to auto-commit mode after sqlsrv_commit - * is called. The transaction that is committed includes all statements that were - * executed after the call to sqlsrv_begin_transaction. - * Explicit transactions should be started and committed or rolled back using these - * functions instead of executing SQL statements that begin and committ/roll back - * transactions. For more information, see + * Commits a transaction that was begun with sqlsrv_begin_transaction. + * The connection is returned to auto-commit mode after sqlsrv_commit + * is called. The transaction that is committed includes all statements that were + * executed after the call to sqlsrv_begin_transaction. + * Explicit transactions should be started and committed or rolled back using these + * functions instead of executing SQL statements that begin and committ/roll back + * transactions. For more information, see * SQLSRV Transactions. - * + * * @param resource $conn The connection on which the transaction is to be committed. * @throws SqlsrvException - * + * */ function sqlsrv_commit($conn): void { error_clear_last(); $result = \sqlsrv_commit($conn); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } @@ -93,113 +93,113 @@ function sqlsrv_commit($conn): void /** * Changes the driver error handling and logging configurations. - * - * @param string $setting The name of the setting to set. The possible values are + * + * @param string $setting The name of the setting to set. The possible values are * "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity". * @param mixed $value The value of the specified setting. The following table shows possible values: - * + * * Error and Logging Setting Options - * - * - * + * + * + * * Setting * Options - * - * - * - * + * + * + * + * * WarningsReturnAsErrors * 1 (TRUE) or 0 (FALSE) - * - * + * + * * LogSubsystems - * SQLSRV_LOG_SYSTEM_ALL (-1) - * SQLSRV_LOG_SYSTEM_CONN (2) - * SQLSRV_LOG_SYSTEM_INIT (1) - * SQLSRV_LOG_SYSTEM_OFF (0) - * SQLSRV_LOG_SYSTEM_STMT (4) + * SQLSRV_LOG_SYSTEM_ALL (-1) + * SQLSRV_LOG_SYSTEM_CONN (2) + * SQLSRV_LOG_SYSTEM_INIT (1) + * SQLSRV_LOG_SYSTEM_OFF (0) + * SQLSRV_LOG_SYSTEM_STMT (4) * SQLSRV_LOG_SYSTEM_UTIL (8) - * - * + * + * * LogSeverity - * SQLSRV_LOG_SEVERITY_ALL (-1) - * SQLSRV_LOG_SEVERITY_ERROR (1) - * SQLSRV_LOG_SEVERITY_NOTICE (4) + * SQLSRV_LOG_SEVERITY_ALL (-1) + * SQLSRV_LOG_SEVERITY_ERROR (1) + * SQLSRV_LOG_SEVERITY_NOTICE (4) * SQLSRV_LOG_SEVERITY_WARNING (2) - * - * - * - * + * + * + * + * * @throws SqlsrvException - * + * */ function sqlsrv_configure(string $setting, $value): void { error_clear_last(); $result = \sqlsrv_configure($setting, $value); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } /** - * Executes a statement prepared with sqlsrv_prepare. This - * function is ideal for executing a prepared statement multiple times with + * Executes a statement prepared with sqlsrv_prepare. This + * function is ideal for executing a prepared statement multiple times with * different parameter values. - * + * * @param resource $stmt A statement resource returned by sqlsrv_prepare. * @throws SqlsrvException - * + * */ function sqlsrv_execute($stmt): void { error_clear_last(); $result = \sqlsrv_execute($stmt); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } /** - * Frees all resources for the specified statement. The statement cannot be used - * after sqlsrv_free_stmt has been called on it. If - * sqlsrv_free_stmt is called on an in-progress statement - * that alters server state, statement execution is terminated and the statement + * Frees all resources for the specified statement. The statement cannot be used + * after sqlsrv_free_stmt has been called on it. If + * sqlsrv_free_stmt is called on an in-progress statement + * that alters server state, statement execution is terminated and the statement * is rolled back. - * - * @param resource $stmt The statment for which resources are freed. - * Note that NULL is a valid parameter value. This allows the function to be + * + * @param resource $stmt The statment for which resources are freed. + * Note that NULL is a valid parameter value. This allows the function to be * called multiple times in a script. * @throws SqlsrvException - * + * */ function sqlsrv_free_stmt($stmt): void { error_clear_last(); $result = \sqlsrv_free_stmt($stmt); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } /** - * Makes the next result of the specified statement active. Results include result + * Makes the next result of the specified statement active. Results include result * sets, row counts, and output parameters. - * + * * @param resource $stmt The statment on which the next result is being called. - * @return mixed Returns TRUE if the next result was successfully retrieved, FALSE if an error + * @return mixed Returns TRUE if the next result was successfully retrieved, FALSE if an error * occurred, and NULL if there are no more results to retrieve. * @throws SqlsrvException - * + * */ function sqlsrv_next_result($stmt) { error_clear_last(); $result = \sqlsrv_next_result($stmt); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } return $result; @@ -207,27 +207,27 @@ function sqlsrv_next_result($stmt) /** - * Retrieves the number of rows in a result set. This function requires that the - * statment resource be created with a static or keyset cursor. For more information, - * see sqlsrv_query, sqlsrv_prepare, - * or Specifying a Cursor Type and Selecting Rows + * Retrieves the number of rows in a result set. This function requires that the + * statment resource be created with a static or keyset cursor. For more information, + * see sqlsrv_query, sqlsrv_prepare, + * or Specifying a Cursor Type and Selecting Rows * in the Microsoft SQLSRV documentation. - * - * @param resource $stmt The statement for which the row count is returned. The statment resource - * must be created with a static or keyset cursor. For more information, see - * sqlsrv_query, sqlsrv_prepare, or - * Specifying a Cursor Type and Selecting Rows + * + * @param resource $stmt The statement for which the row count is returned. The statment resource + * must be created with a static or keyset cursor. For more information, see + * sqlsrv_query, sqlsrv_prepare, or + * Specifying a Cursor Type and Selecting Rows * in the Microsoft SQLSRV documentation. - * @return mixed Returns the number of rows retrieved on success and FALSE if an error occurred. + * @return mixed Returns the number of rows retrieved on success and FALSE if an error occurred. * If a forward cursor (the default) or dynamic cursor is used, FALSE is returned. * @throws SqlsrvException - * + * */ function sqlsrv_num_rows($stmt) { error_clear_last(); $result = \sqlsrv_num_rows($stmt); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } return $result; @@ -235,25 +235,25 @@ function sqlsrv_num_rows($stmt) /** - * Prepares a query for execution. This function is ideal for preparing a query + * Prepares a query for execution. This function is ideal for preparing a query * that will be executed multiple times with different parameter values. - * + * * @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 * A PHP variable - * An array with this structure: + * An array with this structure: * array($value [, $direction [, $phpType [, $sqlType]]]) - * + * * The following table describes the elements in the array structure above: - * @param array $options An array specifing query property options. The supported keys are described + * @param array $options An array specifing query property options. The supported keys are described * in the following table: * @return mixed Returns a statement resource on success and FALSE if an error occurred. * @throws SqlsrvException - * + * */ function sqlsrv_prepare($conn, string $sql, array $params = null, array $options = null) { @@ -262,10 +262,10 @@ function sqlsrv_prepare($conn, string $sql, array $params = null, array $options $result = \sqlsrv_prepare($conn, $sql, $params, $options); } elseif ($params !== null) { $result = \sqlsrv_prepare($conn, $sql, $params); - }else { + } else { $result = \sqlsrv_prepare($conn, $sql); } - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } return $result; @@ -274,23 +274,23 @@ function sqlsrv_prepare($conn, string $sql, array $params = null, array $options /** * Prepares and executes a query. - * + * * @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 * A PHP variable - * An array with this structure: + * An array with this structure: * array($value [, $direction [, $phpType [, $sqlType]]]) - * + * * The following table describes the elements in the array structure above: - * @param array $options An array specifing query property options. The supported keys are described + * @param array $options An array specifing query property options. The supported keys are described * in the following table: * @return mixed Returns a statement resource on success and FALSE if an error occurred. * @throws SqlsrvException - * + * */ function sqlsrv_query($conn, string $sql, array $params = null, array $options = null) { @@ -299,10 +299,10 @@ function sqlsrv_query($conn, string $sql, array $params = null, array $options = $result = \sqlsrv_query($conn, $sql, $params, $options); } elseif ($params !== null) { $result = \sqlsrv_query($conn, $sql, $params); - }else { + } else { $result = \sqlsrv_query($conn, $sql); } - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } return $result; @@ -310,20 +310,18 @@ function sqlsrv_query($conn, string $sql, array $params = null, array $options = /** - * Rolls back a transaction that was begun with sqlsrv_begin_transaction + * Rolls back a transaction that was begun with sqlsrv_begin_transaction * and returns the connection to auto-commit mode. - * + * * @param resource $conn The connection resource returned by a call to sqlsrv_connect. * @throws SqlsrvException - * + * */ function sqlsrv_rollback($conn): void { error_clear_last(); $result = \sqlsrv_rollback($conn); - if ($result === FALSE) { + if ($result === false) { throw SqlsrvException::createFromPhpError(); } } - - diff --git a/generated/ssh2.php b/generated/ssh2.php index 9be3c710..fc435bb1 100644 --- a/generated/ssh2.php +++ b/generated/ssh2.php @@ -6,18 +6,18 @@ /** * Authenticate over SSH using the ssh agent - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. * @param string $username Remote user name. * @throws Ssh2Exception - * + * */ function ssh2_auth_agent($session, string $username): void { error_clear_last(); $result = \ssh2_auth_agent($session, $username); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -25,19 +25,19 @@ function ssh2_auth_agent($session, string $username): void /** * Authenticate using a public hostkey read from a file. - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. - * @param string $username - * @param string $hostname - * @param string $pubkeyfile - * @param string $privkeyfile + * @param string $username + * @param string $hostname + * @param string $pubkeyfile + * @param string $privkeyfile * @param string $passphrase If privkeyfile is encrypted (which it should * be), the passphrase must be provided. * @param string $local_username If local_username is omitted, then the value * for username will be used for it. * @throws Ssh2Exception - * + * */ function ssh2_auth_hostbased_file($session, string $username, string $hostname, string $pubkeyfile, string $privkeyfile, string $passphrase = null, string $local_username = null): void { @@ -46,10 +46,10 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase, $local_username); } elseif ($passphrase !== null) { $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase); - }else { + } else { $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile); } - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -58,19 +58,19 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, /** * Authenticate over SSH using a plain password. Since version 0.12 this function * also supports keyboard_interactive method. - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. * @param string $username Remote user name. * @param string $password Password for username * @throws Ssh2Exception - * + * */ function ssh2_auth_password($session, string $username, string $password): void { error_clear_last(); $result = \ssh2_auth_password($session, $username, $password); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -78,28 +78,28 @@ function ssh2_auth_password($session, string $username, string $password): void /** * Authenticate using a public key read from a file. - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. - * @param string $username + * @param string $username * @param string $pubkeyfile The public key file needs to be in OpenSSH's format. It should look something like: - * + * * ssh-rsa AAAAB3NzaC1yc2EAAA....NX6sqSnHA8= rsa-key-20121110 - * @param string $privkeyfile + * @param string $privkeyfile * @param string $passphrase If privkeyfile is encrypted (which it should * be), the passphrase must be provided. * @throws Ssh2Exception - * + * */ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, string $privkeyfile, string $passphrase = null): void { error_clear_last(); if ($passphrase !== null) { $result = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile, $passphrase); - }else { + } else { $result = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile); } - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -107,97 +107,97 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s /** * Establish a connection to a remote SSH server. - * + * * Once connected, the client should verify the server's hostkey using * ssh2_fingerprint, then authenticate using either * password or public key. - * - * @param string $host - * @param int $port + * + * @param string $host + * @param int $port * @param array $methods methods may be an associative array with up to four parameters * as described below. - * - * + * + * * methods may be an associative array * with any or all of the following parameters. - * - * - * + * + * + * * Index * Meaning * Supported Values* - * - * - * - * + * + * + * + * * kex - * + * * List of key exchange methods to advertise, comma separated * in order of preference. - * - * + * + * * diffie-hellman-group1-sha1, * diffie-hellman-group14-sha1, and * diffie-hellman-group-exchange-sha1 - * - * - * + * + * + * * hostkey - * + * * List of hostkey methods to advertise, comma separated * in order of preference. - * - * + * + * * ssh-rsa and * ssh-dss - * - * - * + * + * + * * client_to_server - * + * * Associative array containing crypt, compression, and * message authentication code (MAC) method preferences * for messages sent from client to server. - * - * - * - * + * + * + * + * * server_to_client - * + * * Associative array containing crypt, compression, and * message authentication code (MAC) method preferences * for messages sent from server to client. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * * - Supported Values are dependent on methods supported by underlying library. * See libssh2 documentation for additional * information. - * - * - * + * + * + * * client_to_server and * server_to_client may be an associative array * with any or all of the following parameters. - * - * - * - * + * + * + * + * * Index * Meaning * Supported Values* - * - * - * - * + * + * + * + * * crypt * List of crypto methods to advertise, comma separated * in order of preference. - * + * * rijndael-cbc@lysator.liu.se, * aes256-cbc, * aes192-cbc, @@ -207,102 +207,102 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s * cast128-cbc, * arcfour, and * none** - * - * - * + * + * + * * comp * List of compression methods to advertise, comma separated * in order of preference. - * + * * zlib and * none - * - * - * + * + * + * * mac * List of MAC methods to advertise, comma separated * in order of preference. - * + * * hmac-sha1, * hmac-sha1-96, * hmac-ripemd160, * hmac-ripemd160@openssh.com, and * none** - * - * - * - * - * - * - * + * + * + * + * + * + * + * * Crypt and MAC method "none" - * + * * For security reasons, none is disabled by the underlying * libssh2 library unless explicitly enabled * during build time by using the appropriate ./configure options. See documentation * for the underlying library for more information. - * - * - * + * + * + * * For security reasons, none is disabled by the underlying * 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 * or all of the following parameters. - * - * + * + * * Callbacks parameters - * - * - * - * + * + * + * + * * Index * Meaning * Prototype - * - * - * - * + * + * + * + * * ignore - * + * * Name of function to call when an * SSH2_MSG_IGNORE packet is received - * + * * void ignore_cb($message) - * - * + * + * * debug - * + * * Name of function to call when an * SSH2_MSG_DEBUG packet is received - * + * * void debug_cb($message, $language, $always_display) - * - * + * + * * macerror - * + * * Name of function to call when a packet is received but the * message authentication code failed. If the callback returns * TRUE, the mismatch will be ignored, otherwise the connection * will be terminated. - * + * * bool macerror_cb($packet) - * - * + * + * * disconnect - * + * * Name of function to call when an * SSH2_MSG_DISCONNECT packet is received - * + * * void disconnect_cb($reason, $message, $language) - * - * - * - * + * + * + * + * * @return resource Returns a resource on success, . * @throws Ssh2Exception - * + * */ function ssh2_connect(string $host, int $port = 22, array $methods = null, array $callbacks = null) { @@ -311,10 +311,10 @@ function ssh2_connect(string $host, int $port = 22, array $methods = null, array $result = \ssh2_connect($host, $port, $methods, $callbacks); } elseif ($methods !== null) { $result = \ssh2_connect($host, $port, $methods); - }else { + } else { $result = \ssh2_connect($host, $port); } - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } return $result; @@ -323,17 +323,17 @@ function ssh2_connect(string $host, int $port = 22, array $methods = null, array /** * Close a connection to a remote SSH server. - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. * @throws Ssh2Exception - * + * */ function ssh2_disconnect($session): void { error_clear_last(); $result = \ssh2_disconnect($session); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -341,11 +341,11 @@ function ssh2_disconnect($session): void /** * Execute a command at the remote end and allocate a channel for it. - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. - * @param string $command - * @param string $pty + * @param string $command + * @param string $pty * @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. @@ -355,7 +355,7 @@ function ssh2_disconnect($session): void * SSH2_TERM_UNIT_PIXELS. * @return resource Returns a stream on success . * @throws Ssh2Exception - * + * */ function ssh2_exec($session, string $command, string $pty = null, array $env = null, int $width = 80, int $height = 25, int $width_height_type = SSH2_TERM_UNIT_CHARS) { @@ -370,10 +370,10 @@ function ssh2_exec($session, string $command, string $pty = null, array $env = n $result = \ssh2_exec($session, $command, $pty, $env); } elseif ($pty !== null) { $result = \ssh2_exec($session, $command, $pty); - }else { + } else { $result = \ssh2_exec($session, $command); } - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } return $result; @@ -381,8 +381,8 @@ function ssh2_exec($session, string $command, string $pty = null, array $env = n /** - * - * + * + * * @param resource $pkey Publickey Subsystem resource created by ssh2_publickey_init. * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa * @param string $blob Publickey blob as raw binary data @@ -393,17 +393,17 @@ function ssh2_exec($session, string $command, string $pty = null, array $env = n * If the server is unable to support an attribute marked mandatory, * it will abort the add process. * @throws Ssh2Exception - * + * */ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwrite = false, array $attributes = null): void { error_clear_last(); if ($attributes !== null) { $result = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite, $attributes); - }else { + } else { $result = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite); } - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -411,24 +411,24 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri /** * Request the Publickey subsystem from an already connected SSH2 server. - * + * * The publickey subsystem allows an already connected and authenticated * client to manage the list of authorized public keys stored on the * target server in an implementation agnostic manner. * If the remote server does not support the publickey subsystem, * the ssh2_publickey_init function will return FALSE. - * - * @param resource $session + * + * @param resource $session * @return resource Returns an SSH2 Publickey Subsystem resource for use * with all other ssh2_publickey_*() methods . * @throws Ssh2Exception - * + * */ function ssh2_publickey_init($session) { error_clear_last(); $result = \ssh2_publickey_init($session); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } return $result; @@ -437,18 +437,18 @@ function ssh2_publickey_init($session) /** * Removes an authorized publickey. - * + * * @param resource $pkey Publickey Subsystem Resource * @param string $algoname Publickey algorithm (e.g.): ssh-dss, ssh-rsa * @param string $blob Publickey blob as raw binary data * @throws Ssh2Exception - * + * */ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void { error_clear_last(); $result = \ssh2_publickey_remove($pkey, $algoname, $blob); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -456,19 +456,19 @@ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void /** * Copy a file from the remote server to the local filesystem using the SCP protocol. - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. * @param string $remote_file Path to the remote file. * @param string $local_file Path to the local file. * @throws Ssh2Exception - * + * */ function ssh2_scp_recv($session, string $remote_file, string $local_file): void { error_clear_last(); $result = \ssh2_scp_recv($session, $remote_file, $local_file); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -476,7 +476,7 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void /** * Copy a file from the local filesystem to the remote server using the SCP protocol. - * + * * @param resource $session An SSH connection link identifier, obtained from a call to * ssh2_connect. * @param string $local_file Path to the local file. @@ -484,13 +484,13 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void * @param int $create_mode The file will be created with the mode specified by * create_mode. * @throws Ssh2Exception - * + * */ function ssh2_scp_send($session, string $local_file, string $remote_file, int $create_mode = 0644): void { error_clear_last(); $result = \ssh2_scp_send($session, $local_file, $remote_file, $create_mode); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -499,18 +499,18 @@ function ssh2_scp_send($session, string $local_file, string $remote_file, int $c /** * Attempts to change the mode of the specified file to that given in * mode. - * + * * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. * @param string $filename Path to the file. * @param int $mode Permissions on the file. See the chmod for more details on this parameter. * @throws Ssh2Exception - * + * */ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void { error_clear_last(); $result = \ssh2_sftp_chmod($sftp, $filename, $mode); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -519,23 +519,23 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void /** * Creates a directory on the remote file server with permissions set to * mode. - * + * * This function is similar to using mkdir with the * ssh2.sftp:// wrapper. - * + * * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. * @param string $dirname Path of the new directory. * @param int $mode Permissions on the new directory. * @param bool $recursive If recursive is TRUE any parent directories * required for dirname will be automatically created as well. * @throws Ssh2Exception - * + * */ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursive = false): void { error_clear_last(); $result = \ssh2_sftp_mkdir($sftp, $dirname, $mode, $recursive); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -543,18 +543,18 @@ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursi /** * Renames a file on the remote filesystem. - * + * * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. * @param string $from The current file that is being renamed. * @param string $to The new file name that replaces from. * @throws Ssh2Exception - * + * */ function ssh2_sftp_rename($sftp, string $from, string $to): void { error_clear_last(); $result = \ssh2_sftp_rename($sftp, $from, $to); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -562,20 +562,20 @@ function ssh2_sftp_rename($sftp, string $from, string $to): void /** * Removes a directory from the remote file server. - * + * * This function is similar to using rmdir with the * ssh2.sftp:// wrapper. - * + * * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $dirname + * @param string $dirname * @throws Ssh2Exception - * + * */ function ssh2_sftp_rmdir($sftp, string $dirname): void { error_clear_last(); $result = \ssh2_sftp_rmdir($sftp, $dirname); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -584,18 +584,18 @@ function ssh2_sftp_rmdir($sftp, string $dirname): void /** * Creates a symbolic link named link on the remote * filesystem pointing to target. - * + * * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. * @param string $target Target of the symbolic link. - * @param string $link + * @param string $link * @throws Ssh2Exception - * + * */ function ssh2_sftp_symlink($sftp, string $target, string $link): void { error_clear_last(); $result = \ssh2_sftp_symlink($sftp, $target, $link); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -603,19 +603,17 @@ function ssh2_sftp_symlink($sftp, string $target, string $link): void /** * Deletes a file on the remote filesystem. - * + * * @param resource $sftp An SSH2 SFTP resource opened by ssh2_sftp. - * @param string $filename + * @param string $filename * @throws Ssh2Exception - * + * */ function ssh2_sftp_unlink($sftp, string $filename): void { error_clear_last(); $result = \ssh2_sftp_unlink($sftp, $filename); - if ($result === FALSE) { + if ($result === false) { throw Ssh2Exception::createFromPhpError(); } } - - diff --git a/generated/stream.php b/generated/stream.php index 2aa47dc3..9c71782d 100644 --- a/generated/stream.php +++ b/generated/stream.php @@ -6,20 +6,20 @@ /** * Sets parameters on the specified context. - * + * * @param resource $stream_or_context The stream or context to apply the parameters too. * @param array $params An array of parameters to set. - * + * * params should be an associative array of the structure: * $params['paramname'] = "paramvalue";. * @throws StreamException - * + * */ function stream_context_set_params($stream_or_context, array $params): void { error_clear_last(); $result = \stream_context_set_params($stream_or_context, $params); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -32,20 +32,20 @@ function stream_context_set_params($stream_or_context, array $params): void * source to dest. If * maxlength is not specified, all remaining content in * source will be copied. - * + * * @param resource $source The source stream * @param resource $dest The destination stream * @param int $maxlength Maximum bytes to copy * @param int $offset The offset where to start to copy data * @return int Returns the total count of bytes copied, . * @throws StreamException - * + * */ function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset = 0): int { error_clear_last(); $result = \stream_copy_to_stream($source, $dest, $maxlength, $offset); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } return $result; @@ -55,7 +55,7 @@ function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset /** * Adds filtername to the list of filters * attached to stream. - * + * * @param resource $stream The target stream. * @param string $filtername The filter name. * @param int $read_write By default, stream_filter_append will @@ -69,7 +69,7 @@ function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset * STREAM_FILTER_WRITE, and/or * STREAM_FILTER_ALL can also be passed to the * read_write parameter to override this behavior. - * @param mixed $params This filter will be added with the specified + * @param mixed $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 @@ -77,11 +77,11 @@ function stream_copy_to_stream($source, $dest, int $maxlength = -1, int $offset * @return resource Returns a resource on success . The resource can be * used to refer to this filter instance during a call to * stream_filter_remove. - * + * * FALSE is returned if stream is not a resource or * if filtername cannot be located. * @throws StreamException - * + * */ function stream_filter_append($stream, string $filtername, int $read_write = null, $params = null) { @@ -90,10 +90,10 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul $result = \stream_filter_append($stream, $filtername, $read_write, $params); } elseif ($read_write !== null) { $result = \stream_filter_append($stream, $filtername, $read_write); - }else { + } else { $result = \stream_filter_append($stream, $filtername); } - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } return $result; @@ -103,7 +103,7 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul /** * Adds filtername to the list of filters * attached to stream. - * + * * @param resource $stream The target stream. * @param string $filtername The filter name. * @param int $read_write By default, stream_filter_prepend will @@ -126,11 +126,11 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul * @return resource Returns a resource on success . The resource can be * used to refer to this filter instance during a call to * stream_filter_remove. - * + * * FALSE is returned if stream is not a resource or * if filtername cannot be located. * @throws StreamException - * + * */ function stream_filter_prepend($stream, string $filtername, int $read_write = null, $params = null) { @@ -139,10 +139,10 @@ function stream_filter_prepend($stream, string $filtername, int $read_write = nu $result = \stream_filter_prepend($stream, $filtername, $read_write, $params); } elseif ($read_write !== null) { $result = \stream_filter_prepend($stream, $filtername, $read_write); - }else { + } else { $result = \stream_filter_prepend($stream, $filtername); } - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } return $result; @@ -154,7 +154,7 @@ function stream_filter_prepend($stream, string $filtername, int $read_write = nu * your own filter on any registered stream used with all the other * filesystem functions (such as fopen, * fread etc.). - * + * * @param string $filtername The filter name to be registered. * @param string $classname To implement a filter, you need to define a class as an extension of * php_user_filter with a number of member @@ -165,13 +165,13 @@ function stream_filter_prepend($stream, string $filtername, int $read_write = nu * exactly as described in php_user_filter - doing * otherwise will lead to undefined behaviour. * @throws StreamException - * + * */ function stream_filter_register(string $filtername, string $classname): void { error_clear_last(); $result = \stream_filter_register($filtername, $classname); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -183,16 +183,16 @@ function stream_filter_register(string $filtername, string $classname): void * stream_filter_append. Any data remaining in the * filter's internal buffer will be flushed through to the next filter before * removing it. - * + * * @param resource $stream_filter The stream filter to be removed. * @throws StreamException - * + * */ function stream_filter_remove($stream_filter): void { error_clear_last(); $result = \stream_filter_remove($stream_filter); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -204,7 +204,7 @@ function stream_filter_remove($stream_filter): void * stream resource and returns the remaining contents in a string, up to * maxlength bytes and starting at the specified * offset. - * + * * @param resource $handle A stream resource (e.g. returned from fopen) * @param int $maxlength The maximum bytes to read. Defaults to -1 (read all the remaining * buffer). @@ -212,13 +212,13 @@ function stream_filter_remove($stream_filter): void * no seeking will occur and reading will start from the current position. * @return string Returns a string . * @throws StreamException - * + * */ function stream_get_contents($handle, int $maxlength = -1, int $offset = -1): string { error_clear_last(); $result = \stream_get_contents($handle, $maxlength, $offset); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } return $result; @@ -227,16 +227,16 @@ function stream_get_contents($handle, int $maxlength = -1, int $offset = -1): st /** * Checks if a stream, or a URL, is a local one or not. - * + * * @param mixed $stream_or_url The stream resource or URL to check. * @throws StreamException - * + * */ function stream_is_local($stream_or_url): void { error_clear_last(); $result = \stream_is_local($stream_or_url); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -245,16 +245,16 @@ function stream_is_local($stream_or_url): void /** * Determines if stream stream refers to a valid terminal type device. * This is a more portable version of posix_isatty, since it works on Windows systems too. - * - * @param resource $stream + * + * @param resource $stream * @throws StreamException - * + * */ function stream_isatty($stream): void { error_clear_last(); $result = \stream_isatty($stream); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -262,17 +262,17 @@ function stream_isatty($stream): void /** * Resolve filename against the include path according to the same rules as fopen/include. - * + * * @param string $filename The filename to resolve. * @return string Returns a string containing the resolved absolute filename, . * @throws StreamException - * + * */ function stream_resolve_include_path(string $filename): string { error_clear_last(); $result = \stream_resolve_include_path($filename); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } return $result; @@ -281,10 +281,10 @@ function stream_resolve_include_path(string $filename): string /** * Sets blocking or non-blocking mode on a stream. - * + * * This function works for any stream that supports non-blocking mode * (currently, regular files and socket streams). - * + * * @param resource $stream The stream. * @param bool $mode If mode is FALSE, the given stream * will be switched to non-blocking mode, and if TRUE, it @@ -295,13 +295,13 @@ function stream_resolve_include_path(string $filename): string * while in blocking mode it will wait for data to become available * on the stream. * @throws StreamException - * + * */ function stream_set_blocking($stream, bool $mode): void { error_clear_last(); $result = \stream_set_blocking($stream, $mode); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -311,22 +311,22 @@ function stream_set_blocking($stream, bool $mode): void * Sets the timeout value on stream, * expressed in the sum of seconds and * microseconds. - * + * * When the stream times out, the 'timed_out' key of the array returned by * stream_get_meta_data is set to TRUE, although no * error/warning is generated. - * + * * @param resource $stream The target stream. * @param int $seconds The seconds part of the timeout to be set. * @param int $microseconds The microseconds part of the timeout to be set. * @throws StreamException - * + * */ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void { error_clear_last(); $result = \stream_set_timeout($stream, $seconds, $microseconds); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -335,28 +335,28 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void /** * Accept a connection on a socket previously created by * stream_socket_server. - * + * * @param resource $server_socket The server socket to accept a connection from. * @param float $timeout Override the default socket accept timeout. Time should be given in * seconds. * @param string $peername Will be set to the name (address) of the client which connected, if * included and available from the selected transport. - * + * * Can also be determined later using * stream_socket_get_name. * @return resource Returns a stream to the accepted socket connection . * @throws StreamException - * + * */ function stream_socket_accept($server_socket, float $timeout = null, string &$peername = null) { error_clear_last(); if ($peername !== null) { $result = \stream_socket_accept($server_socket, $timeout, $peername); - }else { + } else { $result = \stream_socket_accept($server_socket, $timeout); } - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } return $result; @@ -366,20 +366,20 @@ function stream_socket_accept($server_socket, float $timeout = null, string &$pe /** * Creates a stream or datagram socket on the specified * local_socket. - * + * * This function only creates a socket, to begin accepting connections * use stream_socket_accept. - * + * * @param string $local_socket The type of socket created is determined by the transport specified * using standard URL formatting: transport://target. - * + * * For Internet Domain sockets (AF_INET) such as TCP and UDP, the - * target portion of the + * target portion of the * remote_socket parameter should consist of a * hostname or IP address followed by a colon and a port number. For * Unix domain sockets, the target portion should * point to the socket file on the filesystem. - * + * * Depending on the environment, Unix domain sockets may not be available. * A list of available transports can be retrieved using * stream_get_transports. See @@ -388,22 +388,22 @@ function stream_socket_accept($server_socket, float $timeout = null, string &$pe * arguments are present they will be set to indicate the actual system * level error that occurred in the system-level socket(), * bind(), and listen() calls. If - * the value returned in errno is + * the value returned in errno is * 0 and the function returned FALSE, it is an * indication that the error occurred before the bind() - * call. This is most likely due to a problem initializing the socket. + * call. This is most likely due to a problem initializing the socket. * Note that the errno and * errstr arguments will always be passed by reference. * @param string $errstr See errno description. * @param int $flags A bitmask field which may be set to any combination of socket creation * flags. - * + * * For UDP sockets, you must use STREAM_SERVER_BIND as * the flags parameter. - * @param resource $context + * @param resource $context * @return resource Returns the created stream, . * @throws StreamException - * + * */ function stream_socket_server(string $local_socket, int &$errno = null, string &$errstr = null, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN, $context = null) { @@ -416,10 +416,10 @@ function stream_socket_server(string $local_socket, int &$errno = null, string & $result = \stream_socket_server($local_socket, $errno, $errstr); } elseif ($errno !== null) { $result = \stream_socket_server($local_socket, $errno); - }else { + } else { $result = \stream_socket_server($local_socket); } - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } return $result; @@ -428,7 +428,7 @@ function stream_socket_server(string $local_socket, int &$errno = null, string & /** * Shutdowns (partially or not) a full-duplex connection. - * + * * @param resource $stream An open stream (opened with stream_socket_client, * for example) * @param int $how One of the following constants: STREAM_SHUT_RD @@ -437,31 +437,31 @@ function stream_socket_server(string $local_socket, int &$errno = null, string & * STREAM_SHUT_RDWR (disable further receptions and * transmissions). * @throws StreamException - * + * */ function stream_socket_shutdown($stream, int $how): void { error_clear_last(); $result = \stream_socket_shutdown($stream, $how); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } /** - * Tells whether the stream supports locking through + * Tells whether the stream supports locking through * flock. - * + * * @param resource $stream The stream to check. * @throws StreamException - * + * */ function stream_supports_lock($stream): void { error_clear_last(); $result = \stream_supports_lock($stream); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -471,20 +471,20 @@ function stream_supports_lock($stream): void * Allows you to implement your own protocol handlers and streams for use * with all the other filesystem functions (such as fopen, * fread etc.). - * + * * @param string $protocol The wrapper name to be registered. * @param string $classname The classname which implements the protocol. * @param int $flags Should be set to STREAM_IS_URL if * protocol is a URL protocol. Default is 0, local * stream. * @throws StreamException - * + * */ function stream_wrapper_register(string $protocol, string $classname, int $flags = 0): void { error_clear_last(); $result = \stream_wrapper_register($protocol, $classname, $flags); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -493,16 +493,16 @@ function stream_wrapper_register(string $protocol, string $classname, int $flags /** * Restores a built-in wrapper previously unregistered with * stream_wrapper_unregister. - * - * @param string $protocol + * + * @param string $protocol * @throws StreamException - * + * */ function stream_wrapper_restore(string $protocol): void { error_clear_last(); $result = \stream_wrapper_restore($protocol); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } @@ -513,18 +513,16 @@ function stream_wrapper_restore(string $protocol): void * has been disabled you may override it with a user-defined wrapper using * stream_wrapper_register or reenable it later on with * stream_wrapper_restore. - * - * @param string $protocol + * + * @param string $protocol * @throws StreamException - * + * */ function stream_wrapper_unregister(string $protocol): void { error_clear_last(); $result = \stream_wrapper_unregister($protocol); - if ($result === FALSE) { + if ($result === false) { throw StreamException::createFromPhpError(); } } - - diff --git a/generated/strings.php b/generated/strings.php index 50e68a9e..f6c11ecc 100644 --- a/generated/strings.php +++ b/generated/strings.php @@ -6,17 +6,17 @@ /** * convert_uudecode decodes a uuencoded string. - * + * * @param string $data The uuencoded data. * @return string Returns the decoded data as a string . * @throws StringsException - * + * */ function convert_uudecode(string $data): string { error_clear_last(); $result = \convert_uudecode($data); - if ($result === FALSE) { + if ($result === false) { throw StringsException::createFromPhpError(); } return $result; @@ -26,21 +26,21 @@ function convert_uudecode(string $data): string /** * convert_uuencode encodes a string using the uuencode * algorithm. - * + * * Uuencode translates all strings (including binary data) into printable * characters, making them safe for network transmissions. Uuencoded data is * about 35% larger than the original. - * + * * @param string $data The data to be encoded. * @return string Returns the uuencoded data . * @throws StringsException - * + * */ function convert_uuencode(string $data): string { error_clear_last(); $result = \convert_uuencode($data); - if ($result === FALSE) { + if ($result === false) { throw StringsException::createFromPhpError(); } return $result; @@ -49,17 +49,17 @@ function convert_uuencode(string $data): string /** * Decodes a hexadecimally encoded binary string. - * + * * @param string $data Hexadecimal representation of data. * @return string Returns the binary representation of the given data . * @throws StringsException - * + * */ function hex2bin(string $data): string { error_clear_last(); $result = \hex2bin($data); - if ($result === FALSE) { + if ($result === false) { throw StringsException::createFromPhpError(); } return $result; @@ -68,30 +68,30 @@ function hex2bin(string $data): string /** * Calculates the metaphone key of str. - * + * * Similar to soundex metaphone creates the same key for * similar sounding words. It's more accurate than * soundex as it knows the basic rules of English * pronunciation. The metaphone generated keys are of variable length. - * + * * Metaphone was developed by Lawrence Philips * <lphilips at verity dot com>. It is described in ["Practical * Algorithms for Programmers", Binstock & Rex, Addison Wesley, * 1995]. - * + * * @param string $str The input string. - * @param int $phonemes This parameter restricts the returned metaphone key to + * @param int $phonemes This parameter restricts the returned metaphone key to * phonemes characters in length. * The default value of 0 means no restriction. * @return string Returns the metaphone key as a string, . * @throws StringsException - * + * */ function metaphone(string $str, int $phonemes = 0): string { error_clear_last(); $result = \metaphone($str, $phonemes); - if ($result === FALSE) { + if ($result === false) { throw StringsException::createFromPhpError(); } return $result; @@ -101,28 +101,28 @@ function metaphone(string $str, int $phonemes = 0): string /** * Returns a string produced according to the formatting string * format. - * + * * @param string $format The format string is composed of zero or more directives: * ordinary characters (excluding %) that are * copied directly to the result and conversion * specifications, each of which results in fetching its * own parameter. This applies to both sprintf * and printf. - * + * * Each conversion specification consists of a percent sign * (%), followed by one or more of these * elements, in order: - * - * - * + * + * + * * An optional sign specifier that forces a sign * (- or +) to be used on a number. By default, only the - sign is used * on a number if it's negative. This specifier forces positive numbers * to have the + sign attached as well. - * - * - * - * + * + * + * + * * An optional padding specifier that says * what character will be used for padding the results to the * right string size. This may be a space character or a @@ -130,25 +130,25 @@ function metaphone(string $str, int $phonemes = 0): string * with spaces. An alternate padding character can be specified * by prefixing it with a single quote ('). * See the examples below. - * - * - * - * + * + * + * + * * An optional alignment specifier that says * if the result should be left-justified or right-justified. * The default is right-justified; a - * character here will make it left-justified. - * - * - * - * + * + * + * + * * An optional number, a width specifier * that says how many characters (minimum) this conversion should * result in. - * - * - * - * + * + * + * + * * An optional precision specifier in the form * of a period (.) followed by an optional decimal digit string * that says how many decimal digits should be displayed for @@ -157,296 +157,296 @@ function metaphone(string $str, int $phonemes = 0): string * the string. Additionally, the character to use when padding a * number may optionally be specified between the period and the * digit. - * - * - * - * + * + * + * + * * A type specifier that says what type the * argument data should be treated as. Possible types: - * - * + * + * * % - a literal percent character. No * argument is required. - * - * + * + * * b - the argument is treated as an * integer and presented as a binary number. - * - * + * + * * c - the argument is treated as an * integer and presented as the character with that ASCII * value. - * - * + * + * * d - the argument is treated as an * integer and presented as a (signed) decimal number. - * - * + * + * * e - the argument is treated as scientific * notation (e.g. 1.2e+2). * The precision specifier stands for the number of digits after the * decimal point since PHP 5.2.1. In earlier versions, it was taken as * number of significant digits (one less). - * - * + * + * * E - like %e but uses * uppercase letter (e.g. 1.2E+2). - * - * + * + * * f - the argument is treated as a * float and presented as a floating-point number (locale aware). - * - * + * + * * F - the argument is treated as a * float and presented as a floating-point number (non-locale aware). * Available since PHP 5.0.3. - * - * + * + * * g - shorter of %e and * %f. - * - * + * + * * G - shorter of %E and * %f. - * - * + * + * * o - the argument is treated as an * integer and presented as an octal number. - * - * + * + * * s - the argument is treated as and * presented as a string. - * - * + * + * * u - the argument is treated as an * integer and presented as an unsigned decimal number. - * - * + * + * * x - the argument is treated as an integer * and presented as a hexadecimal number (with lowercase * letters). - * - * + * + * * X - the argument is treated as an integer * and presented as a hexadecimal number (with uppercase * letters). - * - * - * - * - * - * + * + * + * + * + * + * * A type specifier that says what type the * argument data should be treated as. Possible types: - * - * + * + * * % - a literal percent character. No * argument is required. - * - * + * + * * b - the argument is treated as an * integer and presented as a binary number. - * - * + * + * * c - the argument is treated as an * integer and presented as the character with that ASCII * value. - * - * + * + * * d - the argument is treated as an * integer and presented as a (signed) decimal number. - * - * + * + * * e - the argument is treated as scientific * notation (e.g. 1.2e+2). * The precision specifier stands for the number of digits after the * decimal point since PHP 5.2.1. In earlier versions, it was taken as * number of significant digits (one less). - * - * + * + * * E - like %e but uses * uppercase letter (e.g. 1.2E+2). - * - * + * + * * f - the argument is treated as a * float and presented as a floating-point number (locale aware). - * - * + * + * * F - the argument is treated as a * float and presented as a floating-point number (non-locale aware). * Available since PHP 5.0.3. - * - * + * + * * g - shorter of %e and * %f. - * - * + * + * * G - shorter of %E and * %f. - * - * + * + * * o - the argument is treated as an * integer and presented as an octal number. - * - * + * + * * s - the argument is treated as and * presented as a string. - * - * + * + * * u - the argument is treated as an * integer and presented as an unsigned decimal number. - * - * + * + * * x - the argument is treated as an integer * and presented as a hexadecimal number (with lowercase * letters). - * - * + * + * * X - the argument is treated as an integer * and presented as a hexadecimal number (with uppercase * letters). - * - * - * + * + * + * * Variables will be co-erced to a suitable type for the specifier: - * + * * Type Handling - * - * - * + * + * + * * Type * Specifiers - * - * - * - * + * + * + * + * * string * s - * - * + * + * * integer - * - * d, - * u, + * + * d, + * u, * c, * o, * x, * X, * b - * - * - * + * + * + * * double - * + * * g, * G, * e, * E, * f, * F - * - * - * - * - * - * + * + * + * + * + * + * * Attempting to use a combination of the string and width specifiers with character sets that require more than one byte per character may result in unexpected results - * + * * The format string supports argument numbering/swapping. Here is an * example: - * + * * Argument swapping - * - * + * + * * ]]> - * - * + * + * * This will output "There are 5 monkeys in the tree". But * imagine we are creating a format string in a separate file, * commonly because we would like to internationalize it and we * rewrite it as: - * + * * Argument swapping - * - * + * + * * ]]> - * - * + * + * * We now have a problem. The order of the placeholders in the * format string does not match the order of the arguments in the * code. We would like to leave the code as is and simply indicate * in the format string which arguments the placeholders refer to. * We would write the format string like this instead: - * + * * Argument swapping - * - * + * + * * ]]> - * - * + * + * * An added benefit here is that you can repeat the placeholders without * adding more arguments in the code. For example: - * + * * Argument swapping - * - * + * + * * ]]> - * - * + * + * * When using argument swapping, the n$ * position specifier must come immediately * after the percent sign (%), before any other * specifiers, as shown in the example below. - * + * * Specifying padding character - * - * + * + * * ]]> - * + * * The above example will output: - * - * - * - * - * + * + * + * + * + * * Position specifier with other specifiers - * - * + * + * * ]]> - * + * * The above example will output: - * - * - * - * - * + * + * + * + * + * * The above example will output: - * + * * The above example will output: - * + * * Attempting to use a position specifier greater than * PHP_INT_MAX will result in * sprintf generating warnings. - * + * * The c type specifier ignores padding and width - * @param string|int|float $args - * @param mixed $params + * @param string|int|float $args + * @param mixed $params * @return string Returns a string produced according to the formatting string * format, . * @throws StringsException - * + * */ -function sprintf(string $format, $args = null, ...$params): string +function sprintf(string $format, $args = null, ...$params): string { error_clear_last(); if ($params !== null) { $result = \sprintf($format, $args, $params); } elseif ($args !== null) { $result = \sprintf($format, $args); - }else { + } else { $result = \sprintf($format); } - if ($result === FALSE) { + if ($result === false) { throw StringsException::createFromPhpError(); } return $result; @@ -456,7 +456,7 @@ function sprintf(string $format, $args = null, ...$params): string /** * Returns the portion of string specified by the * start and length parameters. - * + * * @param string $string The input string. Must be one character or longer. * @param int $start If start is non-negative, the returned string * will start at the start'th position in @@ -465,56 +465,54 @@ function sprintf(string $format, $args = null, ...$params): string * position 0 is 'a', the * character at position 2 is * 'c', and so forth. - * + * * If start is negative, the returned string * will start at the start'th character * from the end of string. - * + * * If string is less than * start characters long, FALSE will be returned. - * - * + * + * * Using a negative start - * - * + * + * * ]]> - * - * + * + * * @param int $length If length is given and is positive, the string * returned will contain at most length characters * beginning from start (depending on the length of * string). - * + * * If length is given and is negative, then that many * characters will be omitted from the end of string * (after the start position has been calculated when a * start is negative). If * start denotes the position of this truncation or * beyond, FALSE will be returned. - * + * * If length is given and is 0, * FALSE or NULL, an empty string will be returned. - * + * * If length is omitted, the substring starting from * start until the end of the string will be * returned. * @return string Returns the extracted part of string; , or * an empty string. * @throws StringsException - * + * */ function substr(string $string, int $start, int $length = null): string { error_clear_last(); if ($length !== null) { $result = \substr($string, $start, $length); - }else { + } else { $result = \substr($string, $start); } - if ($result === FALSE) { + if ($result === false) { throw StringsException::createFromPhpError(); } return $result; } - - diff --git a/generated/swoole.php b/generated/swoole.php index 32b7d0f7..f9945b67 100644 --- a/generated/swoole.php +++ b/generated/swoole.php @@ -5,14 +5,14 @@ use Safe\Exceptions\SwooleException; /** - * - * + * + * * @param string $filename The filename being written. * @param string $content The content writing to the file. * @param int $offset The offset. - * @param callable $callback + * @param callable $callback * @throws SwooleException - * + * */ function swoole_async_write(string $filename, string $content, integer $offset = null, callable $callback = null): void { @@ -21,24 +21,24 @@ function swoole_async_write(string $filename, string $content, integer $offset = $result = \swoole_async_write($filename, $content, $offset, $callback); } elseif ($offset !== null) { $result = \swoole_async_write($filename, $content, $offset); - }else { + } else { $result = \swoole_async_write($filename, $content); } - if ($result === FALSE) { + if ($result === false) { throw SwooleException::createFromPhpError(); } } /** - * - * + * + * * @param string $filename The filename being written. * @param string $content The content writing to the file. - * @param string $callback - * @param int $flags + * @param string $callback + * @param int $flags * @throws SwooleException - * + * */ function swoole_async_writefile(string $filename, string $content, callable $callback = null, int $flags = 0): void { @@ -47,64 +47,62 @@ function swoole_async_writefile(string $filename, string $content, callable $cal $result = \swoole_async_writefile($filename, $content, $callback, $flags); } elseif ($callback !== null) { $result = \swoole_async_writefile($filename, $content, $callback); - }else { + } else { $result = \swoole_async_writefile($filename, $content); } - if ($result === FALSE) { + if ($result === false) { throw SwooleException::createFromPhpError(); } } /** - * - * - * @param callable $callback + * + * + * @param callable $callback * @throws SwooleException - * + * */ function swoole_event_defer(callable $callback): void { error_clear_last(); $result = \swoole_event_defer($callback); - if ($result === FALSE) { + if ($result === false) { throw SwooleException::createFromPhpError(); } } /** - * - * - * @param int $fd + * + * + * @param int $fd * @throws SwooleException - * + * */ function swoole_event_del(int $fd): void { error_clear_last(); $result = \swoole_event_del($fd); - if ($result === FALSE) { + if ($result === false) { throw SwooleException::createFromPhpError(); } } /** - * - * - * @param int $fd - * @param string $data + * + * + * @param int $fd + * @param string $data * @throws SwooleException - * + * */ function swoole_event_write(int $fd, string $data): void { error_clear_last(); $result = \swoole_event_write($fd, $data); - if ($result === FALSE) { + if ($result === false) { throw SwooleException::createFromPhpError(); } } - - diff --git a/generated/uodbc.php b/generated/uodbc.php index 075e4ffb..e7bcb25a 100644 --- a/generated/uodbc.php +++ b/generated/uodbc.php @@ -8,7 +8,7 @@ * Enables handling of binary column data. ODBC SQL types affected are * BINARY, VARBINARY, and * LONGVARBINARY. - * + * * When binary SQL data is converted to character C data, each byte * (8 bits) of source data is represented as two ASCII characters. * These characters are the ASCII character representation of the @@ -16,97 +16,97 @@ * 00000001 is converted to * "01" and a binary 11111111 * is converted to "FF". - * + * * LONGVARBINARY handling - * - * - * + * + * + * * binmode * longreadlen * result - * - * - * - * + * + * + * + * * ODBC_BINMODE_PASSTHRU * 0 * passthru - * - * + * + * * ODBC_BINMODE_RETURN * 0 * passthru - * - * + * + * * ODBC_BINMODE_CONVERT * 0 * passthru - * - * + * + * * ODBC_BINMODE_PASSTHRU * 0 * passthru - * - * + * + * * ODBC_BINMODE_PASSTHRU * >0 * passthru - * - * + * + * * ODBC_BINMODE_RETURN * >0 * return as is - * - * + * + * * ODBC_BINMODE_CONVERT * >0 * return as char - * - * - * - * - * + * + * + * + * + * * If odbc_fetch_into is used, passthru means that an * empty string is returned for these columns. - * + * * @param int $result_id The result identifier. - * + * * If result_id is 0, the * settings apply as default for new results. - * - * + * + * * Default for longreadlen is 4096 and * mode defaults to * ODBC_BINMODE_RETURN. Handling of binary long * columns is also affected by odbc_longreadlen. - * - * + * + * * @param int $mode Possible values for mode are: - * - * - * + * + * + * * ODBC_BINMODE_PASSTHRU: Passthru BINARY data - * - * - * - * + * + * + * + * * ODBC_BINMODE_RETURN: Return as is - * - * - * - * + * + * + * + * * ODBC_BINMODE_CONVERT: Convert to char and return - * - * - * + * + * + * * @throws UodbcException - * + * */ function odbc_binmode($result_id, int $mode): void { error_clear_last(); $result = \odbc_binmode($result_id, $mode); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } } @@ -114,7 +114,7 @@ function odbc_binmode($result_id, int $mode): void /** * Lists columns and associated privileges for the given table. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $qualifier The qualifier. @@ -124,9 +124,9 @@ function odbc_binmode($result_id, int $mode): void * @return resource Returns an ODBC result identifier . * This result identifier can be used to fetch a list of columns and * associated privileges. - * + * * The result set has the following columns: - * + * * TABLE_QUALIFIER * TABLE_OWNER * TABLE_NAME @@ -134,18 +134,18 @@ function odbc_binmode($result_id, int $mode): void * GRANTEE * PRIVILEGE * IS_GRANTABLE - * - * + * + * * The result set is ordered by TABLE_QUALIFIER, TABLE_OWNER and * TABLE_NAME. * @throws UodbcException - * + * */ function odbc_columnprivileges($connection_id, string $qualifier, string $owner, string $table_name, string $column_name) { error_clear_last(); $result = \odbc_columnprivileges($connection_id, $qualifier, $owner, $table_name, $column_name); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -154,7 +154,7 @@ function odbc_columnprivileges($connection_id, string $qualifier, string $owner, /** * Lists all columns in the requested range. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $qualifier The qualifier. @@ -162,9 +162,9 @@ function odbc_columnprivileges($connection_id, string $qualifier, string $owner, * @param string $table_name The table name. * @param string $column_name The column name. * @return resource Returns an ODBC result identifier . - * + * * The result set has the following columns: - * + * * TABLE_QUALIFIER * TABLE_SCHEM * TABLE_NAME @@ -177,12 +177,12 @@ function odbc_columnprivileges($connection_id, string $qualifier, string $owner, * RADIX * NULLABLE * REMARKS - * - * + * + * * The result set is ordered by TABLE_QUALIFIER, TABLE_SCHEM and * TABLE_NAME. * @throws UodbcException - * + * */ function odbc_columns($connection_id, string $qualifier = null, string $schema = null, string $table_name = null, string $column_name = null) { @@ -195,10 +195,10 @@ function odbc_columns($connection_id, string $qualifier = null, string $schema = $result = \odbc_columns($connection_id, $qualifier, $schema); } elseif ($qualifier !== null) { $result = \odbc_columns($connection_id, $qualifier); - }else { + } else { $result = \odbc_columns($connection_id); } - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -207,17 +207,17 @@ function odbc_columns($connection_id, string $qualifier = null, string $schema = /** * Commits all pending transactions on the connection. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @throws UodbcException - * + * */ function odbc_commit($connection_id): void { error_clear_last(); $result = \odbc_commit($connection_id); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } } @@ -226,7 +226,7 @@ function odbc_commit($connection_id): void /** * This function will return the list of available DSN (after calling it * several times). - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param int $fetch_type The fetch_type can be one of two constant types: @@ -235,13 +235,13 @@ function odbc_commit($connection_id): void * called, thereafter use the SQL_FETCH_NEXT. * @return array Returns FALSE on error, and an array upon success. * @throws UodbcException - * + * */ function odbc_data_source($connection_id, int $fetch_type): array { error_clear_last(); $result = \odbc_data_source($connection_id, $fetch_type); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -250,7 +250,7 @@ function odbc_data_source($connection_id, int $fetch_type): array /** * Sends an SQL statement to the database server. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $query_string The SQL statement. @@ -258,17 +258,17 @@ function odbc_data_source($connection_id, int $fetch_type): array * @return resource Returns an ODBC result identifier if the SQL command was executed * successfully, . * @throws UodbcException - * + * */ function odbc_exec($connection_id, string $query_string, int $flags = null) { error_clear_last(); if ($flags !== null) { $result = \odbc_exec($connection_id, $query_string, $flags); - }else { + } else { $result = \odbc_exec($connection_id, $query_string); } - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -277,29 +277,29 @@ function odbc_exec($connection_id, string $query_string, int $flags = null) /** * Executes a statement prepared with odbc_prepare. - * + * * @param resource $result_id The result id resource, from odbc_prepare. * @param array $parameters_array Parameters in parameter_array will be * substituted for placeholders in the prepared statement in order. * Elements of this array will be converted to strings by calling this * function. - * + * * Any parameters in parameter_array which * start and end with single quotes will be taken as the name of a * file to read and send to the database server as the data for the * appropriate placeholder. * @throws UodbcException - * + * */ function odbc_execute($result_id, array $parameters_array = null): void { error_clear_last(); if ($parameters_array !== null) { $result = \odbc_execute($result_id, $parameters_array); - }else { + } else { $result = \odbc_execute($result_id); } - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } } @@ -307,7 +307,7 @@ function odbc_execute($result_id, array $parameters_array = null): void /** * Fetch one result row into array. - * + * * @param resource $result_id The result resource. * @param array $result_array The result array * that can be of any type since it will be converted to type @@ -317,17 +317,17 @@ function odbc_execute($result_id, array $parameters_array = null): void * @return int Returns the number of columns in the result; * FALSE on error. * @throws UodbcException - * + * */ function odbc_fetch_into($result_id, array &$result_array, int $rownumber = null): int { error_clear_last(); if ($rownumber !== null) { $result = \odbc_fetch_into($result_id, $result_array, $rownumber); - }else { + } else { $result = \odbc_fetch_into($result_id, $result_array); } - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -337,18 +337,18 @@ function odbc_fetch_into($result_id, array &$result_array, int $rownumber = null /** * Gets the length of the field referenced by number in the given result * identifier. - * + * * @param resource $result_id The result identifier. * @param int $field_number The field number. Field numbering starts at 1. * @return int Returns the field length, . * @throws UodbcException - * + * */ function odbc_field_len($result_id, int $field_number): int { error_clear_last(); $result = \odbc_field_len($result_id, $field_number); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -358,18 +358,18 @@ function odbc_field_len($result_id, int $field_number): int /** * Gets the name of the field occupying the given column number in the given * result identifier. - * + * * @param resource $result_id The result identifier. * @param int $field_number The field number. Field numbering starts at 1. * @return string Returns the field name as a string, . * @throws UodbcException - * + * */ function odbc_field_name($result_id, int $field_number): string { error_clear_last(); $result = \odbc_field_name($result_id, $field_number); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -379,19 +379,19 @@ function odbc_field_name($result_id, int $field_number): string /** * Gets the number of the column slot that corresponds to the named field in * the given result identifier. - * + * * @param resource $result_id The result identifier. * @param string $field_name The field name. * @return int Returns the field number as a integer, . * Field numbering starts at 1. * @throws UodbcException - * + * */ function odbc_field_num($result_id, string $field_name): int { error_clear_last(); $result = \odbc_field_num($result_id, $field_name); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -401,18 +401,18 @@ function odbc_field_num($result_id, string $field_name): int /** * Gets the scale of the field referenced by number in the given result * identifier. - * + * * @param resource $result_id The result identifier. * @param int $field_number The field number. Field numbering starts at 1. * @return int Returns the field scale as a integer, . * @throws UodbcException - * + * */ function odbc_field_scale($result_id, int $field_number): int { error_clear_last(); $result = \odbc_field_scale($result_id, $field_number); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -422,18 +422,18 @@ function odbc_field_scale($result_id, int $field_number): int /** * Gets the SQL type of the field referenced by number in the given result * identifier. - * + * * @param resource $result_id The result identifier. * @param int $field_number The field number. Field numbering starts at 1. * @return string Returns the field type as a string, . * @throws UodbcException - * + * */ function odbc_field_type($result_id, int $field_number): string { error_clear_last(); $result = \odbc_field_type($result_id, $field_number); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -444,7 +444,7 @@ function odbc_field_type($result_id, int $field_number): string * Retrieves a list of foreign keys in the specified table or a list of * foreign keys in other tables that refer to the primary key in the * specified table - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $pk_qualifier The primary key qualifier. @@ -454,9 +454,9 @@ function odbc_field_type($result_id, int $field_number): string * @param string $fk_owner The foreign key owner. * @param string $fk_table The foreign key table. * @return resource Returns an ODBC result identifier . - * + * * The result set has the following columns: - * + * * PKTABLE_QUALIFIER * PKTABLE_OWNER * PKTABLE_NAME @@ -470,15 +470,15 @@ function odbc_field_type($result_id, int $field_number): string * DELETE_RULE * FK_NAME * PK_NAME - * + * * @throws UodbcException - * + * */ function odbc_foreignkeys($connection_id, string $pk_qualifier, string $pk_owner, string $pk_table, string $fk_qualifier, string $fk_owner, string $fk_table) { error_clear_last(); $result = \odbc_foreignkeys($connection_id, $pk_qualifier, $pk_owner, $pk_table, $fk_qualifier, $fk_owner, $fk_table); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -487,19 +487,19 @@ function odbc_foreignkeys($connection_id, string $pk_qualifier, string $pk_owner /** * Enables handling of LONG and LONGVARBINARY columns. - * + * * @param int $result_id The result identifier. * @param int $length The number of bytes returned to PHP is controlled by the parameter * length. If it is set to 0, Long column data is passed through to the * client. * @throws UodbcException - * + * */ function odbc_longreadlen($result_id, int $length): void { error_clear_last(); $result = \odbc_longreadlen($result_id, $length); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } } @@ -508,25 +508,25 @@ function odbc_longreadlen($result_id, int $length): void /** * Prepares a statement for execution. The result identifier can be used * later to execute the statement with odbc_execute. - * + * * Some databases (such as IBM DB2, MS SQL Server, and Oracle) support * stored procedures that accept parameters of type IN, INOUT, and OUT as * defined by the ODBC specification. However, the Unified ODBC driver * currently only supports parameters of type IN to stored procedures. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $query_string The query string statement being prepared. * @return resource Returns an ODBC result identifier if the SQL command was prepared * successfully. Returns FALSE on error. * @throws UodbcException - * + * */ function odbc_prepare($connection_id, string $query_string) { error_clear_last(); $result = \odbc_prepare($connection_id, $query_string); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -536,31 +536,31 @@ function odbc_prepare($connection_id, string $query_string) /** * Returns a result identifier that can be used to fetch the column names * that comprise the primary key for a table. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. - * @param string $qualifier - * @param string $owner - * @param string $table + * @param string $qualifier + * @param string $owner + * @param string $table * @return resource Returns an ODBC result identifier . - * + * * The result set has the following columns: - * + * * TABLE_QUALIFIER * TABLE_OWNER * TABLE_NAME * COLUMN_NAME * KEY_SEQ * PK_NAME - * + * * @throws UodbcException - * + * */ function odbc_primarykeys($connection_id, string $qualifier, string $owner, string $table) { error_clear_last(); $result = \odbc_primarykeys($connection_id, $qualifier, $owner, $table); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -570,22 +570,22 @@ function odbc_primarykeys($connection_id, string $qualifier, string $owner, stri /** * Prints all rows from a result identifier produced by * odbc_exec. The result is printed in HTML table format. - * + * * @param resource $result_id The result identifier. * @param string $format Additional overall table formatting. * @return int Returns the number of rows in the result . * @throws UodbcException - * + * */ function odbc_result_all($result_id, string $format = null): int { error_clear_last(); if ($format !== null) { $result = \odbc_result_all($result_id, $format); - }else { + } else { $result = \odbc_result_all($result_id); } - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -594,7 +594,7 @@ function odbc_result_all($result_id, string $format = null): int /** * Get result data - * + * * @param resource $result_id The ODBC resource. * @param mixed $field The field name being retrieved. It can either be an integer containing * the column number of the field you want; or it can be a string @@ -602,13 +602,13 @@ function odbc_result_all($result_id, string $format = null): int * @return mixed Returns the string contents of the field, FALSE on error, NULL for * NULL data, or TRUE for binary data. * @throws UodbcException - * + * */ function odbc_result($result_id, $field) { error_clear_last(); $result = \odbc_result($result_id, $field); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -617,17 +617,17 @@ function odbc_result($result_id, $field) /** * Rolls back all pending statements on the connection. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @throws UodbcException - * + * */ function odbc_rollback($connection_id): void { error_clear_last(); $result = \odbc_rollback($connection_id); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } } @@ -642,7 +642,7 @@ function odbc_rollback($connection_id): void * certainly need a good ODBC reference to explain all the different * options and values that can be used. Different driver versions * support different options. - * + * * Because the effects may vary depending on the ODBC driver, use of * this function in scripts to be made publicly available is * strongly discouraged. Also, some ODBC options are not available @@ -651,7 +651,7 @@ function odbc_rollback($connection_id): void * particular job it can make PHP work so your boss doesn't tell you * to use a commercial product, that's all that really * matters. - * + * * @param resource $id Is a connection id or result id on which to change the settings. * For SQLSetConnectOption(), this is a connection id. * For SQLSetStmtOption(), this is a result id. @@ -661,13 +661,13 @@ function odbc_rollback($connection_id): void * @param int $option The option to set. * @param int $param The value for the given option. * @throws UodbcException - * + * */ function odbc_setoption($id, int $function, int $option, int $param): void { error_clear_last(); $result = \odbc_setoption($id, $function, $option, $param); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } } @@ -675,7 +675,7 @@ function odbc_setoption($id, int $function, int $option, int $param): void /** * Get statistics about a table and its indexes. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $qualifier The qualifier. @@ -684,9 +684,9 @@ function odbc_setoption($id, int $function, int $option, int $param): void * @param int $unique The unique attribute. * @param int $accuracy The accuracy. * @return resource Returns an ODBC result identifier . - * + * * The result set has the following columns: - * + * * TABLE_QUALIFIER * TABLE_OWNER * TABLE_NAME @@ -700,15 +700,15 @@ function odbc_setoption($id, int $function, int $option, int $param): void * CARDINALITY * PAGES * FILTER_CONDITION - * + * * @throws UodbcException - * + * */ function odbc_statistics($connection_id, string $qualifier, string $owner, string $table_name, int $unique, int $accuracy) { error_clear_last(); $result = \odbc_statistics($connection_id, $qualifier, $owner, $table_name, $unique, $accuracy); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -718,7 +718,7 @@ function odbc_statistics($connection_id, string $qualifier, string $owner, strin /** * Lists tables in the requested range and the privileges associated * with each table. - * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $qualifier The qualifier. @@ -727,9 +727,9 @@ function odbc_statistics($connection_id, string $qualifier, string $owner, strin * @param string $name The name. Accepts the following search patterns: * ('%' to match zero or more characters and '_' to match a single character) * @return resource An ODBC result identifier . - * + * * The result set has the following columns: - * + * * TABLE_QUALIFIER * TABLE_OWNER * TABLE_NAME @@ -737,15 +737,15 @@ function odbc_statistics($connection_id, string $qualifier, string $owner, strin * GRANTEE * PRIVILEGE * IS_GRANTABLE - * + * * @throws UodbcException - * + * */ function odbc_tableprivileges($connection_id, string $qualifier, string $owner, string $name) { error_clear_last(); $result = \odbc_tableprivileges($connection_id, $qualifier, $owner, $name); - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; @@ -754,45 +754,45 @@ function odbc_tableprivileges($connection_id, string $qualifier, string $owner, /** * Lists all tables in the requested range. - * + * * To support enumeration of qualifiers, owners, and table types, * the following special semantics for the * qualifier, owner, * name, and * table_type are available: - * - * - * + * + * + * * If qualifier is a single percent * character (%) and owner and * name are empty strings, then the result * set contains a list of valid qualifiers for the data * source. (All columns except the TABLE_QUALIFIER column contain * NULLs.) - * - * - * - * + * + * + * + * * If owner is a single percent character * (%) and qualifier and * name are empty strings, then the result * set contains a list of valid owners for the data source. (All * columns except the TABLE_OWNER column contain * NULLs.) - * - * - * - * + * + * + * + * * If table_type is a single percent * character (%) and qualifier, * owner and name * are empty strings, then the result set contains a list of * valid table types for the data source. (All columns except the * TABLE_TYPE column contain NULLs.) - * - * - * - * + * + * + * + * * @param resource $connection_id The ODBC connection identifier, * see odbc_connect for details. * @param string $qualifier The qualifier. @@ -807,19 +807,19 @@ function odbc_tableprivileges($connection_id, string $qualifier, string $owner, * data source does not support a specified table type, * odbc_tables does not return any results for * that type. - * @return resource Returns an ODBC result identifier containing the information + * @return resource Returns an ODBC result identifier containing the information * . - * + * * The result set has the following columns: - * + * * TABLE_QUALIFIER * TABLE_OWNER * TABLE_NAME * TABLE_TYPE * REMARKS - * + * * @throws UodbcException - * + * */ function odbc_tables($connection_id, string $qualifier = null, string $owner = null, string $name = null, string $types = null) { @@ -832,13 +832,11 @@ function odbc_tables($connection_id, string $qualifier = null, string $owner = n $result = \odbc_tables($connection_id, $qualifier, $owner); } elseif ($qualifier !== null) { $result = \odbc_tables($connection_id, $qualifier); - }else { + } else { $result = \odbc_tables($connection_id); } - if ($result === FALSE) { + if ($result === false) { throw UodbcException::createFromPhpError(); } return $result; } - - diff --git a/generated/url.php b/generated/url.php index 422d7e9d..db240b71 100644 --- a/generated/url.php +++ b/generated/url.php @@ -6,7 +6,7 @@ /** * Decodes a base64 encoded data. - * + * * @param string $data The encoded data. * @param bool $strict If the strict parameter is set to TRUE * then the base64_decode function will return @@ -15,13 +15,13 @@ * @return string Returns the decoded data . The returned data may be * binary. * @throws UrlException - * + * */ function base64_decode(string $data, bool $strict = false): string { error_clear_last(); $result = \base64_decode($data, $strict); - if ($result === FALSE) { + if ($result === false) { throw UrlException::createFromPhpError(); } return $result; @@ -30,26 +30,24 @@ function base64_decode(string $data, bool $strict = false): string /** * Encodes the given data with base64. - * + * * This encoding is designed to make binary data survive transport through * transport layers that are not 8-bit clean, such as mail bodies. - * + * * Base64-encoded data takes about 33% more space than the original * data. - * + * * @param string $data The data to encode. * @return string The encoded data, as a string . * @throws UrlException - * + * */ function base64_encode(string $data): string { error_clear_last(); $result = \base64_encode($data); - if ($result === FALSE) { + if ($result === false) { throw UrlException::createFromPhpError(); } return $result; } - - diff --git a/generated/var.php b/generated/var.php index 9805100c..74332bf0 100644 --- a/generated/var.php +++ b/generated/var.php @@ -8,16 +8,16 @@ * Imports GET/POST/Cookie variables into the global scope. It is useful if * you disabled register_globals, * but would like to see some variables in the global scope. - * + * * If you're interested in importing other variables into the global scope, * such as $_SERVER, consider using extract. - * + * * @param string $types Using the types parameter, you can specify - * which request variables to import. You can use 'G', 'P' and 'C' + * which request variables to import. You can use 'G', 'P' and 'C' * characters respectively for GET, POST and Cookie. These characters are * not case sensitive, so you can also use any combination of 'g', 'p' * and 'c'. POST includes the POST uploaded file information. - * + * * Note that the order of the letters matters, as when using * "GP", the * POST variables will overwrite GET variables with the same name. Any @@ -27,24 +27,24 @@ * "userid", and provide a prefix * "pref_", then you'll get a global variable named * $pref_userid. - * + * * Although the prefix parameter is optional, you * will get an E_NOTICE level * error if you specify no prefix, or specify an empty string as a * prefix. This is a possible security hazard. Notice level errors are * not displayed using the default error reporting level. * @throws VarException - * + * */ function import_request_variables(string $types, string $prefix = null): void { error_clear_last(); if ($prefix !== null) { $result = \import_request_variables($types, $prefix); - }else { + } else { $result = \import_request_variables($types); } - if ($result === FALSE) { + if ($result === false) { throw VarException::createFromPhpError(); } } @@ -53,56 +53,54 @@ function import_request_variables(string $types, string $prefix = null): void /** * Set the type of variable var to * type. - * + * * @param mixed $var The variable being converted. * @param string $type Possibles values of type are: - * - * - * + * + * + * * "boolean" or "bool" - * - * - * - * + * + * + * + * * "integer" or "int" - * - * - * - * + * + * + * + * * "float" or "double" - * - * - * - * + * + * + * + * * "string" - * - * - * - * + * + * + * + * * "array" - * - * - * - * + * + * + * + * * "object" - * - * - * - * + * + * + * + * * "null" - * - * - * + * + * + * * @throws VarException - * + * */ function settype(&$var, string $type): void { error_clear_last(); $result = \settype($var, $type); - if ($result === FALSE) { + if ($result === false) { throw VarException::createFromPhpError(); } } - - diff --git a/generated/xdiff.php b/generated/xdiff.php index e9af27fa..b849febf 100644 --- a/generated/xdiff.php +++ b/generated/xdiff.php @@ -8,19 +8,19 @@ * Makes a binary diff of two files and stores the result in a patch file. * This function works with both text and binary files. Resulting patch * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * + * * @param string $old_file Path to the first file. This file acts as "old" file. * @param string $new_file Path to the second file. This file acts as "new" file. * @param string $dest Path of the resulting patch file. Resulting file contains differences * between "old" and "new" files. It is in binary format and is human-unreadable. * @throws XdiffException - * + * */ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): void { error_clear_last(); $result = \xdiff_file_bdiff($old_file, $new_file, $dest); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } } @@ -28,21 +28,21 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): voi /** * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff + * patch and stores the result in a file dest. + * This function accepts patches created both via xdiff_file_bdiff * and xdiff_file_rabdiff functions or their string counterparts. - * + * * @param string $file The original file. * @param string $patch The binary patch file. * @param string $dest Path of the resulting file. * @throws XdiffException - * + * */ function xdiff_file_bpatch(string $file, string $patch, string $dest): void { error_clear_last(); $result = \xdiff_file_bpatch($file, $patch, $dest); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } } @@ -52,21 +52,21 @@ function xdiff_file_bpatch(string $file, string $patch, string $dest): void * Makes a binary diff of two files and stores the result in a patch file. * This function works with both text and binary files. Resulting patch * file can be later applied using xdiff_file_bpatch. - * + * * Starting with version 1.5.0 this function is an alias of xdiff_file_bdiff. - * + * * @param string $old_file Path to the first file. This file acts as "old" file. * @param string $new_file Path to the second file. This file acts as "new" file. * @param string $dest Path of the resulting patch file. Resulting file contains differences * between "old" and "new" files. It is in binary format and is human-unreadable. * @throws XdiffException - * + * */ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest): void { error_clear_last(); $result = \xdiff_file_diff_binary($old_file, $new_file, $dest); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } } @@ -79,7 +79,7 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest * specifies how many lines of context should be added around each change. * Setting minimal parameter to true will result in outputting the shortest * patch file possible (can take a long time). - * + * * @param string $old_file Path to the first file. This file acts as "old" file. * @param string $new_file Path to the second file. This file acts as "new" file. * @param string $dest Path of the resulting patch file. @@ -88,13 +88,13 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest * @param bool $minimal Set this parameter to TRUE if you want to minimalize size of the result * (can take a long time). * @throws XdiffException - * + * */ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $context = 3, bool $minimal = false): void { error_clear_last(); $result = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } } @@ -102,23 +102,23 @@ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $ /** * Patches a file with a binary - * patch and stores the result in a file dest. - * This function accepts patches created both via xdiff_file_bdiff + * patch and stores the result in a file dest. + * This function accepts patches created both via xdiff_file_bdiff * or xdiff_file_rabdiff functions or their string counterparts. - * + * * Starting with version 1.5.0 this function is an alias of xdiff_file_bpatch. - * + * * @param string $file The original file. * @param string $patch The binary patch file. * @param string $dest Path of the resulting file. * @throws XdiffException - * + * */ function xdiff_file_patch_binary(string $file, string $patch, string $dest): void { error_clear_last(); $result = \xdiff_file_patch_binary($file, $patch, $dest); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } } @@ -130,22 +130,22 @@ function xdiff_file_patch_binary(string $file, string $patch, string $dest): voi * algorithm used which should result in faster execution and smaller diff produced. * This function works with both text and binary files. Resulting patch * file can be later applied using xdiff_file_bpatch/xdiff_string_bpatch. - * - * For more details about differences between algorithm used please check libxdiff + * + * For more details about differences between algorithm used please check libxdiff * website. - * + * * @param string $old_file Path to the first file. This file acts as "old" file. * @param string $new_file Path to the second file. This file acts as "new" file. * @param string $dest Path of the resulting patch file. Resulting file contains differences * between "old" and "new" files. It is in binary format and is human-unreadable. * @throws XdiffException - * + * */ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): void { error_clear_last(); $result = \xdiff_file_rabdiff($old_file, $new_file, $dest); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } } @@ -153,20 +153,20 @@ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): v /** * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff + * This function accepts patches created both via xdiff_string_bdiff * and xdiff_string_rabdiff functions or their file counterparts. - * + * * @param string $str The original binary string. * @param string $patch The binary patch string. * @return string Returns the patched string, . * @throws XdiffException - * + * */ function xdiff_string_bpatch(string $str, string $patch): string { error_clear_last(); $result = \xdiff_string_bpatch($str, $patch); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } return $result; @@ -175,22 +175,22 @@ function xdiff_string_bpatch(string $str, string $patch): string /** * Patches a string str with a binary patch. - * This function accepts patches created both via xdiff_string_bdiff + * This function accepts patches created both via xdiff_string_bdiff * and xdiff_string_rabdiff functions or their file counterparts. - * + * * Starting with version 1.5.0 this function is an alias of xdiff_string_bpatch. - * + * * @param string $str The original binary string. * @param string $patch The binary patch string. * @return string Returns the patched string, . * @throws XdiffException - * + * */ function xdiff_string_patch_binary(string $str, string $patch): string { error_clear_last(); $result = \xdiff_string_patch_binary($str, $patch); - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } return $result; @@ -198,26 +198,26 @@ function xdiff_string_patch_binary(string $str, string $patch): string /** - * Patches a str string with an unified patch in patch parameter - * and returns the result. patch has to be an unified diff created by - * xdiff_file_diff/xdiff_string_diff function. + * Patches a str string with an unified patch in patch parameter + * and returns the result. patch has to be an unified diff created by + * xdiff_file_diff/xdiff_string_diff function. * An optional flags parameter specifies mode of operation. Any - * rejected parts of the patch will be stored inside error variable if + * rejected parts of the patch will be stored inside error variable if * it is provided. - * + * * @param string $str The original string. - * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, + * @param string $patch The unified patch string. It has to be created using xdiff_string_diff, * xdiff_file_diff functions or compatible tools. * @param int $flags flags can be either * XDIFF_PATCH_NORMAL (default mode, normal patch) * or XDIFF_PATCH_REVERSE (reversed patch). - * + * * Starting from version 1.5.0, you can also use binary OR to enable * XDIFF_PATCH_IGNORESPACE flag. * @param string $error If provided then rejected parts are stored inside this variable. * @return string Returns the patched string, . * @throws XdiffException - * + * */ function xdiff_string_patch(string $str, string $patch, int $flags = null, string &$error = null): string { @@ -226,13 +226,11 @@ function xdiff_string_patch(string $str, string $patch, int $flags = null, strin $result = \xdiff_string_patch($str, $patch, $flags, $error); } elseif ($flags !== null) { $result = \xdiff_string_patch($str, $patch, $flags); - }else { + } else { $result = \xdiff_string_patch($str, $patch); } - if ($result === FALSE) { + if ($result === false) { throw XdiffException::createFromPhpError(); } return $result; } - - diff --git a/generated/xml.php b/generated/xml.php index 3ba9654f..29c3f4ac 100644 --- a/generated/xml.php +++ b/generated/xml.php @@ -9,19 +9,17 @@ * object. All callback functions could be set with * xml_set_element_handler etc and assumed to be * methods of object. - * + * * @param resource $parser A reference to the XML parser to use inside the object. * @param object $object The object where to use the XML parser. * @throws XmlException - * + * */ function xml_set_object($parser, object &$object): void { error_clear_last(); $result = \xml_set_object($parser, $object); - if ($result === FALSE) { + if ($result === false) { throw XmlException::createFromPhpError(); } } - - diff --git a/generated/xmlrpc.php b/generated/xmlrpc.php index ad07ddb5..81228868 100644 --- a/generated/xmlrpc.php +++ b/generated/xmlrpc.php @@ -6,19 +6,17 @@ /** * Sets xmlrpc type, base64 or datetime, for a PHP string value. - * + * * @param string|DateTime $value Value to set the type * @param string $type 'base64' or 'datetime' * @throws XmlrpcException - * + * */ function xmlrpc_set_type(string &$value, string $type): void { error_clear_last(); $result = \xmlrpc_set_type($value, $type); - if ($result === FALSE) { + if ($result === false) { throw XmlrpcException::createFromPhpError(); } } - - diff --git a/generated/yaml.php b/generated/yaml.php index 09bd06bb..12e265e3 100644 --- a/generated/yaml.php +++ b/generated/yaml.php @@ -6,7 +6,7 @@ /** * Convert all or part of a YAML document stream read from a file to a PHP variable. - * + * * @param string $filename Path to the file. * @param int $pos Document to extract from stream (-1 for all * documents, 0 for first document, ...). @@ -21,7 +21,7 @@ * array will be returned with one entry for each document found * in the stream. * @throws YamlException - * + * */ function yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = null, array $callbacks = null) { @@ -30,10 +30,10 @@ function yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = null, arr $result = \yaml_parse_file($filename, $pos, $ndocs, $callbacks); } elseif ($ndocs !== null) { $result = \yaml_parse_file($filename, $pos, $ndocs); - }else { + } else { $result = \yaml_parse_file($filename, $pos); } - if ($result === FALSE) { + if ($result === false) { throw YamlException::createFromPhpError(); } return $result; @@ -42,7 +42,7 @@ function yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = null, arr /** * Convert all or part of a YAML document stream read from a URL to a PHP variable. - * + * * @param string $url url should be of the form "scheme://...". PHP * will search for a protocol handler (also known as a wrapper) for that * scheme. If no wrappers for that protocol are registered, PHP will emit @@ -60,7 +60,7 @@ function yaml_parse_file(string $filename, int $pos = 0, int &$ndocs = null, arr * -1 an array will be returned with one entry * for each document found in the stream. * @throws YamlException - * + * */ function yaml_parse_url(string $url, int $pos = 0, int &$ndocs = null, array $callbacks = null) { @@ -69,10 +69,10 @@ function yaml_parse_url(string $url, int $pos = 0, int &$ndocs = null, array $ca $result = \yaml_parse_url($url, $pos, $ndocs, $callbacks); } elseif ($ndocs !== null) { $result = \yaml_parse_url($url, $pos, $ndocs); - }else { + } else { $result = \yaml_parse_url($url, $pos); } - if ($result === FALSE) { + if ($result === false) { throw YamlException::createFromPhpError(); } return $result; @@ -81,7 +81,7 @@ function yaml_parse_url(string $url, int $pos = 0, int &$ndocs = null, array $ca /** * Convert all or part of a YAML document stream to a PHP variable. - * + * * @param string $input The string to parse as a YAML document stream. * @param int $pos Document to extract from stream (-1 for all * documents, 0 for first document, ...). @@ -96,7 +96,7 @@ function yaml_parse_url(string $url, int $pos = 0, int &$ndocs = null, array $ca * array will be returned with one entry for each document found * in the stream. * @throws YamlException - * + * */ function yaml_parse(string $input, int $pos = 0, int &$ndocs = null, array $callbacks = null) { @@ -105,13 +105,11 @@ function yaml_parse(string $input, int $pos = 0, int &$ndocs = null, array $call $result = \yaml_parse($input, $pos, $ndocs, $callbacks); } elseif ($ndocs !== null) { $result = \yaml_parse($input, $pos, $ndocs); - }else { + } else { $result = \yaml_parse($input, $pos); } - if ($result === FALSE) { + if ($result === false) { throw YamlException::createFromPhpError(); } return $result; } - - diff --git a/generated/yaz.php b/generated/yaz.php index fba80ead..6f78a98a 100644 --- a/generated/yaz.php +++ b/generated/yaz.php @@ -6,52 +6,52 @@ /** * This function invokes a CCL parser. It converts a given CCL FIND query to - * an RPN query which may be passed to the yaz_search + * an RPN query which may be passed to the yaz_search * function to perform a search. - * - * To define a set of valid CCL fields call yaz_ccl_conf + * + * To define a set of valid CCL fields call yaz_ccl_conf * prior to this function. - * + * * @param resource $id The connection resource returned by yaz_connect. * @param string $query The CCL FIND query. - * @param array $result If the function was executed successfully, this will be an array + * @param array $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 - * of failure: - * - * - * + * of failure: + * + * + * * errorcode - the CCL error code (integer) - * - * - * - * + * + * + * + * * errorstring - the CCL error string - * - * - * - * + * + * + * + * * errorpos - approximate position in query of failure * (integer is character position) - * - * - * - * + * + * + * + * * errorcode - the CCL error code (integer) - * + * * errorstring - the CCL error string - * + * * errorpos - approximate position in query of failure * (integer is character position) * @throws YazException - * + * */ function yaz_ccl_parse($id, string $query, array &$result): void { error_clear_last(); $result = \yaz_ccl_parse($id, $query, $result); - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } } @@ -59,16 +59,16 @@ function yaz_ccl_parse($id, string $query, array &$result): void /** * Closes the connection given by parameter id. - * + * * @param resource $id The connection resource returned by yaz_connect. * @throws YazException - * + * */ function yaz_close($id): void { error_clear_last(); $result = \yaz_close($id); - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } } @@ -77,203 +77,203 @@ function yaz_close($id): void /** * This function returns a connection resource on success, zero on * failure. - * + * * yaz_connect prepares for a connection to a - * Z39.50 server. + * Z39.50 server. * This function is non-blocking and does not attempt to establish * a connection - it merely prepares a connect to be performed later when * yaz_wait is called. - * + * * @param string $zurl A string that takes the form host[:port][/database]. - * If port is omitted, port 210 is used. If database is omitted + * If port is omitted, port 210 is used. If database is omitted * Default is used. - * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication + * @param mixed $options If given as a string, it is treated as the Z39.50 V2 authentication * string (OpenAuth). - * + * * If given as an array, the contents of the array serves as options. - * - * + * + * * user - * - * + * + * * Username for authentication. - * - * - * - * + * + * + * + * * group - * - * + * + * * Group for authentication. - * - * - * - * + * + * + * + * * password - * - * + * + * * Password for authentication. - * - * - * - * + * + * + * + * * cookie - * - * + * + * * Cookie for session (YAZ proxy). - * - * - * - * + * + * + * + * * proxy - * - * + * + * * Proxy for connection (YAZ proxy). - * - * - * - * + * + * + * + * * persistent - * - * + * + * * A boolean. If TRUE the connection is persistent; If FALSE the * connection is not persistent. By default connections are persistent. - * - * - * - * If you open a persistent connection, you won't be able to close + * + * + * + * If you open a persistent connection, you won't be able to close * it later with yaz_close. - * - * - * - * - * + * + * + * + * + * * piggyback - * - * + * + * * A boolean. If TRUE piggyback is enabled for searches; If FALSE * piggyback is disabled. By default piggyback is enabled. - * - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a + * + * + * Enabling piggyback is more efficient and usually saves a + * network-round-trip for first time fetches of records. However, a * few Z39.50 servers do not support piggyback or they ignore element * set names. For those, piggyback should be disabled. - * - * - * - * + * + * + * + * * charset - * - * - * A string that specifies character set to be used in Z39.50 + * + * + * A string that specifies character set to be used in Z39.50 * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, + * ISO-8859-1, UTF-8, * UTF-16. - * - * + * + * * Most Z39.50 servers do not support this feature (and thus, this is * ignored). Many servers use the ISO-8859-1 encoding for queries and * messages. MARC21/USMARC records are not affected by this setting. - * - * - * - * - * + * + * + * + * + * * preferredMessageSize - * - * + * + * * An integer that specifies the maximum byte size of all records * to be returned by a target during retrieval. See the * Z39.50 standard for more * information. - * - * - * + * + * + * * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * + * + * + * + * + * + * * maximumRecordSize - * - * + * + * * An integer that specifies the maximum byte size of a single record * to be returned by a target during retrieval. This * entity is referred to as Exceptional-record-size in the * Z39.50 standard. - * - * - * + * + * + * * This option is supported in PECL YAZ 1.0.5 or later. - * - * - * - * - * - * - * + * + * + * + * + * + * + * * Username for authentication. - * + * * Group for authentication. - * + * * Password for authentication. - * + * * Cookie for session (YAZ proxy). - * + * * Proxy for connection (YAZ proxy). - * + * * A boolean. If TRUE the connection is persistent; If FALSE the * connection is not persistent. By default connections are persistent. - * - * If you open a persistent connection, you won't be able to close + * + * If you open a persistent connection, you won't be able to close * it later with yaz_close. - * + * * A boolean. If TRUE piggyback is enabled for searches; If FALSE * piggyback is disabled. By default piggyback is enabled. - * - * Enabling piggyback is more efficient and usually saves a - * network-round-trip for first time fetches of records. However, a + * + * Enabling piggyback is more efficient and usually saves a + * network-round-trip for first time fetches of records. However, a * few Z39.50 servers do not support piggyback or they ignore element * set names. For those, piggyback should be disabled. - * - * A string that specifies character set to be used in Z39.50 + * + * A string that specifies character set to be used in Z39.50 * language and character set negotiation. Use strings such as: - * ISO-8859-1, UTF-8, + * ISO-8859-1, UTF-8, * UTF-16. - * + * * Most Z39.50 servers do not support this feature (and thus, this is * ignored). Many servers use the ISO-8859-1 encoding for queries and * messages. MARC21/USMARC records are not affected by this setting. - * + * * An integer that specifies the maximum byte size of all records * to be returned by a target during retrieval. See the * Z39.50 standard for more * information. - * + * * This option is supported in PECL YAZ 1.0.5 or later. - * + * * An integer that specifies the maximum byte size of a single record * to be returned by a target during retrieval. This * entity is referred to as Exceptional-record-size in the * Z39.50 standard. - * + * * This option is supported in PECL YAZ 1.0.5 or later. * @return mixed A connection resource on success, FALSE on error. * @throws YazException - * + * */ function yaz_connect(string $zurl, $options = null) { error_clear_last(); if ($options !== null) { $result = \yaz_connect($zurl, $options); - }else { + } else { $result = \yaz_connect($zurl); } - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } return $result; @@ -281,22 +281,22 @@ function yaz_connect(string $zurl, $options = null) /** - * This function allows you to change databases within a session by + * This function allows you to change databases within a session by * specifying one or more databases to be used in search, retrieval, etc. - * - overriding databases specified in call to + * - overriding databases specified in call to * yaz_connect. - * + * * @param resource $id The connection resource returned by yaz_connect. - * @param string $databases A string containing one or more databases. Multiple databases are + * @param string $databases A string containing one or more databases. Multiple databases are * separated by a plus sign +. * @throws YazException - * + * */ function yaz_database($id, string $databases): void { error_clear_last(); $result = \yaz_database($id, $databases); - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } } @@ -304,22 +304,22 @@ function yaz_database($id, string $databases): void /** * This function sets the element set name for retrieval. - * + * * Call this function before yaz_search or * yaz_present to specify the element set name for * records to be retrieved. - * + * * @param resource $id The connection resource returned by yaz_connect. * @param string $elementset Most servers support F (for full records) and * B (for brief records). * @throws YazException - * + * */ function yaz_element($id, string $elementset): void { error_clear_last(); $result = \yaz_element($id, $elementset); - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } } @@ -327,35 +327,35 @@ function yaz_element($id, string $elementset): void /** * This function prepares for retrieval of records after a successful search. - * + * * The yaz_range function should be called prior to this * function to specify the range of records to be retrieved. - * + * * @param resource $id The connection resource returned by yaz_connect. * @throws YazException - * + * */ function yaz_present($id): void { error_clear_last(); $result = \yaz_present($id); - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } } /** - * yaz_search prepares for a search on the given + * yaz_search prepares for a search on the given * connection. - * + * * Like yaz_connect this function is non-blocking and - * only prepares for a search to be executed later when + * only prepares for a search to be executed later when * yaz_wait is called. - * + * * @param resource $id The connection resource returned by yaz_connect. * @param string $type This parameter represents the query type - only "rpn" - * is supported now in which case the third argument specifies a Type-1 + * is supported now in which case the third argument specifies a Type-1 * query in prefix query notation. * @param string $query The RPN query is a textual representation of the Type-1 query as * defined by the Z39.50 standard. However, in the text representation @@ -364,22 +364,22 @@ function yaz_present($id): void * white space is ignored unless surrounded by double quotes. Tokens beginning * with an at-character (@) are considered operators, * otherwise they are treated as search terms. - * - * You can find information about attributes at the + * + * You can find information about attributes at the * Z39.50 Maintenance Agency * site. - * + * * If you would like to use a more friendly notation, - * use the CCL parser - functions yaz_ccl_conf and + * use the CCL parser - functions yaz_ccl_conf and * yaz_ccl_parse. * @throws YazException - * + * */ function yaz_search($id, string $type, string $query): void { error_clear_last(); $result = \yaz_search($id, $type, $query); - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } } @@ -387,58 +387,56 @@ function yaz_search($id, string $type, string $query): void /** * This function carries out networked (blocked) activity for outstanding - * requests which have been prepared by the functions - * yaz_connect, yaz_search, - * yaz_present, yaz_scan and + * requests which have been prepared by the functions + * yaz_connect, yaz_search, + * yaz_present, yaz_scan and * yaz_itemorder. - * + * * 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: - * - * + * + * * timeout - * - * + * + * * Sets timeout in seconds. If a server has not responded within the * timeout it is considered dead and yaz_wait * returns. The default value for timeout is 15 seconds. - * - * - * - * + * + * + * + * * event - * - * + * + * * A boolean. - * - * - * - * - * + * + * + * + * + * * Sets timeout in seconds. If a server has not responded within the * timeout it is considered dead and yaz_wait * returns. The default value for timeout is 15 seconds. - * + * * A boolean. * @return mixed Returns TRUE on success . * In event mode, returns resource . * @throws YazException - * + * */ function yaz_wait(array &$options = null) { error_clear_last(); if ($options !== null) { $result = \yaz_wait($options); - }else { + } else { $result = \yaz_wait(); } - if ($result === FALSE) { + if ($result === false) { throw YazException::createFromPhpError(); } return $result; } - - diff --git a/generated/zip.php b/generated/zip.php index 4bbd254c..c06f5db8 100644 --- a/generated/zip.php +++ b/generated/zip.php @@ -6,16 +6,16 @@ /** * Closes the specified directory entry. - * + * * @param resource $zip_entry A directory entry previously opened zip_entry_open. * @throws ZipException - * + * */ function zip_entry_close($zip_entry): void { error_clear_last(); $result = \zip_entry_close($zip_entry); - if ($result === FALSE) { + if ($result === false) { throw ZipException::createFromPhpError(); } } @@ -23,27 +23,27 @@ function zip_entry_close($zip_entry): void /** * Opens a directory entry in a zip file for reading. - * + * * @param resource $zip A valid resource handle returned by zip_open. * @param resource $zip_entry A directory entry returned by zip_read. * @param string $mode Any of the modes specified in the documentation of * fopen. - * + * * Currently, mode is ignored and is always * "rb". This is due to the fact that zip support * in PHP is read only access. * @throws ZipException - * + * */ function zip_entry_open($zip, $zip_entry, string $mode = null): void { error_clear_last(); if ($mode !== null) { $result = \zip_entry_open($zip, $zip_entry, $mode); - }else { + } else { $result = \zip_entry_open($zip, $zip_entry); } - if ($result === FALSE) { + if ($result === false) { throw ZipException::createFromPhpError(); } } @@ -51,23 +51,21 @@ function zip_entry_open($zip, $zip_entry, string $mode = null): void /** * Reads from an open directory entry. - * + * * @param resource $zip_entry A directory entry returned by zip_read. * @param int $length The number of bytes to return. - * + * * This should be the uncompressed length you wish to read. * @return string Returns the data read, empty string on end of a file, . * @throws ZipException - * + * */ function zip_entry_read($zip_entry, int $length = 1024): string { error_clear_last(); $result = \zip_entry_read($zip_entry, $length); - if ($result === FALSE) { + if ($result === false) { throw ZipException::createFromPhpError(); } return $result; } - - diff --git a/generated/zlib.php b/generated/zlib.php index 2b64fb4b..3a6652d2 100644 --- a/generated/zlib.php +++ b/generated/zlib.php @@ -6,7 +6,7 @@ /** * Incrementally deflates data in the specified context. - * + * * @param resource $context A context created with deflate_init. * @param string $data A chunk of data to compress. * @param int $flush_mode One of ZLIB_BLOCK, @@ -20,13 +20,13 @@ * detailed description of these constants. * @return string Returns a chunk of compressed data, . * @throws ZlibException - * + * */ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string { error_clear_last(); $result = \deflate_add($context, $data, $flush_mode); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -36,90 +36,90 @@ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): /** * Initializes an incremental deflate context using the specified * encoding. - * + * * Note that the window option here only sets the window size * of the algorithm, differently from the zlib filters where the same parameter * also sets the encoding to use; the encoding must be set with the * encoding parameter. - * + * * Limitation: there is currently no way to set the header information on a GZIP * compressed stream, which are set as follows: GZIP signature * (\x1f\x8B); compression method (\x08 * == DEFLATE); 6 zero bytes; the operating system set to the current system * (\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: - * - * + * + * * level - * - * + * + * * The compression level in range -1..9; defaults to -1. - * - * - * - * + * + * + * + * * memory - * - * + * + * * The compression memory level in range 1..9; defaults to 8. - * - * - * - * + * + * + * + * * window - * - * + * + * * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * - * - * + * + * + * + * * strategy - * - * + * + * * One of ZLIB_FILTERED, * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, * ZLIB_FIXED or * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * + * + * + * + * * dictionary - * - * + * + * * A string or an array of strings * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * + * + * + * + * + * * The compression level in range -1..9; defaults to -1. - * + * * The compression memory level in range 1..9; defaults to 8. - * + * * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * + * * One of ZLIB_FILTERED, * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, * ZLIB_FIXED or * ZLIB_DEFAULT_STRATEGY (the default). - * + * * A string or an array of strings * of the preset dictionary (default: no preset dictionary). * @return resource Returns a deflate context resource (zlib.deflate) on * success, . * @throws ZlibException - * + * */ function deflate_init(int $encoding, array $options = null) { error_clear_last(); $result = \deflate_init($encoding, $options); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -128,17 +128,17 @@ function deflate_init(int $encoding, array $options = null) /** * Closes the given gz-file pointer. - * + * * @param resource $zp The gz-file pointer. It must be valid, and must point to a file * successfully opened by gzopen. * @throws ZlibException - * + * */ function gzclose($zp): void { error_clear_last(); $result = \gzclose($zp); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } } @@ -147,26 +147,26 @@ function gzclose($zp): void /** * This function compresses the given string using the ZLIB * data format. - * + * * For details on the ZLIB compression algorithm see the document * "ZLIB Compressed Data Format * Specification version 3.3" (RFC 1950). - * + * * @param string $data The data to compress. * @param int $level The level of compression. Can be given as 0 for no compression up to 9 * for maximum compression. - * + * * If -1 is used, the default compression of the zlib library is used which is 6. * @param int $encoding One of ZLIB_ENCODING_* constants. * @return string The compressed string . * @throws ZlibException - * + * */ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string { error_clear_last(); $result = \gzcompress($data, $level, $encoding); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -176,22 +176,22 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING /** * This function returns a decoded version of the input * data. - * + * * @param string $data The data to decode, encoded by gzencode. * @param int $length The maximum length of data to decode. * @return string The decoded string, . * @throws ZlibException - * + * */ function gzdecode(string $data, int $length = null): string { error_clear_last(); if ($length !== null) { $result = \gzdecode($data, $length); - }else { + } else { $result = \gzdecode($data); } - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -201,11 +201,11 @@ function gzdecode(string $data, int $length = null): string /** * This function compresses the given string using the DEFLATE * data format. - * + * * For details on the DEFLATE compression algorithm see the document * "DEFLATE Compressed Data Format * Specification version 1.3" (RFC 1951). - * + * * @param string $data The data to deflate. * @param int $level The level of compression. Can be given as 0 for no compression up to 9 * for maximum compression. If not given, the default compression level will @@ -213,13 +213,13 @@ function gzdecode(string $data, int $length = null): string * @param int $encoding One of ZLIB_ENCODING_* constants. * @return string The deflated string . * @throws ZlibException - * + * */ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string { error_clear_last(); $result = \gzdeflate($data, $level, $encoding); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -230,34 +230,34 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_ * This function returns a compressed version of the input * data compatible with the output of the * gzip program. - * + * * For more information on the GZIP file format, see the document: * GZIP file format specification * version 4.3 (RFC 1952). - * + * * @param string $data The data to encode. * @param int $level The level of compression. Can be given as 0 for no compression up to 9 * for maximum compression. If not given, the default compression level will * be the default compression level of the zlib library. * @param int $encoding_mode The encoding mode. Can be FORCE_GZIP (the default) * or FORCE_DEFLATE. - * + * * Prior to PHP 5.4.0, using FORCE_DEFLATE results in * a standard zlib deflated string (inclusive zlib headers) after a gzip * file header but without the trailing crc32 checksum. - * + * * In PHP 5.4.0 and later, FORCE_DEFLATE generates * RFC 1950 compliant output, consisting of a zlib header, the deflated * data, and an Adler checksum. * @return string The encoded string, . * @throws ZlibException - * + * */ function gzencode(string $data, int $level = -1, int $encoding_mode = FORCE_GZIP): string { error_clear_last(); $result = \gzencode($data, $level, $encoding_mode); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -266,25 +266,25 @@ function gzencode(string $data, int $level = -1, int $encoding_mode = FORCE_GZIP /** * Gets a (uncompressed) string of up to length - 1 bytes read from the given - * file pointer. Reading ends when length - 1 bytes have been read, on a + * file pointer. Reading ends when length - 1 bytes have been read, on a * newline, or on EOF (whichever comes first). - * + * * @param resource $zp The gz-file pointer. It must be valid, and must point to a file * successfully opened by gzopen. * @param int $length The length of data to get. * @return string The uncompressed string, . * @throws ZlibException - * + * */ function gzgets($zp, int $length = null): string { error_clear_last(); if ($length !== null) { $result = \gzgets($zp, $length); - }else { + } else { $result = \gzgets($zp); } - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -295,25 +295,25 @@ function gzgets($zp, int $length = null): string * Identical to gzgets, except that * gzgetss attempts to strip any HTML and PHP * tags from the text it reads. - * + * * @param resource $zp The gz-file pointer. It must be valid, and must point to a file * successfully opened by gzopen. * @param int $length The length of data to get. - * @param string $allowable_tags You can use this optional parameter to specify tags which should not + * @param string $allowable_tags You can use this optional parameter to specify tags which should not * be stripped. * @return string The uncompressed and stripped string, . * @throws ZlibException - * + * */ function gzgetss($zp, int $length, string $allowable_tags = null): string { error_clear_last(); if ($allowable_tags !== null) { $result = \gzgetss($zp, $length, $allowable_tags); - }else { + } else { $result = \gzgetss($zp, $length); } - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -322,22 +322,22 @@ function gzgetss($zp, int $length, string $allowable_tags = null): string /** * This function inflates a deflated string. - * + * * @param string $data The data compressed by gzdeflate. * @param int $length The maximum length of data to decode. * @return string The original uncompressed data . - * + * * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data + * 32768 times the length of the compressed input data * or more than the optional parameter length. * @throws ZlibException - * + * */ function gzinflate(string $data, int $length = 0): string { error_clear_last(); $result = \gzinflate($data, $length); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -347,19 +347,19 @@ function gzinflate(string $data, int $length = 0): string /** * Reads to EOF on the given gz-file pointer from the current position and * writes the (uncompressed) results to standard output. - * + * * @param resource $zp The gz-file pointer. It must be valid, and must point to a file * successfully opened by gzopen. * @return int The number of uncompressed characters read from gz * and passed through to the input, . * @throws ZlibException - * + * */ function gzpassthru($zp): int { error_clear_last(); $result = \gzpassthru($zp); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -367,19 +367,19 @@ function gzpassthru($zp): int /** - * Sets the file position indicator of the given gz-file pointer to the + * Sets the file position indicator of the given gz-file pointer to the * beginning of the file stream. - * + * * @param resource $zp The gz-file pointer. It must be valid, and must point to a file * successfully opened by gzopen. * @throws ZlibException - * + * */ function gzrewind($zp): void { error_clear_last(); $result = \gzrewind($zp); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } } @@ -387,22 +387,22 @@ function gzrewind($zp): void /** * This function uncompress a compressed string. - * + * * @param string $data The data compressed by gzcompress. * @param int $length The maximum length of data to decode. * @return string The original uncompressed data . - * + * * The function will return an error if the uncompressed data is more than - * 32768 times the length of the compressed input data + * 32768 times the length of the compressed input data * or more than the optional parameter length. * @throws ZlibException - * + * */ function gzuncompress(string $data, int $length = 0): string { error_clear_last(); $result = \gzuncompress($data, $length); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -410,18 +410,18 @@ function gzuncompress(string $data, int $length = 0): string /** - * - * - * @param resource $resource + * + * + * @param resource $resource * @return int Returns number of bytes read so far . * @throws ZlibException - * + * */ function inflate_get_read_len($resource): int { error_clear_last(); $result = \inflate_get_read_len($resource); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -430,17 +430,17 @@ function inflate_get_read_len($resource): int /** * Usually returns either ZLIB_OK or ZLIB_STREAM_END. - * - * @param resource $resource + * + * @param resource $resource * @return int Returns decompression status . * @throws ZlibException - * + * */ function inflate_get_status($resource): int { error_clear_last(); $result = \inflate_get_status($resource); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -449,10 +449,10 @@ function inflate_get_status($resource): int /** * Incrementally inflates encoded data in the specified context. - * + * * Limitation: header information from GZIP compressed data are not made * available. - * + * * @param resource $context A context created with inflate_init. * @param string $encoded_data A chunk of compressed data. * @param int $flush_mode One of ZLIB_BLOCK, @@ -466,13 +466,13 @@ function inflate_get_status($resource): int * detailed description of these constants. * @return string Returns a chunk of uncompressed data, . * @throws ZlibException - * + * */ function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC_FLUSH): string { error_clear_last(); $result = \inflate_add($context, $encoded_data, $flush_mode); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -482,79 +482,79 @@ function inflate_add($context, string $encoded_data, int $flush_mode = ZLIB_SYNC /** * Initialize an incremental inflate context with the specified * encoding. - * + * * @param int $encoding One of the ZLIB_ENCODING_* constants. * @param array $options An associative array which may contain the following elements: - * - * + * + * * level - * - * + * + * * The compression level in range -1..9; defaults to -1. - * - * - * - * + * + * + * + * * memory - * - * + * + * * The compression memory level in range 1..9; defaults to 8. - * - * - * - * + * + * + * + * * window - * - * + * + * * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * - * - * - * + * + * + * + * * strategy - * - * + * + * * One of ZLIB_FILTERED, * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, * ZLIB_FIXED or * ZLIB_DEFAULT_STRATEGY (the default). - * - * - * - * + * + * + * + * * dictionary - * - * + * + * * A string or an array of strings * of the preset dictionary (default: no preset dictionary). - * - * - * - * - * + * + * + * + * + * * The compression level in range -1..9; defaults to -1. - * + * * The compression memory level in range 1..9; defaults to 8. - * + * * The zlib window size (logarithmic) in range 8..15; defaults to 15. - * + * * One of ZLIB_FILTERED, * ZLIB_HUFFMAN_ONLY, ZLIB_RLE, * ZLIB_FIXED or * ZLIB_DEFAULT_STRATEGY (the default). - * + * * A string or an array of strings * of the preset dictionary (default: no preset dictionary). * @return resource Returns an inflate context resource (zlib.inflate) on * success, . * @throws ZlibException - * + * */ function inflate_init(int $encoding, array $options = null) { error_clear_last(); $result = \inflate_init($encoding, $options); - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; @@ -563,25 +563,23 @@ function inflate_init(int $encoding, array $options = null) /** * Uncompress any raw/gzip/zlib encoded data. - * - * @param string $data - * @param int $max_decoded_len + * + * @param string $data + * @param int $max_decoded_len * @return string Returns the uncompressed data, . * @throws ZlibException - * + * */ function zlib_decode(string $data, string $max_decoded_len = null): string { error_clear_last(); if ($max_decoded_len !== null) { $result = \zlib_decode($data, $max_decoded_len); - }else { + } else { $result = \zlib_decode($data); } - if ($result === FALSE) { + if ($result === false) { throw ZlibException::createFromPhpError(); } return $result; } - - diff --git a/generator/composer.json b/generator/composer.json index f25c44d4..fe0907a7 100644 --- a/generator/composer.json +++ b/generator/composer.json @@ -1,20 +1,23 @@ { "name": "thecodingmachine/safe-generator", "description": "Generated the files for thecodingmachine/safe", - "autoload-dev": { + "autoload": { "psr-4": { "Safe\\": "src/" } }, - "require-dev": { + "require": { "php": ">=7.1", "ext-simplexml": "*", - "phpunit/phpunit": "^7", - "phpstan/phpstan": "^0.10.3", - "thecodingmachine/phpstan-strict-rules": "^0.10.3", "phpoffice/phpspreadsheet": "^1.4", "ext-json": "^1.5", "symfony/console": "^4.1.4", + "symfony/process": "^4.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "phpstan/phpstan": "^0.10.3", + "thecodingmachine/phpstan-strict-rules": "^0.10.3", "squizlabs/php_codesniffer": "^3.2", "php-coveralls/php-coveralls": "^2.1" }, diff --git a/generator/composer.lock b/generator/composer.lock index f87a86df..602c7c15 100644 --- a/generator/composer.lock +++ b/generator/composer.lock @@ -4,8 +4,415 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "756f6c8abb65e6f20ebd702be6aa819c", - "packages": [], + "content-hash": "9f8582003710ea6cb31dae5679e8e4f3", + "packages": [ + { + "name": "markbaker/complex", + "version": "1.4.6", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "a78d82ae4e682c3809fc3023d1b0ce654f6ab12b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/a78d82ae4e682c3809fc3023d1b0ce654f6ab12b", + "reference": "a78d82ae4e682c3809fc3023d1b0ce654f6ab12b", + "shasum": "" + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "time": "2018-07-31T08:38:40+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "125f462a718956f37d81305ca0df4f17cef0f3b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/125f462a718956f37d81305ca0df4f17cef0f3b9", + "reference": "125f462a718956f37d81305ca0df4f17cef0f3b9", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "markbaker/complex": "^1.4.1", + "php": "^5.6|^7.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.0", + "friendsofphp/php-cs-fixer": "@stable", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^7.0.0", + "phpunit/phpunit": "^5.7", + "squizlabs/php_codesniffer": "^3.3", + "tecnickcom/tcpdf": "^6.2" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnick.com/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Franck Lefevre", + "homepage": "http://rootslabs.net" + }, + { + "name": "Mark Baker", + "homepage": "http://markbakeruk.net" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2018-08-06T02:58:06+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "symfony/console", + "version": "v4.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/ca80b8ced97cf07390078b29773dc384c39eee1f", + "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-07-26T11:24:31+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/process", + "version": "v4.1.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/86cdb930a6a855b0ab35fb60c1504cb36184f843", + "reference": "86cdb930a6a855b0ab35fb60c1504cb36184f843", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2018-08-03T11:13:38+00:00" + } + ], "packages-dev": [ { "name": "composer/xdebug-handler", @@ -337,101 +744,6 @@ ], "time": "2018-06-13T13:22:40+00:00" }, - { - "name": "markbaker/complex", - "version": "1.4.6", - "source": { - "type": "git", - "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "a78d82ae4e682c3809fc3023d1b0ce654f6ab12b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/a78d82ae4e682c3809fc3023d1b0ce654f6ab12b", - "reference": "a78d82ae4e682c3809fc3023d1b0ce654f6ab12b", - "shasum": "" - }, - "require": { - "php": "^5.6.0|^7.0.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", - "phpcompatibility/php-compatibility": "^8.0", - "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "2.*", - "phpmd/phpmd": "2.*", - "phpunit/phpunit": "^4.8.35|^5.4.0", - "sebastian/phpcpd": "2.*", - "squizlabs/php_codesniffer": "^3.3.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Complex\\": "classes/src/" - }, - "files": [ - "classes/src/functions/abs.php", - "classes/src/functions/acos.php", - "classes/src/functions/acosh.php", - "classes/src/functions/acot.php", - "classes/src/functions/acoth.php", - "classes/src/functions/acsc.php", - "classes/src/functions/acsch.php", - "classes/src/functions/argument.php", - "classes/src/functions/asec.php", - "classes/src/functions/asech.php", - "classes/src/functions/asin.php", - "classes/src/functions/asinh.php", - "classes/src/functions/atan.php", - "classes/src/functions/atanh.php", - "classes/src/functions/conjugate.php", - "classes/src/functions/cos.php", - "classes/src/functions/cosh.php", - "classes/src/functions/cot.php", - "classes/src/functions/coth.php", - "classes/src/functions/csc.php", - "classes/src/functions/csch.php", - "classes/src/functions/exp.php", - "classes/src/functions/inverse.php", - "classes/src/functions/ln.php", - "classes/src/functions/log2.php", - "classes/src/functions/log10.php", - "classes/src/functions/negative.php", - "classes/src/functions/pow.php", - "classes/src/functions/rho.php", - "classes/src/functions/sec.php", - "classes/src/functions/sech.php", - "classes/src/functions/sin.php", - "classes/src/functions/sinh.php", - "classes/src/functions/sqrt.php", - "classes/src/functions/tan.php", - "classes/src/functions/tanh.php", - "classes/src/functions/theta.php", - "classes/src/operations/add.php", - "classes/src/operations/subtract.php", - "classes/src/operations/multiply.php", - "classes/src/operations/divideby.php", - "classes/src/operations/divideinto.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Baker", - "email": "mark@lange.demon.co.uk" - } - ], - "description": "PHP Class for working with complex numbers", - "homepage": "https://github.com/MarkBaker/PHPComplex", - "keywords": [ - "complex", - "mathematics" - ], - "time": "2018-07-31T08:38:40+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.8.1", @@ -1349,137 +1661,50 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" - }, - { - "name": "phpoffice/phpspreadsheet", - "version": "1.4.0", + "version": "0.4.0", "source": { "type": "git", - "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "125f462a718956f37d81305ca0df4f17cef0f3b9" + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/125f462a718956f37d81305ca0df4f17cef0f3b9", - "reference": "125f462a718956f37d81305ca0df4f17cef0f3b9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-dom": "*", - "ext-gd": "*", - "ext-iconv": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-xml": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "ext-zip": "*", - "ext-zlib": "*", - "markbaker/complex": "^1.4.1", - "php": "^5.6|^7.0", - "psr/simple-cache": "^1.0" + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { - "dompdf/dompdf": "^0.8.0", - "friendsofphp/php-cs-fixer": "@stable", - "jpgraph/jpgraph": "^4.0", - "mpdf/mpdf": "^7.0.0", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.3", - "tecnickcom/tcpdf": "^6.2" - }, - "suggest": { - "dompdf/dompdf": "Option for rendering PDF with PDF Writer", - "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", - "mpdf/mpdf": "Option for rendering PDF with PDF Writer", - "tecnick.com/tcpdf": "Option for rendering PDF with PDF Writer" + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { - "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + "phpDocumentor\\Reflection\\": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-2.1-or-later" + "MIT" ], "authors": [ { - "name": "Maarten Balliauw", - "homepage": "http://blog.maartenballiauw.be" - }, - { - "name": "Erik Tilt" - }, - { - "name": "Franck Lefevre", - "homepage": "http://rootslabs.net" - }, - { - "name": "Mark Baker", - "homepage": "http://markbakeruk.net" + "name": "Mike van Riel", + "email": "me@mikevanriel.com" } ], - "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", - "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", - "keywords": [ - "OpenXML", - "excel", - "gnumeric", - "ods", - "php", - "spreadsheet", - "xls", - "xlsx" - ], - "time": "2018-08-06T02:58:06+00:00" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", @@ -1910,16 +2135,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.3.4", + "version": "7.3.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0356331bf62896dc56e3a15030b23b73f38b2935" + "reference": "7b331efabbb628c518c408fdfcaf571156775de2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0356331bf62896dc56e3a15030b23b73f38b2935", - "reference": "0356331bf62896dc56e3a15030b23b73f38b2935", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7b331efabbb628c518c408fdfcaf571156775de2", + "reference": "7b331efabbb628c518c408fdfcaf571156775de2", "shasum": "" }, "require": { @@ -1990,7 +2215,7 @@ "testing", "xunit" ], - "time": "2018-09-05T09:58:53+00:00" + "time": "2018-09-08T15:14:29+00:00" }, { "name": "psr/http-message", @@ -2089,54 +2314,6 @@ ], "time": "2016-10-10T12:19:37+00:00" }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-10-23T01:57:42+00:00" - }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -2814,74 +2991,6 @@ "homepage": "https://symfony.com", "time": "2018-08-08T06:37:38+00:00" }, - { - "name": "symfony/console", - "version": "v4.1.4", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/ca80b8ced97cf07390078b29773dc384c39eee1f", - "reference": "ca80b8ced97cf07390078b29773dc384c39eee1f", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log-implementation": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-07-26T11:24:31+00:00" - }, { "name": "symfony/filesystem", "version": "v4.1.4", @@ -3039,65 +3148,6 @@ ], "time": "2018-08-06T14:22:27+00:00" }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.9.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-08-06T14:22:27+00:00" - }, { "name": "symfony/stopwatch", "version": "v4.1.4", @@ -3348,10 +3398,10 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": [], - "platform-dev": { + "platform": { "php": ">=7.1", "ext-simplexml": "*", "ext-json": "^1.5" - } + }, + "platform-dev": [] } diff --git a/generator/src/GenerateCommand.php b/generator/src/GenerateCommand.php index a5ab20ab..f6d70819 100644 --- a/generator/src/GenerateCommand.php +++ b/generator/src/GenerateCommand.php @@ -6,6 +6,7 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Process\Process; class GenerateCommand extends Command { @@ -50,6 +51,8 @@ protected function execute(InputInterface $input, OutputInterface $output) $fileCreator->createExceptionFile($moduleName); } + $this->runCsFix($output); + // Let's require the generated file to check there is no error. $files = \glob(__DIR__.'/../../generated/*.php'); @@ -66,6 +69,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } // Finally, let's edit the composer.json file + $output->writeln('Editing composer.json'); ComposerJsonEditor::editFiles(\array_values($modules)); } @@ -87,4 +91,16 @@ private function rmGenerated(): void \unlink(__DIR__.'/../doc/entities/generated.ent'); } } + + private function runCsFix(OutputInterface $output): void + { + $process = new Process('vendor/bin/phpcbf', __DIR__.'/../..'); + $process->run(function ($type, $buffer) use ($output) { + if (Process::ERR === $type) { + echo $output->write(''.$buffer.''); + } else { + echo $output->write($buffer); + } + }); + } } diff --git a/generator/src/WritePhpFunction.php b/generator/src/WritePhpFunction.php index 3d11fcc8..a9f814a6 100644 --- a/generator/src/WritePhpFunction.php +++ b/generator/src/WritePhpFunction.php @@ -101,7 +101,7 @@ private function generateExceptionCode(string $moduleName, Method $method) : str $params = $method->getFunctionParam(); if (\count($params) > 0 && $params[0]->getParameter() === 'ch') { return " - if (\$result === FALSE) { + if (\$result === false) { throw CurlException::createFromCurlResource(\$ch); } "; @@ -110,7 +110,7 @@ private function generateExceptionCode(string $moduleName, Method $method) : str $exceptionName = FileCreator::toExceptionName($moduleName); return " - if (\$result === FALSE) { + if (\$result === false) { throw {$exceptionName}::createFromPhpError(); } "; diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 9febe85d..e2025189 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -11,11 +11,12 @@ lib + generated - - + + \ No newline at end of file