Laravel\Envoy\Console\SshCommand::getServer PHP Method

getServer() protected method

Get the server from the task container.
protected getServer ( TaskContainer $container ) : string
$container Laravel\Envoy\TaskContainer
return string
    protected function getServer(TaskContainer $container)
    {
        if ($this->argument('name')) {
            return $container->getServer($this->argument('name'));
        } elseif ($container->hasOneServer()) {
            return $container->getFirstServer();
        } else {
            throw new \InvalidArgumentException('Please provide a server name.');
        }
    }