Skip to content

Commit

Permalink
Fix textarea helper method signature. (#159)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
samrap authored Aug 12, 2024
1 parent 72e5035 commit 7b4029a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 7b4029a

Please sign in to comment.