@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | { |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - public function connect($host, $username, $password=NULL, string $pubkeyfile=NULL, string $privkeyfile=NULL) |
|
| 16 | + public function connect($host, $username, $password = NULL, string $pubkeyfile = NULL, string $privkeyfile = NULL) |
|
| 17 | 17 | { |
| 18 | 18 | $connection = ssh2_connect($host); |
| 19 | 19 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $this->sftp = $sftp; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function connectWithKey($host, $username, string $pubkeyfile, string $privkeyfile, string $passphrase=NULL) |
|
| 31 | + public function connectWithKey($host, $username, string $pubkeyfile, string $privkeyfile, string $passphrase = NULL) |
|
| 32 | 32 | { |
| 33 | 33 | $connection = ssh2_connect($host); |
| 34 | 34 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function copy($remoteFile, $localFile) |
| 43 | 43 | { |
| 44 | 44 | $sftp = "ssh2.sftp://$this->sftp"; |
| 45 | - $data = file_get_contents($sftp . $remoteFile); |
|
| 45 | + $data = file_get_contents($sftp.$remoteFile); |
|
| 46 | 46 | if (!$data) { |
| 47 | 47 | throw new \Exception('File can`t be loaded from server'); |
| 48 | 48 | } |
@@ -53,16 +53,16 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | $sftp = "ssh2.sftp://$this->sftp"; |
| 55 | 55 | $data = file_get_contents($localFile); |
| 56 | - if (!file_put_contents($sftp . $remoteFile, $data)) { |
|
| 56 | + if (!file_put_contents($sftp.$remoteFile, $data)) { |
|
| 57 | 57 | throw new \Exception('File could not be uploaded to server'); |
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | public function getFilesList($dir) { |
| 62 | - $handle = opendir("ssh2.sftp://$this->sftp" . $dir); |
|
| 62 | + $handle = opendir("ssh2.sftp://$this->sftp".$dir); |
|
| 63 | 63 | $files = array(); |
| 64 | 64 | |
| 65 | - while (false != ($entry = readdir($handle))){ |
|
| 65 | + while (false != ($entry = readdir($handle))) { |
|
| 66 | 66 | $files[] = $entry; |
| 67 | 67 | } |
| 68 | 68 | |