public function run(InputInterface $input = null, OutputInterface $output = null)
{
if (null === $input) {
$input = new ArgvInput();
}
if (null === $output) {
$output = new ConsoleOutput();
}
$this->_addOutputStyles($output);
if ($output instanceof ConsoleOutput) {
$this->_addOutputStyles($output->getErrorOutput());
}
$this->configureIO($input, $output);
try {
$this->init(array(), $input, $output);
} catch (Exception $e) {
$output = new ConsoleOutput();
$this->renderException($e, $output->getErrorOutput());
}
$return = parent::run($input, $output);
// Fix for no return values -> used in interactive shell to prevent error output
if ($return === null) {
return 0;
}
return $return;
}