summaryrefslogtreecommitdiffstats
path: root/lib/private/Encryption
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Encryption')
-rw-r--r--lib/private/Encryption/DecryptAll.php2
-rw-r--r--lib/private/Encryption/File.php6
-rw-r--r--lib/private/Encryption/Manager.php4
-rw-r--r--lib/private/Encryption/Update.php4
-rw-r--r--lib/private/Encryption/Util.php8
5 files changed, 12 insertions, 12 deletions
diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php
index f7351ec1bed..63eb40dd098 100644
--- a/lib/private/Encryption/DecryptAll.php
+++ b/lib/private/Encryption/DecryptAll.php
@@ -208,7 +208,7 @@ class DecryptAll {
protected function decryptUsersFiles($uid, ProgressBar $progress, $userCount) {
$this->setupUserFS($uid);
- $directories = array();
+ $directories = [];
$directories[] = '/' . $uid . '/files';
while ($root = array_pop($directories)) {
diff --git a/lib/private/Encryption/File.php b/lib/private/Encryption/File.php
index 1c71ec7dd95..0fc9dcc6866 100644
--- a/lib/private/Encryption/File.php
+++ b/lib/private/Encryption/File.php
@@ -71,10 +71,10 @@ class File implements \OCP\Encryption\IFile {
list($owner, $ownerPath) = $this->util->getUidAndFilename($path);
// always add owner to the list of users with access to the file
- $userIds = array($owner);
+ $userIds = [$owner];
if (!$this->util->isFile($owner . '/' . $ownerPath)) {
- return array('users' => $userIds, 'public' => false);
+ return ['users' => $userIds, 'public' => false];
}
$ownerPath = substr($ownerPath, strlen('/files'));
@@ -121,7 +121,7 @@ class File implements \OCP\Encryption\IFile {
// Remove duplicate UIDs
$uniqueUserIds = array_unique($userIds);
- return array('users' => $uniqueUserIds, 'public' => $public);
+ return ['users' => $uniqueUserIds, 'public' => $public];
}
}
diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php
index 183db55c7ea..c75210564d6 100644
--- a/lib/private/Encryption/Manager.php
+++ b/lib/private/Encryption/Manager.php
@@ -68,7 +68,7 @@ class Manager implements IManager {
* @param ArrayCache $arrayCache
*/
public function __construct(IConfig $config, ILogger $logger, IL10N $l10n, View $rootView, Util $util, ArrayCache $arrayCache) {
- $this->encryptionModules = array();
+ $this->encryptionModules = [];
$this->config = $config;
$this->logger = $logger;
$this->l = $l10n;
@@ -248,7 +248,7 @@ class Manager implements IManager {
// If encryption is disabled and there are no loaded modules it makes no sense to load the wrapper
if (!empty($this->encryptionModules) || $this->isEnabled()) {
$encryptionWrapper = new EncryptionWrapper($this->arrayCache, $this, $this->logger);
- Filesystem::addStorageWrapper('oc_encryption', array($encryptionWrapper, 'wrapStorage'), 2);
+ Filesystem::addStorageWrapper('oc_encryption', [$encryptionWrapper, 'wrapStorage'], 2);
}
}
diff --git a/lib/private/Encryption/Update.php b/lib/private/Encryption/Update.php
index 3bb7680989b..4f4d9555fd4 100644
--- a/lib/private/Encryption/Update.php
+++ b/lib/private/Encryption/Update.php
@@ -158,7 +158,7 @@ class Update {
throw new \InvalidArgumentException('No file found for ' . $info->getId());
}
- return array($owner, $path);
+ return [$owner, $path];
}
/**
@@ -181,7 +181,7 @@ class Update {
if ($this->view->is_dir($path)) {
$allFiles = $this->util->getAllFiles($path);
} else {
- $allFiles = array($path);
+ $allFiles = [$path];
}
diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php
index b173d1eae5c..98652e1ecc5 100644
--- a/lib/private/Encryption/Util.php
+++ b/lib/private/Encryption/Util.php
@@ -164,8 +164,8 @@ class Util {
* @return array with list of files relative to the users files folder
*/
public function getAllFiles($dir) {
- $result = array();
- $dirList = array($dir);
+ $result = [];
+ $dirList = [$dir];
while ($dirList) {
$dir = array_pop($dirList);
@@ -239,7 +239,7 @@ class Util {
$ownerPath = implode('/', array_slice($parts, 2));
- return array($uid, Filesystem::normalizePath($ownerPath));
+ return [$uid, Filesystem::normalizePath($ownerPath)];
}
@@ -325,7 +325,7 @@ class Util {
* @return boolean
*/
private function isMountPointApplicableToUser($mount, $uid) {
- $acceptedUids = array('all', $uid);
+ $acceptedUids = ['all', $uid];
// check if mount point is applicable for the user
$intersection = array_intersect($acceptedUids, $mount['applicable']['users']);
if (!empty($intersection)) {