Skip to content

Commit 7b4029a

Browse files
authored
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.
1 parent 72e5035 commit 7b4029a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function text(string $label, string $placeholder = '', string $default = '', boo
1919
/**
2020
* Prompt the user for multiline text input.
2121
*/
22-
function textarea(string $label, string $placeholder = '', string $default = '', bool|string $required = false, ?Closure $validate = null, string $hint = '', int $rows = 5, ?Closure $transform = null): string
22+
function textarea(string $label, string $placeholder = '', string $default = '', bool|string $required = false, mixed $validate = null, string $hint = '', int $rows = 5, ?Closure $transform = null): string
2323
{
2424
return (new TextareaPrompt(...func_get_args()))->prompt();
2525
}

0 commit comments

Comments
 (0)