public function getExitCodeText() { if (null === ($exitcode = $this->getExitCode())) { return; } return isset(self::$exitCodes[$exitcode]) ? self::$exitCodes[$exitcode] : 'Unknown error'; }
public function run(OutputInterface $output) { foreach ($this->queue as $command) { $process = new Process($command); if ($process->run()) { $output->writeln(sprintf('<error>%s:</error>', $process->getExitCodeText())); $output->writeln(''); $output->writeln(sprintf('<error>%s</error>', $process->getErrorOutput())); return $process->getExitCode(); } else { $output->writeln(sprintf('<info>%s</info>', $process->getExitCodeText())); } } // Ok return 0; }