From 98a1a27d2ae89fd33c17eca036120d0b1bf16ce2 Mon Sep 17 00:00:00 2001 From: Sam Rapaport Date: Sat, 10 Aug 2024 01:52:03 -0700 Subject: [PATCH] Fix textarea helper method signature. 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(); }