From 80d3db1dcf8fe9ca66d4e3f2e2116d3bc39ae2b4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 12 Jul 2022 22:26:21 +0300 Subject: upgrade idiorm to php8.1-patched version (aaronpk/idiorm) --- vendor/thecodingmachine/safe/generated/funchand.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'vendor/thecodingmachine/safe/generated/funchand.php') diff --git a/vendor/thecodingmachine/safe/generated/funchand.php b/vendor/thecodingmachine/safe/generated/funchand.php index 64654526e..4b2a7b8ff 100644 --- a/vendor/thecodingmachine/safe/generated/funchand.php +++ b/vendor/thecodingmachine/safe/generated/funchand.php @@ -5,12 +5,14 @@ namespace Safe; use Safe\Exceptions\FunchandException; /** - * Creates an anonymous function from the parameters passed, and - * returns a unique name for it. + * Creates a function dynamically from the parameters passed, and returns a unique name for it. * - * @param string $args The function arguments. + * @param string $args The function arguments, as a single comma-separated string. * @param string $code The function code. * @return string Returns a unique function name as a string. + * Note that the name contains a non-printable character ("\0"), + * so care should be taken when printing the name or incorporating it in any other + * string. * @throws FunchandException * */ @@ -28,18 +30,18 @@ function create_function(string $args, string $code): string /** * * - * @param callable(): void $function The function to register. - * @param mixed $params + * @param callable(): void $callback The function to register. + * @param mixed $args * @throws FunchandException * */ -function register_tick_function(callable $function, ...$params): void +function register_tick_function(callable $callback, ...$args): void { error_clear_last(); - if ($params !== []) { - $result = \register_tick_function($function, ...$params); + if ($args !== []) { + $result = \register_tick_function($callback, ...$args); } else { - $result = \register_tick_function($function); + $result = \register_tick_function($callback); } if ($result === false) { throw FunchandException::createFromPhpError(); -- cgit v1.2.3-54-g00ecf