diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /apps/files_external/lib/Lib/Storage/SFTP.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
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; } |