/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Console/Fixtures/FakeCommandWithArrayInputPrompting.php
33 строки
819 B
macocci7
[11.x] Fix prompting for missing array arguments on artisan command (#50850)
04 апр 2024, 20:53
Не верифицирован
04 апр 2024, 20:53
29acd21
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Console\Fixtures; use Illuminate\Console\Command; use Illuminate\Contracts\Console\PromptsForMissingInput; use Laravel\Prompts\Prompt; use Laravel\Prompts\TextPrompt; use Symfony\Component\Console\Input\InputInterface; class FakeCommandWithArrayInputPrompting extends Command implements PromptsForMissingInput { protected $signature = 'fake-command-for-testing-array {names* : An array argument}'; public $prompted = false; protected function configurePrompts(InputInterface $input) { Prompt::interactive(true); Prompt::fallbackWhen(true); TextPrompt::fallbackUsing(function () { $this->prompted = true; return 'foo'; }); } public function handle(): int { return self::SUCCESS; } }