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 /lib/private/Files/Storage | |
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 'lib/private/Files/Storage')
-rw-r--r-- | lib/private/Files/Storage/Common.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Storage/DAV.php | 6 | ||||
-rw-r--r-- | lib/private/Files/Storage/Local.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Storage/Temporary.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 6 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Wrapper.php | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 8760fae1185..c976174f8cf 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -296,7 +296,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { * @return array */ protected function searchInDir($query, $dir = '') { - $files = array(); + $files = []; $dh = $this->opendir($dir); if (is_resource($dh)) { while (($item = readdir($dh)) !== false) { @@ -434,7 +434,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage { $path = '/' . $path; } - $output = array(); + $output = []; foreach (explode('/', $path) as $chunk) { if ($chunk == '..') { array_pop($output); diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index 625e5f3f625..970f3f8c156 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -265,7 +265,7 @@ class DAV extends Common { try { $response = $this->client->propFind( $this->encodePath($path), - array( + [ '{DAV:}getlastmodified', '{DAV:}getcontentlength', '{DAV:}getcontenttype', @@ -273,7 +273,7 @@ class DAV extends Common { '{http://open-collaboration-services.org/ns}share-permissions', '{DAV:}resourcetype', '{DAV:}getetag', - ) + ] ); $this->statCache->set($path, $response); } catch (ClientHttpException $e) { @@ -591,7 +591,7 @@ class DAV extends Common { } catch (\Exception $e) { $this->convertException($e, $path); } - return array(); + return []; } /** {@inheritdoc} */ diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 13a3ca87097..e186d29c348 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -107,7 +107,7 @@ class Local extends \OC\Files\Storage\Common { * @var \SplFileInfo $file */ $file = $it->current(); - if (in_array($file->getBasename(), array('.', '..'))) { + if (in_array($file->getBasename(), ['.', '..'])) { $it->next(); continue; } elseif ($file->isDir()) { @@ -340,7 +340,7 @@ class Local extends \OC\Files\Storage\Common { * @return array */ protected function searchInDir($query, $dir = '') { - $files = array(); + $files = []; $physicalDir = $this->getSourcePath($dir); foreach (scandir($physicalDir) as $item) { if (\OC\Files\Filesystem::isIgnoredDir($item)) diff --git a/lib/private/Files/Storage/Temporary.php b/lib/private/Files/Storage/Temporary.php index bb501cb5565..2e1d1e33bef 100644 --- a/lib/private/Files/Storage/Temporary.php +++ b/lib/private/Files/Storage/Temporary.php @@ -30,7 +30,7 @@ namespace OC\Files\Storage; */ class Temporary extends Local{ public function __construct($arguments = null) { - parent::__construct(array('datadir' => \OC::$server->getTempManager()->getTemporaryFolder())); + parent::__construct(['datadir' => \OC::$server->getTempManager()->getTemporaryFolder()]); } public function cleanUp() { diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index 68cf6f99ee5..cbe9b874501 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -87,7 +87,7 @@ class Encryption extends Wrapper { private $mountManager; /** @var array remember for which path we execute the repair step to avoid recursions */ - private $fixUnencryptedSizeOf = array(); + private $fixUnencryptedSizeOf = []; /** @var ArrayCache */ private $arrayCache; @@ -125,7 +125,7 @@ class Encryption extends Wrapper { $this->uid = $uid; $this->fileHelper = $fileHelper; $this->keyStorage = $keyStorage; - $this->unencryptedSize = array(); + $this->unencryptedSize = []; $this->update = $update; $this->mountManager = $mountManager; $this->arrayCache = $arrayCache; @@ -892,7 +892,7 @@ class Encryption extends Wrapper { * @return array */ protected function parseRawHeader($rawHeader) { - $result = array(); + $result = []; if (substr($rawHeader, 0, strlen(Util::HEADER_START)) === Util::HEADER_START) { $header = $rawHeader; $endAt = strpos($header, Util::HEADER_END); diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index 7cb24f9b5b6..3030fa8c7ef 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -503,7 +503,7 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea * @return mixed */ public function __call($method, $args) { - return call_user_func_array(array($this->getWrapperStorage(), $method), $args); + return call_user_func_array([$this->getWrapperStorage(), $method], $args); } /** |