Skip to content

Commit 4166cbc

Browse files
authored
Merge pull request #28 from amazeeio/hotfix/fix-phpcs-errors
Fixes phpcs errors
2 parents eb9ca01 + 8536a0b commit 4166cbc

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/LagoonCommands.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
use Drush\Drush;
88
use Drush\SiteAlias\SiteAliasManagerAwareInterface;
99
use GuzzleHttp\Client;
10+
use Symfony\Component\HttpKernel\Kernel;
1011
use Symfony\Component\Process\Process;
1112
use Symfony\Component\Yaml\Yaml;
12-
use \Symfony\Component\HttpKernel\Kernel;
1313

1414
/**
1515
* Drush integration for Lagoon.
@@ -72,7 +72,7 @@ public function __construct() {
7272
$this->jwt_token = getenv('LAGOON_OVERRIDE_JWT_TOKEN');
7373
$this->projectName = $lagoonyml['project'] ?? '';
7474
$this->ssh_port_timeout = $lagoonyml['ssh_port_timeout'] ?? 30;
75-
75+
7676
// Allow environment variable overrides.
7777
$this->api = getenv('LAGOON_OVERRIDE_API') ?: $this->api;
7878
$this->endpoint = getenv('LAGOON_OVERRIDE_SSH') ?: $this->endpoint;
@@ -188,33 +188,34 @@ public function getJwtToken() {
188188
[$ssh_host, $ssh_port] = explode(":", $this->endpoint);
189189

190190
$args = [
191-
"-p", $ssh_port,
191+
"-p", $ssh_port,
192192
"-o", "ConnectTimeout=5",
193193
"-o", "LogLevel=FATAL",
194194
"-o", "UserKnownHostsFile=/dev/null",
195195
"-o", "StrictHostKeyChecking=no",
196196
];
197197

198198
if ($this->sshKey) {
199-
$args += ["-i", $this->sshKey];
199+
$args += ["-i", $this->sshKey];
200200
}
201201

202202
$cmd = ["ssh", ...$args, "lagoon@$ssh_host", "token"];
203203

204204
$this->logger()->debug("Retrieving token via SSH -" . implode(" ", $cmd));
205205
if (version_compare(Kernel::VERSION, "4.2", "<")) {
206-
// Symfony >= 4.2 only allows the array form of the command parameter
206+
// Symfony >= 4.2 only allows the array form of the command parameter.
207207
$ssh = new Process(implode(" ", $cmd));
208208
}
209209
else {
210210
$ssh = new Process($cmd);
211211
}
212212

213213
$ssh->setTimeout($this->sshTimeout);
214-
214+
215215
try {
216-
$ssh->mustRun();
217-
} catch (ProcessFailedException $exception) {
216+
$ssh->mustRun();
217+
}
218+
catch (ProcessFailedException $exception) {
218219
$this->logger->debug($ssh->getMessage());
219220
}
220221

0 commit comments

Comments
 (0)