diff --git a/src/MultiSelectPrompt.php b/src/MultiSelectPrompt.php index 2142a0c2..8886c763 100644 --- a/src/MultiSelectPrompt.php +++ b/src/MultiSelectPrompt.php @@ -34,7 +34,7 @@ class MultiSelectPrompt extends Prompt protected array $values = []; /** - * Create a new SelectPrompt instance. + * Create a new MultiSelectPrompt instance. * * @param array|Collection $options * @param array|Collection $default diff --git a/src/SearchPrompt.php b/src/SearchPrompt.php index 36a365bb..6328d634 100644 --- a/src/SearchPrompt.php +++ b/src/SearchPrompt.php @@ -22,7 +22,7 @@ class SearchPrompt extends Prompt protected ?array $matches = null; /** - * Create a new SuggestPrompt instance. + * Create a new SearchPrompt instance. * * @param Closure(string): array $options */ @@ -44,6 +44,9 @@ public function __construct( }); } + /** + * Perform the search. + */ protected function search(): void { $this->state = 'searching'; @@ -115,11 +118,17 @@ protected function highlightNext(): void } } + /** + * Get the current search query. + */ public function searchValue(): string { return $this->typedValue; } + /** + * Get the selected value. + */ public function value(): int|string|null { if ($this->matches === null || $this->highlighted === null) { diff --git a/src/Themes/Default/Concerns/DrawsScrollbars.php b/src/Themes/Default/Concerns/DrawsScrollbars.php index ecfa92ca..84e4811d 100644 --- a/src/Themes/Default/Concerns/DrawsScrollbars.php +++ b/src/Themes/Default/Concerns/DrawsScrollbars.php @@ -10,7 +10,7 @@ trait DrawsScrollbars * Scroll the given lines. * * @param \Illuminate\Support\Collection $lines - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ protected function scroll(Collection $lines, ?int $focused, int $height, int $width, string $color = 'cyan'): Collection { @@ -32,7 +32,7 @@ protected function scroll(Collection $lines, ?int $focused, int $height, int $wi * Get a scrolled version of the items. * * @param \Illuminate\Support\Collection $lines - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection */ protected function visible(Collection $lines, ?int $focused, int $height): Collection {