Skip to content

Commit

Permalink
Fixed coding standard violations in the Framework\Filesystem namespac…
Browse files Browse the repository at this point in the history
…e, 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.
  • Loading branch information
dverkade committed Apr 15, 2017
1 parent e3fc5b7 commit 83abc1e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/internal/Magento/Framework/Filesystem/Io/Sftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Filesystem\Io;

/**
Expand All @@ -16,7 +14,6 @@
class Sftp extends AbstractIo
{
const REMOTE_TIMEOUT = 10;

const SSH2_PORT = 22;

/**
Expand Down Expand Up @@ -48,7 +45,9 @@ public function open(array $args = [])
}
$this->_connection = new \phpseclib\Net\SFTP($host, $port, $args['timeout']);
if (!$this->_connection->login($args['username'], $args['password'])) {
throw new \Exception(sprintf("Unable to open SFTP connection as %s@%s", $args['username'], $args['host']));
throw new \Exception(
sprintf("Unable to open SFTP connection as %s@%s", $args['username'], $args['host'])
);
}
}

Expand Down Expand Up @@ -168,7 +167,7 @@ public function cd($dir)
*/
public function read($filename, $destination = null)
{
if (is_null($destination)) {
if ($destination === null) {
$destination = false;
}
return $this->_connection->get($filename, $destination);
Expand Down

0 comments on commit 83abc1e

Please sign in to comment.