aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2024-08-23 15:10:27 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2024-08-25 19:34:58 +0200
commitaf6de04e9e141466dc229e444ff3f146f4a34765 (patch)
tree7b93f521865cdecdadb33637dea33bea242e7969 /apps/federatedfilesharing/lib
parent1cc6b3577fdbeadece7e4e6478e7f7755555b41a (diff)
downloadnextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.tar.gz
nextcloud-server-af6de04e9e141466dc229e444ff3f146f4a34765.zip
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r--apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php1
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php4
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php14
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php2
-rw-r--r--apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php2
-rw-r--r--apps/federatedfilesharing/lib/Settings/Admin.php4
-rw-r--r--apps/federatedfilesharing/lib/Settings/Personal.php4
-rw-r--r--apps/federatedfilesharing/lib/Settings/PersonalSection.php4
8 files changed, 18 insertions, 17 deletions
diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
index b5b5806d335..0cfc3dba262 100644
--- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
+++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
@@ -64,6 +64,7 @@ class MountPublicLinkController extends Controller {
* @param string $token Token of the share
* @param string $password Password of the share
* @return JSONResponse<Http::STATUS_OK, array{remoteUrl: string}, array{}>|JSONResponse<Http::STATUS_BAD_REQUEST, array{message: string}, array{}>
+ *
* 200: Remote URL returned
* 400: Creating share is not possible
*/
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
index 5edb80b016b..71661efa384 100644
--- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
+++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
@@ -51,7 +51,7 @@ class RequestHandlerController extends OCSController {
/** @var AddressHandler */
private $addressHandler;
- /** @var IUserManager */
+ /** @var IUserManager */
private $userManager;
/** @var string */
@@ -441,7 +441,7 @@ class RequestHandlerController extends OCSController {
throw new OCSException('Server does not support federated cloud sharing', 503);
}
- $newRemoteId = (string) ($remote_id ?? $id);
+ $newRemoteId = (string)($remote_id ?? $id);
$cloudId = $this->cloudIdManager->resolveCloudId($remote);
$qb = $this->connection->getQueryBuilder();
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index eee60f06068..025a4c7d737 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -329,12 +329,12 @@ class FederatedShareProvider implements IShareProvider {
*/
$qb = $this->dbConnection->getQueryBuilder();
$qb->update('share')
- ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId())))
- ->set('permissions', $qb->createNamedParameter($share->getPermissions()))
- ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner()))
- ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy()))
- ->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATE))
- ->execute();
+ ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId())))
+ ->set('permissions', $qb->createNamedParameter($share->getPermissions()))
+ ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner()))
+ ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy()))
+ ->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATE))
+ ->execute();
// send the updated permission to the owner/initiator, if they are not the same
if ($share->getShareOwner() !== $share->getSharedBy()) {
@@ -549,7 +549,7 @@ class FederatedShareProvider implements IShareProvider {
public function getSharesInFolder($userId, Folder $node, $reshares, $shallow = true) {
if (!$shallow) {
- throw new \Exception("non-shallow getSharesInFolder is no longer supported");
+ throw new \Exception('non-shallow getSharesInFolder is no longer supported');
}
$qb = $this->dbConnection->getQueryBuilder();
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index 25900ca420d..e107065d0c1 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -286,7 +286,7 @@ class Notifications {
* @return array
* @throws \Exception
*/
- protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action = "share") {
+ protected function tryHttpPostToShareEndpoint($remoteDomain, $urlSuffix, array $fields, $action = 'share') {
if ($this->addressHandler->urlContainProtocol($remoteDomain) === false) {
$remoteDomain = 'https://' . $remoteDomain;
}
diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
index e1bbbbc310f..8aa8ba67a2a 100644
--- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
@@ -431,7 +431,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
*/
private function unshare($id, array $notification) {
if (!$this->isS2SEnabled(true)) {
- throw new ActionNotSupportedException("incoming shares disabled!");
+ throw new ActionNotSupportedException('incoming shares disabled!');
}
if (!isset($notification['sharedSecret'])) {
diff --git a/apps/federatedfilesharing/lib/Settings/Admin.php b/apps/federatedfilesharing/lib/Settings/Admin.php
index bb41aede1c8..90ee9a8c748 100644
--- a/apps/federatedfilesharing/lib/Settings/Admin.php
+++ b/apps/federatedfilesharing/lib/Settings/Admin.php
@@ -64,8 +64,8 @@ class Admin implements IDelegatedSettings {
/**
* @return int whether the form should be rather on the top or bottom of
- * the admin section. The forms are arranged in ascending order of the
- * priority values. It is required to return a value between 0 and 100.
+ * the admin section. The forms are arranged in ascending order of the
+ * priority values. It is required to return a value between 0 and 100.
*
* E.g.: 70
*/
diff --git a/apps/federatedfilesharing/lib/Settings/Personal.php b/apps/federatedfilesharing/lib/Settings/Personal.php
index 4eee4064740..bee6cc538c6 100644
--- a/apps/federatedfilesharing/lib/Settings/Personal.php
+++ b/apps/federatedfilesharing/lib/Settings/Personal.php
@@ -69,8 +69,8 @@ class Personal implements ISettings {
/**
* @return int whether the form should be rather on the top or bottom of
- * the admin section. The forms are arranged in ascending order of the
- * priority values. It is required to return a value between 0 and 100.
+ * the admin section. The forms are arranged in ascending order of the
+ * priority values. It is required to return a value between 0 and 100.
*
* E.g.: 70
* @since 9.1
diff --git a/apps/federatedfilesharing/lib/Settings/PersonalSection.php b/apps/federatedfilesharing/lib/Settings/PersonalSection.php
index 90f1f8ddee0..528c2b6c717 100644
--- a/apps/federatedfilesharing/lib/Settings/PersonalSection.php
+++ b/apps/federatedfilesharing/lib/Settings/PersonalSection.php
@@ -55,8 +55,8 @@ class PersonalSection implements IIconSection {
/**
* @return int whether the form should be rather on the top or bottom of
- * the settings navigation. The sections are arranged in ascending order of
- * the priority values. It is required to return a value between 0 and 99.
+ * the settings navigation. The sections are arranged in ascending order of
+ * the priority values. It is required to return a value between 0 and 99.
*
* E.g.: 70
* @since 9.1