From 7b4029a84c37cb2725fc7f011586e2997040bc95 Mon Sep 17 00:00:00 2001 From: Sam Rapaport Date: Mon, 12 Aug 2024 15:06:33 -0700 Subject: [PATCH] Fix textarea helper method signature. (#159) The signature previously (incorrectly) typed the `$validate` parameter as a nullable Closure. The upstream signature declares the parameter as mixed, same as the other prompt types. --- src/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers.php b/src/helpers.php index d85010c..65545e0 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -19,7 +19,7 @@ function text(string $label, string $placeholder = '', string $default = '', boo /** * Prompt the user for multiline text input. */ - function textarea(string $label, string $placeholder = '', string $default = '', bool|string $required = false, ?Closure $validate = null, string $hint = '', int $rows = 5, ?Closure $transform = null): string + function textarea(string $label, string $placeholder = '', string $default = '', bool|string $required = false, mixed $validate = null, string $hint = '', int $rows = 5, ?Closure $transform = null): string { return (new TextareaPrompt(...func_get_args()))->prompt(); }