/** * Write a string as warning output. * * @param string $string * @return void */ public function warn($string) { $this->output->writeln("<warning>{$string}</warning>"); }
/** * Output execution status information to the console * * @param OutputInterface|StyleInterface $output * @param ConsoleTask $task * @param int $number The number of the task to be executed * @param int $total The total amount of tasks to be executed */ protected function outputExecutionInfo($output, ConsoleTask $task, $number, $total) { $taskXofY = "Task ({$number}/{$total})"; // Special formatting, if Symfony Style is provided if ($output instanceof StyleInterface) { $output->section($task->getName()); $output->text($task->getDescription()); $output->text($taskXofY); $output->newLine(); return; } // Std. formatting $output->writeln($task->getName()); $output->writeln('--------------------------------'); $output->writeln($task->getDescription()); $output->writeln($taskXofY); $output->writeln(''); }