File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
lib/internal/Magento/Framework/Filesystem/Io Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- // @codingStandardsIgnoreFile
8
-
9
7
namespace Magento \Framework \Filesystem \Io ;
10
8
11
9
/**
16
14
class Sftp extends AbstractIo
17
15
{
18
16
const REMOTE_TIMEOUT = 10 ;
19
-
20
17
const SSH2_PORT = 22 ;
21
18
22
19
/**
@@ -48,7 +45,9 @@ public function open(array $args = [])
48
45
}
49
46
$ this ->_connection = new \phpseclib \Net \SFTP ($ host , $ port , $ args ['timeout ' ]);
50
47
if (!$ this ->_connection ->login ($ args ['username ' ], $ args ['password ' ])) {
51
- throw new \Exception (sprintf ("Unable to open SFTP connection as %s@%s " , $ args ['username ' ], $ args ['host ' ]));
48
+ throw new \Exception (
49
+ sprintf ("Unable to open SFTP connection as %s@%s " , $ args ['username ' ], $ args ['host ' ])
50
+ );
52
51
}
53
52
}
54
53
@@ -168,7 +167,7 @@ public function cd($dir)
168
167
*/
169
168
public function read ($ filename , $ destination = null )
170
169
{
171
- if (is_null ( $ destination) ) {
170
+ if ($ destination === null ) {
172
171
$ destination = false ;
173
172
}
174
173
return $ this ->_connection ->get ($ filename , $ destination );
You can’t perform that action at this time.
0 commit comments