Subversion-Projekte lars-tiefland.laravel_shop

Revision

Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Console\View\Components;
4
 
5
use Symfony\Component\Console\Question\ChoiceQuestion;
6
 
7
class Choice extends Component
8
{
9
    /**
10
     * Renders the component using the given arguments.
11
     *
12
     * @param  string  $question
13
     * @param  array<array-key, string>  $choices
14
     * @param  mixed  $default
15
     * @return mixed
16
     */
17
    public function render($question, $choices, $default = null)
18
    {
19
        return $this->usingQuestionHelper(
20
            fn () => $this->output->askQuestion(
21
                new ChoiceQuestion($question, $choices, $default)
22
            ),
23
        );
24
    }
25
}