From 7a9822b42b62a1bbcecd87ca04d0754b06aba6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 10 Oct 2018 15:57:59 +0200 Subject: [PATCH] Updating code according to new SVN PHPDoc --- generated/filesystem.php | 8 ++++---- generated/functionsList.php | 2 ++ generated/gmp.php | 20 ++++++++++++++++++++ generated/json.php | 3 ++- generated/opcache.php | 20 ++++++++++++++++++++ generated/password.php | 3 ++- rector-migrate.yml | 2 ++ 7 files changed, 52 insertions(+), 6 deletions(-) diff --git a/generated/filesystem.php b/generated/filesystem.php index a146a618..28b4a1c6 100644 --- a/generated/filesystem.php +++ b/generated/filesystem.php @@ -1131,13 +1131,13 @@ function readlink(string $path): string * @param string $path The path being checked. * * - * Whilst a path must be supplied, the value can be blank or NULL - * In these cases, the value is interpreted as the current directory. + * Whilst a path must be supplied, the value can be an empty string. + * In this case, the value is interpreted as the current directory. * * * - * Whilst a path must be supplied, the value can be blank or NULL - * In these cases, the value is interpreted as the current directory. + * Whilst a path must be supplied, the value can be an empty string. + * In this case, the value is interpreted as the current directory. * @return string Returns the canonicalized absolute pathname on success. The resulting path * will have no symbolic link, /./ or /../ components. Trailing delimiters, * such as \ and /, are also removed. diff --git a/generated/functionsList.php b/generated/functionsList.php index e14d7a57..71b2fdd0 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -200,6 +200,7 @@ 'forward_static_call', 'func_get_arg', 'register_tick_function', + 'gmp_binomial', 'gmp_export', 'gmp_import', 'gmp_random_seed', @@ -580,6 +581,7 @@ 'oci_statement_type', 'oci_unregister_taf_callback', 'opcache_compile_file', + 'opcache_get_status', 'openssl_cipher_iv_length', 'openssl_csr_export_to_file', 'openssl_csr_export', diff --git a/generated/gmp.php b/generated/gmp.php index 1ac8e06b..38b15a46 100644 --- a/generated/gmp.php +++ b/generated/gmp.php @@ -4,6 +4,26 @@ use Safe\Exceptions\GmpException; +/** + * Calculates the binomial coefficient C(n, k). + * + * @param mixed $n 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. + * @param int $k + * @return \\GMP Returns the binomial coefficient C(n, k), . + * @throws GmpException + * + */ +function gmp_binomial($n, int $k): \GMP +{ + error_clear_last(); + $result = \gmp_binomial($n, $k); + if ($result === false) { + throw GmpException::createFromPhpError(); + } + return $result; +} + + /** * Export a GMP number to a binary string * diff --git a/generated/json.php b/generated/json.php index 7b9d6aaa..c5de04e8 100644 --- a/generated/json.php +++ b/generated/json.php @@ -29,7 +29,8 @@ * JSON_FORCE_OBJECT, * JSON_PRESERVE_ZERO_FRACTION, * JSON_UNESCAPED_UNICODE, - * JSON_PARTIAL_OUTPUT_ON_ERROR. The behaviour of these + * JSON_PARTIAL_OUTPUT_ON_ERROR, + * JSON_THROW_ON_ERROR. The behaviour of these * constants is described on the * JSON constants page. * @param int $depth Set the maximum depth. Must be greater than zero. diff --git a/generated/opcache.php b/generated/opcache.php index d27c7789..c3d8f072 100644 --- a/generated/opcache.php +++ b/generated/opcache.php @@ -21,3 +21,23 @@ function opcache_compile_file(string $file): void throw OpcacheException::createFromPhpError(); } } + + +/** + * This function returns state information about the cache instance + * + * @param bool $get_scripts Include script specific state information + * @return array Returns an array of information, optionally containing script specific state information, + * . + * @throws OpcacheException + * + */ +function opcache_get_status(bool $get_scripts = true): array +{ + error_clear_last(); + $result = \opcache_get_status($get_scripts); + if ($result === false) { + throw OpcacheException::createFromPhpError(); + } + return $result; +} diff --git a/generated/password.php b/generated/password.php index 392d0da2..068262e1 100644 --- a/generated/password.php +++ b/generated/password.php @@ -29,7 +29,8 @@ * * * - * PASSWORD_ARGON2I - Use the Argon2 hashing algorithm to create the hash. + * PASSWORD_ARGON2I - Use the Argon2i hashing algorithm to create the hash. + * This algorithm is only available if PHP has been compiled with Argon2i support. * * * diff --git a/rector-migrate.yml b/rector-migrate.yml index bde4c848..a5cd796c 100644 --- a/rector-migrate.yml +++ b/rector-migrate.yml @@ -201,6 +201,7 @@ services: forward_static_call: 'Safe\forward_static_call' func_get_arg: 'Safe\func_get_arg' register_tick_function: 'Safe\register_tick_function' + gmp_binomial: 'Safe\gmp_binomial' gmp_export: 'Safe\gmp_export' gmp_import: 'Safe\gmp_import' gmp_random_seed: 'Safe\gmp_random_seed' @@ -581,6 +582,7 @@ services: oci_statement_type: 'Safe\oci_statement_type' oci_unregister_taf_callback: 'Safe\oci_unregister_taf_callback' opcache_compile_file: 'Safe\opcache_compile_file' + opcache_get_status: 'Safe\opcache_get_status' openssl_cipher_iv_length: 'Safe\openssl_cipher_iv_length' openssl_csr_export_to_file: 'Safe\openssl_csr_export_to_file' openssl_csr_export: 'Safe\openssl_csr_export'