summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-11-23 10:22:34 +0100
committerBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2023-11-23 10:36:13 +0100
commitaa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch)
tree843203cd1346158aab3515687e37a90e78c929e9 /apps/federatedfilesharing
parent272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff)
downloadnextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz
nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/lib/AppInfo/Application.php2
-rw-r--r--apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php2
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php30
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php24
-rw-r--r--apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php4
-rw-r--r--apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php2
-rw-r--r--apps/federatedfilesharing/lib/Settings/Personal.php2
-rw-r--r--apps/federatedfilesharing/tests/AddressHandlerTest.php2
-rw-r--r--apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php16
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php24
10 files changed, 54 insertions, 54 deletions
diff --git a/apps/federatedfilesharing/lib/AppInfo/Application.php b/apps/federatedfilesharing/lib/AppInfo/Application.php
index fc9d1e5e150..2296f123761 100644
--- a/apps/federatedfilesharing/lib/AppInfo/Application.php
+++ b/apps/federatedfilesharing/lib/AppInfo/Application.php
@@ -53,7 +53,7 @@ class Application extends App implements IBootstrap {
}
private function registerCloudFederationProvider(ICloudFederationProviderManager $manager,
- IAppContainer $appContainer): void {
+ IAppContainer $appContainer): void {
$manager->addCloudFederationProvider('file',
'Federated Files Sharing',
function () use ($appContainer): CloudFederationProviderFiles {
diff --git a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
index 98fe20bf46e..1cbf21741d8 100644
--- a/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
+++ b/apps/federatedfilesharing/lib/BackgroundJob/RetryJob.php
@@ -50,7 +50,7 @@ class RetryJob extends Job {
private int $interval = 600;
public function __construct(Notifications $notifications,
- ITimeFactory $time) {
+ ITimeFactory $time) {
parent::__construct($time);
$this->notifications = $notifications;
}
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
index 1f1334e7aee..5855d98f34e 100644
--- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
+++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
@@ -30,11 +30,11 @@ namespace OCA\FederatedFileSharing\Controller;
use OCA\FederatedFileSharing\AddressHandler;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\FederatedFileSharing\Notifications;
+use OCP\App\IAppManager;
use OCP\AppFramework\Http;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCSController;
-use OCP\App\IAppManager;
use OCP\Constants;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\Exceptions\ProviderCouldNotAddShareException;
@@ -89,18 +89,18 @@ class RequestHandlerController extends OCSController {
private $eventDispatcher;
public function __construct(string $appName,
- IRequest $request,
- FederatedShareProvider $federatedShareProvider,
- IDBConnection $connection,
- Share\IManager $shareManager,
- Notifications $notifications,
- AddressHandler $addressHandler,
- IUserManager $userManager,
- ICloudIdManager $cloudIdManager,
- LoggerInterface $logger,
- ICloudFederationFactory $cloudFederationFactory,
- ICloudFederationProviderManager $cloudFederationProviderManager,
- IEventDispatcher $eventDispatcher
+ IRequest $request,
+ FederatedShareProvider $federatedShareProvider,
+ IDBConnection $connection,
+ Share\IManager $shareManager,
+ Notifications $notifications,
+ AddressHandler $addressHandler,
+ IUserManager $userManager,
+ ICloudIdManager $cloudIdManager,
+ LoggerInterface $logger,
+ ICloudFederationFactory $cloudFederationFactory,
+ ICloudFederationProviderManager $cloudFederationProviderManager,
+ IEventDispatcher $eventDispatcher
) {
parent::__construct($appName, $request);
@@ -175,9 +175,9 @@ class RequestHandlerController extends OCSController {
$provider = $this->cloudFederationProviderManager->getCloudFederationProvider('file');
$provider->shareReceived($share);
if ($sharedByFederatedId === $ownerFederatedId) {
- $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was created by "%s" and shared with "%s"', [$name, $ownerFederatedId, $shareWith]));
+ $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was created by "%s" and shared with "%s"', [$name, $ownerFederatedId, $shareWith]));
} else {
- $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was shared by "%s" (resource owner is: "%s") and shared with "%s"', [$name, $sharedByFederatedId, $ownerFederatedId, $shareWith]));
+ $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent('A new federated share with "%s" was shared by "%s" (resource owner is: "%s") and shared with "%s"', [$name, $sharedByFederatedId, $ownerFederatedId, $shareWith]));
}
} catch (ProviderDoesNotExistsException $e) {
throw new OCSException('Server does not support federated cloud sharing', 503);
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 6157bad0335..479b636fd40 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -75,18 +75,18 @@ class FederatedShareProvider implements IShareProvider {
* DefaultShareProvider constructor.
*/
public function __construct(
- private IDBConnection $dbConnection,
- private AddressHandler $addressHandler,
- private Notifications $notifications,
- private TokenHandler $tokenHandler,
- private IL10N $l,
- private IRootFolder $rootFolder,
- private IConfig $config,
- private IUserManager $userManager,
- private ICloudIdManager $cloudIdManager,
- private \OCP\GlobalScale\IConfig $gsConfig,
- private ICloudFederationProviderManager $cloudFederationProviderManager,
- private LoggerInterface $logger,
+ private IDBConnection $dbConnection,
+ private AddressHandler $addressHandler,
+ private Notifications $notifications,
+ private TokenHandler $tokenHandler,
+ private IL10N $l,
+ private IRootFolder $rootFolder,
+ private IConfig $config,
+ private IUserManager $userManager,
+ private ICloudIdManager $cloudIdManager,
+ private \OCP\GlobalScale\IConfig $gsConfig,
+ private ICloudFederationProviderManager $cloudFederationProviderManager,
+ private LoggerInterface $logger,
) {
}
diff --git a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
index 9e491f0c533..511b69d4245 100644
--- a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
+++ b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php
@@ -28,8 +28,8 @@ declare(strict_types=1);
namespace OCA\FederatedFileSharing\Migration;
use Closure;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
@@ -55,7 +55,7 @@ class Version1010Date20200630191755 extends SimpleMigrationStep {
'default' => '',
]);
$table->setPrimaryKey(['share_id'], 'federated_res_pk');
-// $table->addUniqueIndex(['share_id'], 'share_id_index');
+ // $table->addUniqueIndex(['share_id'], 'share_id_index');
}
return $schema;
}
diff --git a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
index c1ff209b9c6..3a431872d22 100644
--- a/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
+++ b/apps/federatedfilesharing/lib/Migration/Version1011Date20201120125158.php
@@ -28,8 +28,8 @@ namespace OCA\FederatedFileSharing\Migration;
use Closure;
use Doctrine\DBAL\Types\Type;
-use OCP\DB\Types;
use OCP\DB\ISchemaWrapper;
+use OCP\DB\Types;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
diff --git a/apps/federatedfilesharing/lib/Settings/Personal.php b/apps/federatedfilesharing/lib/Settings/Personal.php
index 18189f4cde7..944b2f84ab1 100644
--- a/apps/federatedfilesharing/lib/Settings/Personal.php
+++ b/apps/federatedfilesharing/lib/Settings/Personal.php
@@ -33,8 +33,8 @@ use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\Defaults;
-use OCP\IUserSession;
use OCP\IURLGenerator;
+use OCP\IUserSession;
use OCP\Settings\ISettings;
class Personal implements ISettings {
diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php
index de0a8d259c1..8cfe758a364 100644
--- a/apps/federatedfilesharing/tests/AddressHandlerTest.php
+++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php
@@ -30,11 +30,11 @@ namespace OCA\FederatedFileSharing\Tests;
use OC\Federation\CloudIdManager;
use OCA\FederatedFileSharing\AddressHandler;
use OCP\Contacts\IManager;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\ICacheFactory;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
-use OCP\EventDispatcher\IEventDispatcher;
class AddressHandlerTest extends \Test\TestCase {
/** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
index 7cc788d3a6c..1508300f685 100644
--- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
@@ -48,8 +48,8 @@ use OCP\IUserManager;
use OCP\IUserSession;
use OCP\Share\IManager;
use OCP\Share\IShare;
-use Psr\Log\LoggerInterface;
use PHPUnit\Framework\MockObject\MockObject;
+use Psr\Log\LoggerInterface;
class MountPublicLinkControllerTest extends \Test\TestCase {
/** @var IContactsManager|MockObject */
@@ -145,13 +145,13 @@ class MountPublicLinkControllerTest extends \Test\TestCase {
* @param string $expectedReturnData
*/
public function testCreateFederatedShare($shareWith,
- $outgoingSharesAllowed,
- $validShareWith,
- $token,
- $validToken,
- $createSuccessful,
- $expectedReturnData,
- $permissions
+ $outgoingSharesAllowed,
+ $validShareWith,
+ $token,
+ $validToken,
+ $createSuccessful,
+ $expectedReturnData,
+ $permissions
) {
$this->federatedShareProvider->expects($this->any())
->method('isOutgoingServer2serverShareEnabled')
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index 22e80f875d7..7f9abae1e85 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -29,12 +29,12 @@ namespace OCA\FederatedFileSharing\Tests;
use OCA\FederatedFileSharing\Controller\RequestHandlerController;
use OCP\AppFramework\Http\DataResponse;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProvider;
use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudFederationShare;
use OCP\Federation\ICloudIdManager;
-use OCP\EventDispatcher\IEventDispatcher;
use OCP\IDBConnection;
use OCP\IRequest;
use OCP\IUserManager;
@@ -153,17 +153,17 @@ class RequestHandlerControllerTest extends \Test\TestCase {
public function testCreateShare() {
$this->cloudFederationFactory->expects($this->once())->method('getCloudFederationShare')
->with(
- $this->user2,
- 'name',
- '',
- 1,
- $this->ownerCloudId,
- $this->owner,
- $this->user1CloudId,
- $this->user1,
- 'token',
- 'user',
- 'file'
+ $this->user2,
+ 'name',
+ '',
+ 1,
+ $this->ownerCloudId,
+ $this->owner,
+ $this->user1CloudId,
+ $this->user1,
+ 'token',
+ 'user',
+ 'file'
)->willReturn($this->cloudFederationShare);
/** @var ICloudFederationProvider|\PHPUnit\Framework\MockObject\MockObject $provider */