Skip to content

Commit 83abc1e

Browse files
committed
Fixed coding standard violations in the Framework\Filesystem namespace, so that it will be checked bij PHP CS and no longer be ignored while doing CI checks. Made the following changes:
- Removed @codingStandardsIgnoreFile - Fixed number of chars per line - Removed the is_null function in order to do a normal compare.
1 parent e3fc5b7 commit 83abc1e

File tree

1 file changed

+4
-5
lines changed
  • lib/internal/Magento/Framework/Filesystem/Io

1 file changed

+4
-5
lines changed

lib/internal/Magento/Framework/Filesystem/Io/Sftp.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Framework\Filesystem\Io;
108

119
/**
@@ -16,7 +14,6 @@
1614
class Sftp extends AbstractIo
1715
{
1816
const REMOTE_TIMEOUT = 10;
19-
2017
const SSH2_PORT = 22;
2118

2219
/**
@@ -48,7 +45,9 @@ public function open(array $args = [])
4845
}
4946
$this->_connection = new \phpseclib\Net\SFTP($host, $port, $args['timeout']);
5047
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+
);
5251
}
5352
}
5453

@@ -168,7 +167,7 @@ public function cd($dir)
168167
*/
169168
public function read($filename, $destination = null)
170169
{
171-
if (is_null($destination)) {
170+
if ($destination === null) {
172171
$destination = false;
173172
}
174173
return $this->_connection->get($filename, $destination);

0 commit comments

Comments
 (0)