protected function setOutput(Connection $connection) { $output = php_sapi_name() == 'cli' ? new ConsoleOutput() : new NullOutput(); $connection->setOutput($output); }