summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/generated/funchand.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/thecodingmachine/safe/generated/funchand.php')
-rw-r--r--vendor/thecodingmachine/safe/generated/funchand.php20
1 files changed, 11 insertions, 9 deletions
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();