Skip to content

Commit 6bbc67d

Browse files
committed
Update SecLibGateway.php
1 parent 84a6e14 commit 6bbc67d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/SecLibGateway.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
namespace Collective\Remote;
44

5-
use Illuminate\Filesystem\Filesystem;
6-
use phpseclib\Crypt\RSA;
75
use phpseclib\Net\SFTP;
86
use phpseclib\Net\SSH2;
7+
use phpseclib\Crypt\RSA;
8+
use Illuminate\Support\Arr;
9+
use Illuminate\Support\Str;
910
use phpseclib\System\SSH\Agent;
11+
use Illuminate\Filesystem\Filesystem;
1012

1113
class SecLibGateway implements GatewayInterface
1214
{
@@ -77,7 +79,7 @@ public function __construct($host, array $auth, Filesystem $files, $timeout)
7779
*/
7880
protected function setHostAndPort($host)
7981
{
80-
if (!str_contains($host, ':')) {
82+
if (!Str::contains($host, ':')) {
8183
$this->host = $host;
8284
} else {
8385
list($this->host, $this->port) = explode(':', $host);
@@ -198,7 +200,7 @@ protected function loadRsaKey(array $auth)
198200
*/
199201
protected function getKey(array $auth)
200202
{
201-
with($key = $this->getNewKey())->setPassword(array_get($auth, 'keyphrase'));
203+
with($key = $this->getNewKey())->setPassword(Arr::get($auth, 'keyphrase'));
202204

203205
return $key;
204206
}

0 commit comments

Comments
 (0)