addArgument('text', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'What to do'); } protected function execute(InputInterface $input, OutputInterface $output): int { $n = $this->tasks->add(implode(' ', (array)$input->getArgument('text'))); $output->writeln("Task $n added."); return Command::SUCCESS; } }