/**
  * Runs a command.
  *
  * @param InputInterface  $input  The input manager.
  * @Param OutputInterface &$output The output manager.
  *
  * @return integer The exit status.
  */
 protected function runCommand(InputInterface $input, OutputInterface &$output = null)
 {
     if (null === $output) {
         $output = new StreamOutput(fopen('php://memory', 'r+'));
     }
     $handler = $this->app->getContainer()->get('box.logger.default_handler');
     if ($handler instanceof ConsoleOutputHandler) {
         $handler->setOutput($output);
     }
     return $this->app->run($input, $output);
 }