Skip to content

Commit 5b2e49f

Browse files
committed
Because style is nice, and timeout before host
1 parent dbc68df commit 5b2e49f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/SecLibGateway.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public function __construct($host, array $auth, Filesystem $files, $timeout)
6666
{
6767
$this->auth = $auth;
6868
$this->files = $files;
69-
$this->setHostAndPort($host);
7069
$this->setTimeout($timeout);
70+
$this->setHostAndPort($host);
7171
}
7272

7373
/**
@@ -86,7 +86,7 @@ protected function setHostAndPort($host)
8686

8787
if (!filter_var($host, FILTER_VALIDATE_IP) && Str::contains($host, ':')) {
8888
$this->host = Str::beforeLast($host, ':');
89-
$this->port = (int)Str::afterLast($host, ':');
89+
$this->port = (int) Str::afterLast($host, ':');
9090
}
9191

9292
if (filter_var($this->host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {

tests/RemoteSecLibTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function getGateway($host = '127.0.0.1:22')
105105
$files = m::mock('Illuminate\Filesystem\Filesystem');
106106
$files->shouldReceive('get')->with('keypath')->andReturn('keystuff');
107107
$gateway = m::mock('Collective\Remote\SecLibGateway[!setTimeout]', [
108-
'127.0.0.1:22',
108+
$host,
109109
['username' => 'taylor', 'key' => 'keypath', 'keyphrase' => 'keyphrase'],
110110
$files,
111111
10,

0 commit comments

Comments
 (0)