diff options
Diffstat (limited to 'apps/files_external/lib/Lib/Storage/SFTP.php')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index 5d83bf253e4..eaead3eea45 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -251,8 +251,8 @@ class SFTP extends \OC\Files\Storage\Common { try { $keyPath = $this->hostKeysPath(); if (file_exists($keyPath)) { - $hosts = array(); - $keys = array(); + $hosts = []; + $keys = []; $lines = file($keyPath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if ($lines) { foreach ($lines as $line) { @@ -267,7 +267,7 @@ class SFTP extends \OC\Files\Storage\Common { } } catch (\Exception $e) { } - return array(); + return []; } /** @@ -307,7 +307,7 @@ class SFTP extends \OC\Files\Storage\Common { } $id = md5('sftp:' . $path); - $dirStream = array(); + $dirStream = []; foreach($list as $file) { if ($file !== '.' && $file !== '..') { $dirStream[] = $file; @@ -391,7 +391,7 @@ class SFTP extends \OC\Files\Storage\Common { case 'x+': case 'c': case 'c+': - $context = stream_context_create(array('sftp' => array('session' => $this->getConnection()))); + $context = stream_context_create(['sftp' => ['session' => $this->getConnection()]]); $handle = fopen($this->constructUrl($path), $mode, false, $context); return RetryWrapper::wrap($handle); } @@ -464,7 +464,7 @@ class SFTP extends \OC\Files\Storage\Common { $mtime = $stat ? $stat['mtime'] : -1; $size = $stat ? $stat['size'] : 0; - return array('mtime' => $mtime, 'size' => $size, 'ctime' => -1); + return ['mtime' => $mtime, 'size' => $size, 'ctime' => -1]; } catch (\Exception $e) { return false; } |