@@ -187,6 +187,10 @@ discard block |
||
| 187 | 187 | $this->initialized = true; |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | + /** |
|
| 191 | + * @param string|null $directory |
|
| 192 | + * @param boolean $create |
|
| 193 | + */ |
|
| 190 | 194 | protected function ensureDirectoryExists($directory, $create) |
| 191 | 195 | { |
| 192 | 196 | $pwd = $this->sftp->pwd(); |
@@ -201,6 +205,9 @@ discard block |
||
| 201 | 205 | } |
| 202 | 206 | } |
| 203 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $key |
|
| 210 | + */ |
|
| 204 | 211 | protected function computePath($key) |
| 205 | 212 | { |
| 206 | 213 | return $this->directory.'/'.ltrim($key, '/'); |
@@ -8,8 +8,8 @@ |
||
| 8 | 8 | use phpseclib\Net\SFTP as SecLibSFTP; |
| 9 | 9 | |
| 10 | 10 | class PhpseclibSftp implements Adapter, |
| 11 | - FileFactory, |
|
| 12 | - ListKeysAware |
|
| 11 | + FileFactory, |
|
| 12 | + ListKeysAware |
|
| 13 | 13 | { |
| 14 | 14 | protected $sftp; |
| 15 | 15 | protected $directory; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public static function unexpectedFailure($action, array $args, \Exception $previous = null) |
| 24 | 24 | { |
| 25 | - $args = array_map(function ($k, $v) { |
|
| 25 | + $args = array_map(function($k, $v) { |
|
| 26 | 26 | $v = is_string($v) ? '"'.$v.'"' : $v; |
| 27 | 27 | |
| 28 | 28 | return "{$k}: {$v}"; |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | public function keys() |
| 96 | 96 | { |
| 97 | 97 | try { |
| 98 | - return array_map(function ($content) { |
|
| 98 | + return array_map(function($content) { |
|
| 99 | 99 | return $content['path']; |
| 100 | 100 | }, $this->adapter->listContents()); |
| 101 | 101 | } catch (\Exception $e) { |