Skip to content

Commit 612d814

Browse files
minor symfony#61801 [Console] Specify types of interactive question choices (GromNaN)
This PR was merged into the 6.4 branch. Discussion ---------- [Console] Specify types of interactive question choices | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#61122 | License | MIT Passing a non-string value results in a deprecation message when the value is passed to `str_starts_with`. Replace symfony#61123 Commits ------- 802067c [Console] Specify types of interactive question choices
2 parents ef97386 + 802067c commit 612d814

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/Console/Question/ChoiceQuestion.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class ChoiceQuestion extends Question
2626
private string $errorMessage = 'Value "%s" is invalid';
2727

2828
/**
29-
* @param string $question The question to ask to the user
30-
* @param array $choices The list of available choices
31-
* @param string|bool|int|float|null $default The default answer to return
29+
* @param string $question The question to ask to the user
30+
* @param array<string|bool|int|float> $choices The list of available choices
31+
* @param string|bool|int|float|null $default The default answer to return
3232
*/
3333
public function __construct(string $question, array $choices, string|bool|int|float|null $default = null)
3434
{
@@ -44,7 +44,7 @@ public function __construct(string $question, array $choices, string|bool|int|fl
4444
}
4545

4646
/**
47-
* Returns available choices.
47+
* @return array<string|bool|int|float>
4848
*/
4949
public function getChoices(): array
5050
{

0 commit comments

Comments
 (0)