aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r--apps/federatedfilesharing/lib/AddressHandler.php4
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php2
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php8
-rw-r--r--apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php4
4 files changed, 9 insertions, 9 deletions
diff --git a/apps/federatedfilesharing/lib/AddressHandler.php b/apps/federatedfilesharing/lib/AddressHandler.php
index 7a272781fe6..113978bab82 100644
--- a/apps/federatedfilesharing/lib/AddressHandler.php
+++ b/apps/federatedfilesharing/lib/AddressHandler.php
@@ -106,12 +106,12 @@ class AddressHandler {
\OCP\Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
- array('uid' => &$user1)
+ ['uid' => &$user1]
);
\OCP\Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
- array('uid' => &$user2)
+ ['uid' => &$user2]
);
if ($user1 === $user2) {
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 575e3cdff57..5d44643899a 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -187,7 +187,7 @@ class FederatedShareProvider implements IShareProvider {
$alreadySharedGroup = $this->getSharedWith($shareWith, \OCP\Share::SHARE_TYPE_REMOTE_GROUP, $share->getNode(), 1, 0);
if (!empty($alreadyShared) || !empty($alreadySharedGroup)) {
$message = 'Sharing %1$s failed, because this item is already shared with %2$s';
- $message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with %2$s', array($share->getNode()->getName(), $shareWith));
+ $message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with %2$s', [$share->getNode()->getName(), $shareWith]);
$this->logger->debug(sprintf($message, $share->getNode()->getName(), $shareWith), ['app' => 'Federated File Sharing']);
throw new \Exception($message_t);
}
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index 5df2173263c..70cf11c7672 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -99,7 +99,7 @@ class Notifications {
if ($user && $remote) {
$local = $this->addressHandler->generateRemoteURL();
- $fields = array(
+ $fields = [
'shareWith' => $user,
'token' => $token,
'name' => $name,
@@ -110,7 +110,7 @@ class Notifications {
'sharedByFederatedId' => $sharedByFederatedId,
'remote' => $local,
'shareType' => $shareType
- );
+ ];
$result = $this->tryHttpPostToShareEndpoint($remote, '', $fields);
$status = json_decode($result['result'], true);
@@ -144,12 +144,12 @@ class Notifications {
*/
public function requestReShare($token, $id, $shareId, $remote, $shareWith, $permission, $filename) {
- $fields = array(
+ $fields = [
'shareWith' => $shareWith,
'token' => $token,
'permission' => $permission,
'remoteId' => $shareId,
- );
+ ];
$ocmFields = $fields;
$ocmFields['remoteId'] = $id;
diff --git a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
index e2e2f26ad3a..c87d4e273fc 100644
--- a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
@@ -215,7 +215,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
- array('uid' => &$shareWith)
+ ['uid' => &$shareWith]
);
$this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']);
@@ -774,7 +774,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
} catch (NotFoundException $e) {
$file = null;
}
- $args = Filesystem::is_dir($file) ? array('dir' => $file) : array('dir' => dirname($file), 'scrollto' => $file);
+ $args = Filesystem::is_dir($file) ? ['dir' => $file] : ['dir' => dirname($file), 'scrollto' => $file];
$link = Util::linkToAbsolute('files', 'index.php', $args);
return [$file, $link];