@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | { |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - public function connect($host, $username, $password=NULL) |
|
| 16 | + public function connect($host, $username, $password = NULL) |
|
| 17 | 17 | { |
| 18 | 18 | $connection = ssh2_connect($host); |
| 19 | 19 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | public function copy($remoteFile, $localFile) |
| 32 | 32 | { |
| 33 | 33 | $sftp = "ssh2.sftp://$this->sftp"; |
| 34 | - $data = file_get_contents($sftp . $remoteFile); |
|
| 34 | + $data = file_get_contents($sftp.$remoteFile); |
|
| 35 | 35 | if (!$data) { |
| 36 | 36 | throw new \Exception('File can`t be loaded from server'); |
| 37 | 37 | } |
@@ -42,16 +42,16 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $sftp = "ssh2.sftp://$this->sftp"; |
| 44 | 44 | $data = file_get_contents($localFile); |
| 45 | - if (!file_put_contents($sftp . $remoteFile, $data)) { |
|
| 45 | + if (!file_put_contents($sftp.$remoteFile, $data)) { |
|
| 46 | 46 | throw new \Exception('File could not be uploaded to server'); |
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | public function getFilesList($dir) { |
| 51 | - $handle = opendir("ssh2.sftp://$this->sftp" . $dir); |
|
| 51 | + $handle = opendir("ssh2.sftp://$this->sftp".$dir); |
|
| 52 | 52 | $files = array(); |
| 53 | 53 | |
| 54 | - while (false != ($entry = readdir($handle))){ |
|
| 54 | + while (false != ($entry = readdir($handle))) { |
|
| 55 | 55 | $files[] = $entry; |
| 56 | 56 | } |
| 57 | 57 | |