Skip to content

Commit

Permalink
Docblock fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Aug 11, 2023
1 parent 76b5428 commit a109cc5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/MultiSelectPrompt.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MultiSelectPrompt extends Prompt
protected array $values = [];

/**
* Create a new SelectPrompt instance.
* Create a new MultiSelectPrompt instance.
*
* @param array<int|string, string>|Collection<int|string, string> $options
* @param array<int|string>|Collection<int, int|string> $default
Expand Down
11 changes: 10 additions & 1 deletion src/SearchPrompt.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<int|string, string> $options
*/
Expand All @@ -44,6 +44,9 @@ public function __construct(
});
}

/**
* Perform the search.
*/
protected function search(): void
{
$this->state = 'searching';
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/Themes/Default/Concerns/DrawsScrollbars.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trait DrawsScrollbars
* Scroll the given lines.
*
* @param \Illuminate\Support\Collection<int, string> $lines
* @return \Illuminate\Support\Collection<int, string>
* @return \Illuminate\Support\Collection<int, string>
*/
protected function scroll(Collection $lines, ?int $focused, int $height, int $width, string $color = 'cyan'): Collection
{
Expand All @@ -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<int, string> $lines
* @return \Illuminate\Support\Collection<int, string>
* @return \Illuminate\Support\Collection<int, string>
*/
protected function visible(Collection $lines, ?int $focused, int $height): Collection
{
Expand Down

0 comments on commit a109cc5

Please sign in to comment.