From f240b388e1cd5f30622daff79e47417771f5b09a Mon Sep 17 00:00:00 2001 From: Joe Tannenbaum Date: Tue, 30 Jan 2024 21:06:38 -0500 Subject: [PATCH] changed visiblity of validate property --- src/TextareaPrompt.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TextareaPrompt.php b/src/TextareaPrompt.php index 9228d795..a701a2cc 100644 --- a/src/TextareaPrompt.php +++ b/src/TextareaPrompt.php @@ -22,7 +22,7 @@ public function __construct( public string $placeholder = '', public string $default = '', public bool|string $required = false, - public ?Closure $validate = null, + protected ?Closure $validate = null, public string $hint = '' ) { $this->trackTypedValue( @@ -214,7 +214,7 @@ protected function calculateCursorOffset(): void { $this->cursorOffset = 0; - preg_match_all('/\S{'.$this->width.',}/u', $this->value(), $matches, PREG_OFFSET_CAPTURE); + preg_match_all('/\S{' . $this->width . ',}/u', $this->value(), $matches, PREG_OFFSET_CAPTURE); foreach ($matches[0] as $match) { if ($this->cursorPosition + $this->cursorOffset >= $match[1] + mb_strwidth($match[0])) {