/**
  * @param $name
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @return Client
  */
 protected function createClient($name, InputInterface $input, OutputInterface $output)
 {
     $that = $this;
     $client = new Client($name);
     $client->registerLogger(function ($text, $args) use($that, $output) {
         $that->log($output, array_merge([$text], $args));
     });
     $client->onError(function (\Exception $e, Client $client) {
         $client->logException($e);
     });
     unset($input);
     return $client;
 }