Composer Workspace global packages
This commit is contained in:
16
vendor/symfony/console/Helper/QuestionHelper.php
vendored
16
vendor/symfony/console/Helper/QuestionHelper.php
vendored
@@ -68,9 +68,7 @@ class QuestionHelper extends Helper
|
||||
return $this->doAsk($output, $question);
|
||||
}
|
||||
|
||||
$interviewer = function () use ($output, $question) {
|
||||
return $this->doAsk($output, $question);
|
||||
};
|
||||
$interviewer = fn () => $this->doAsk($output, $question);
|
||||
|
||||
return $this->validateAttempts($interviewer, $output, $question);
|
||||
} catch (MissingInputException $exception) {
|
||||
@@ -91,6 +89,8 @@ class QuestionHelper extends Helper
|
||||
|
||||
/**
|
||||
* Prevents usage of stty.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function disableStty()
|
||||
{
|
||||
@@ -170,7 +170,7 @@ class QuestionHelper extends Helper
|
||||
}
|
||||
|
||||
if ($validator = $question->getValidator()) {
|
||||
return \call_user_func($question->getValidator(), $default);
|
||||
return \call_user_func($validator, $default);
|
||||
} elseif ($question instanceof ChoiceQuestion) {
|
||||
$choices = $question->getChoices();
|
||||
|
||||
@@ -190,6 +190,8 @@ class QuestionHelper extends Helper
|
||||
|
||||
/**
|
||||
* Outputs the question prompt.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function writePrompt(OutputInterface $output, Question $question)
|
||||
{
|
||||
@@ -226,6 +228,8 @@ class QuestionHelper extends Helper
|
||||
|
||||
/**
|
||||
* Outputs an error message.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function writeError(OutputInterface $output, \Exception $error)
|
||||
{
|
||||
@@ -325,9 +329,7 @@ class QuestionHelper extends Helper
|
||||
|
||||
$matches = array_filter(
|
||||
$autocomplete($ret),
|
||||
function ($match) use ($ret) {
|
||||
return '' === $ret || str_starts_with($match, $ret);
|
||||
}
|
||||
fn ($match) => '' === $ret || str_starts_with($match, $ret)
|
||||
);
|
||||
$numMatches = \count($matches);
|
||||
$ofs = -1;
|
||||
|
||||
Reference in New Issue
Block a user