CraftCli\Support\SshCommand::__toString PHP Method

__toString() public method

Compile the shell command
public __toString ( ) : string
return string
    public function __toString()
    {
        $arguments = ['ssh'];
        if ($this->identityFile) {
            $arguments[] = '-i ' . escapeshellarg($this->identityFile);
        }
        if ($this->port) {
            $arguments[] = '-p ' . $this->port;
        }
        $arguments[] = '-o ConnectTimeout=10';
        $arguments[] = $this->user ? $this->user . '@' . $this->host : $this->host;
        $arguments[] = escapeshellarg($this->command);
        return implode(' ', $arguments);
    }