summaryrefslogtreecommitdiffstats
path: root/apps/federation
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federation')
-rw-r--r--apps/federation/lib/AppInfo/Application.php2
-rw-r--r--apps/federation/lib/BackgroundJob/RequestSharedSecret.php1
-rw-r--r--apps/federation/lib/Command/SyncFederationAddressBooks.php2
-rw-r--r--apps/federation/lib/DbHandler.php1
-rw-r--r--apps/federation/lib/Hooks.php2
-rw-r--r--apps/federation/lib/SyncFederationAddressBooks.php2
-rw-r--r--apps/federation/lib/SyncJob.php2
-rw-r--r--apps/federation/tests/BackgroundJob/GetSharedSecretTest.php1
-rw-r--r--apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php1
-rw-r--r--apps/federation/tests/Controller/OCSAuthAPIControllerTest.php1
-rw-r--r--apps/federation/tests/Controller/SettingsControllerTest.php1
-rw-r--r--apps/federation/tests/DbHandlerTest.php7
-rw-r--r--apps/federation/tests/HooksTest.php1
-rw-r--r--apps/federation/tests/Middleware/AddServerMiddlewareTest.php3
-rw-r--r--apps/federation/tests/SyncFederationAddressbooksTest.php18
-rw-r--r--apps/federation/tests/TrustedServersTest.php3
16 files changed, 18 insertions, 30 deletions
diff --git a/apps/federation/lib/AppInfo/Application.php b/apps/federation/lib/AppInfo/Application.php
index 7ea2f000029..119756b16e4 100644
--- a/apps/federation/lib/AppInfo/Application.php
+++ b/apps/federation/lib/AppInfo/Application.php
@@ -69,7 +69,7 @@ class Application extends App {
);
$dispatcher = $container->getServer()->getEventDispatcher();
- $dispatcher->addListener('OCA\DAV\Connector\Sabre::authInit', function($event) use($container) {
+ $dispatcher->addListener('OCA\DAV\Connector\Sabre::authInit', function ($event) use ($container) {
if ($event instanceof SabrePluginEvent) {
$server = $event->getServer();
if ($server instanceof Server) {
diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
index e74fc74cace..4eaa94a53d5 100644
--- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
+++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php
@@ -28,7 +28,6 @@
namespace OCA\Federation\BackgroundJob;
-
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Ring\Exception\RingException;
diff --git a/apps/federation/lib/Command/SyncFederationAddressBooks.php b/apps/federation/lib/Command/SyncFederationAddressBooks.php
index 3080d469995..cad000cf71f 100644
--- a/apps/federation/lib/Command/SyncFederationAddressBooks.php
+++ b/apps/federation/lib/Command/SyncFederationAddressBooks.php
@@ -60,7 +60,7 @@ class SyncFederationAddressBooks extends Command {
$progress = new ProgressBar($output);
$progress->start();
- $this->syncService->syncThemAll(function($url, $ex) use ($progress, $output) {
+ $this->syncService->syncThemAll(function ($url, $ex) use ($progress, $output) {
if ($ex instanceof \Exception) {
$output->writeln("Error while syncing $url : " . $ex->getMessage());
diff --git a/apps/federation/lib/DbHandler.php b/apps/federation/lib/DbHandler.php
index 24bbe91c7b8..b7d53d378d0 100644
--- a/apps/federation/lib/DbHandler.php
+++ b/apps/federation/lib/DbHandler.php
@@ -26,7 +26,6 @@
namespace OCA\Federation;
-
use OC\Files\Filesystem;
use OC\HintException;
use OCP\IDBConnection;
diff --git a/apps/federation/lib/Hooks.php b/apps/federation/lib/Hooks.php
index 2a1bce2b303..3f6a45422a7 100644
--- a/apps/federation/lib/Hooks.php
+++ b/apps/federation/lib/Hooks.php
@@ -22,8 +22,6 @@
namespace OCA\Federation;
-
-
class Hooks {
/** @var TrustedServers */
diff --git a/apps/federation/lib/SyncFederationAddressBooks.php b/apps/federation/lib/SyncFederationAddressBooks.php
index 094d2c0cb0b..f0e3d2ba38b 100644
--- a/apps/federation/lib/SyncFederationAddressBooks.php
+++ b/apps/federation/lib/SyncFederationAddressBooks.php
@@ -78,7 +78,7 @@ class SyncFederationAddressBooks {
$targetBookId = $trustedServer['url_hash'];
$targetPrincipal = "principals/system/system";
$targetBookProperties = [
- '{DAV:}displayname' => $url
+ '{DAV:}displayname' => $url
];
try {
$newToken = $this->syncService->syncRemoteAddressBook($url, $cardDavUser, $addressBookUrl, $sharedSecret, $syncToken, $targetBookId, $targetPrincipal, $targetBookProperties);
diff --git a/apps/federation/lib/SyncJob.php b/apps/federation/lib/SyncJob.php
index b98e159585c..24e4cc21497 100644
--- a/apps/federation/lib/SyncJob.php
+++ b/apps/federation/lib/SyncJob.php
@@ -48,7 +48,7 @@ class SyncJob extends TimedJob {
}
protected function run($argument) {
- $this->syncService->syncThemAll(function($url, $ex) {
+ $this->syncService->syncThemAll(function ($url, $ex) {
if ($ex instanceof \Exception) {
$this->logger->logException($ex, [
'message' => "Error while syncing $url.",
diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
index d833b6ec607..ba84d718df6 100644
--- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
+++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php
@@ -26,7 +26,6 @@
namespace OCA\Federation\Tests\BackgroundJob;
-
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Ring\Exception\RingException;
use OCA\Federation\BackgroundJob\GetSharedSecret;
diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
index 25518cb6cdb..f35654b0895 100644
--- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
+++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php
@@ -25,7 +25,6 @@
namespace OCA\Federation\Tests\BackgroundJob;
-
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Ring\Exception\RingException;
use OCA\Federation\BackgroundJob\RequestSharedSecret;
diff --git a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
index 88cc9c617af..c8a79748534 100644
--- a/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
+++ b/apps/federation/tests/Controller/OCSAuthAPIControllerTest.php
@@ -25,7 +25,6 @@
namespace OCA\Federation\Tests\Controller;
-
use OC\BackgroundJob\JobList;
use OCA\Federation\Controller\OCSAuthAPIController;
use OCA\Federation\DbHandler;
diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php
index 16549ff16a6..48c9b91268a 100644
--- a/apps/federation/tests/Controller/SettingsControllerTest.php
+++ b/apps/federation/tests/Controller/SettingsControllerTest.php
@@ -23,7 +23,6 @@
namespace OCA\Federation\Tests\Controller;
-
use OCA\Federation\Controller\SettingsController;
use OCA\Federation\TrustedServers;
use OCP\AppFramework\Http\DataResponse;
diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php
index 121e6b3cce6..9b747a772f4 100644
--- a/apps/federation/tests/DbHandlerTest.php
+++ b/apps/federation/tests/DbHandlerTest.php
@@ -25,7 +25,6 @@
namespace OCA\Federation\Tests;
-
use OCA\Federation\DbHandler;
use OCA\Federation\TrustedServers;
use OCP\IDBConnection;
@@ -92,9 +91,9 @@ class DbHandlerTest extends TestCase {
public function dataTestAddServer() {
return [
- ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')],
- ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')],
- ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')],
+ ['http://owncloud.org', 'http://owncloud.org', sha1('owncloud.org')],
+ ['https://owncloud.org', 'https://owncloud.org', sha1('owncloud.org')],
+ ['http://owncloud.org/', 'http://owncloud.org', sha1('owncloud.org')],
];
}
diff --git a/apps/federation/tests/HooksTest.php b/apps/federation/tests/HooksTest.php
index cb792391cbf..0bbf2bfb7ac 100644
--- a/apps/federation/tests/HooksTest.php
+++ b/apps/federation/tests/HooksTest.php
@@ -24,7 +24,6 @@
namespace OCA\Federation\Tests;
-
use OCA\Federation\Hooks;
use OCA\Federation\TrustedServers;
use Test\TestCase;
diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php
index 9d019794d25..a43ad557dae 100644
--- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php
+++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php
@@ -26,7 +26,6 @@
namespace OCA\Federation\Tests\Middleware;
-
use OC\HintException;
use OCA\Federation\Controller\SettingsController;
use OCA\Federation\Middleware\AddServerMiddleware;
@@ -76,7 +75,7 @@ class AddServerMiddlewareTest extends TestCase {
$this->l10n->expects($this->any())->method('t')
->willReturnCallback(
- function($message) {
+ function ($message) {
return $message;
}
);
diff --git a/apps/federation/tests/SyncFederationAddressbooksTest.php b/apps/federation/tests/SyncFederationAddressbooksTest.php
index 8cf02fce7d8..7e339d0f9f5 100644
--- a/apps/federation/tests/SyncFederationAddressbooksTest.php
+++ b/apps/federation/tests/SyncFederationAddressbooksTest.php
@@ -54,13 +54,13 @@ class SyncFederationAddressbooksTest extends \Test\TestCase {
getMock();
$dbHandler->method('getAllServer')->
willReturn([
- [
- 'url' => 'https://cloud.drop.box',
- 'url_hash' => 'sha1',
- 'shared_secret' => 'iloveowncloud',
- 'sync_token' => '0'
- ]
- ]);
+ [
+ 'url' => 'https://cloud.drop.box',
+ 'url_hash' => 'sha1',
+ 'shared_secret' => 'iloveowncloud',
+ 'sync_token' => '0'
+ ]
+ ]);
$dbHandler->expects($this->once())->method('setServerStatus')->
with('https://cloud.drop.box', 1, '1');
$syncService = $this->getMockBuilder('OCA\DAV\CardDAV\SyncService')
@@ -71,7 +71,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase {
/** @var \OCA\DAV\CardDAV\SyncService $syncService */
$s = new SyncFederationAddressBooks($dbHandler, $syncService, $this->discoveryService);
- $s->syncThemAll(function($url, $ex) {
+ $s->syncThemAll(function ($url, $ex) {
$this->callBacks[] = [$url, $ex];
});
$this->assertEquals(1, count($this->callBacks));
@@ -99,7 +99,7 @@ class SyncFederationAddressbooksTest extends \Test\TestCase {
/** @var \OCA\DAV\CardDAV\SyncService $syncService */
$s = new SyncFederationAddressBooks($dbHandler, $syncService, $this->discoveryService);
- $s->syncThemAll(function($url, $ex) {
+ $s->syncThemAll(function ($url, $ex) {
$this->callBacks[] = [$url, $ex];
});
$this->assertEquals(2, count($this->callBacks));
diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php
index 5c7dd772c86..59b1c577e75 100644
--- a/apps/federation/tests/TrustedServersTest.php
+++ b/apps/federation/tests/TrustedServersTest.php
@@ -26,7 +26,6 @@
namespace OCA\Federation\Tests;
-
use OCA\Federation\DbHandler;
use OCA\Federation\TrustedServers;
use OCP\AppFramework\Utility\ITimeFactory;
@@ -217,7 +216,7 @@ class TrustedServersTest extends TestCase {
->willReturn($server);
$this->dispatcher->expects($this->once())->method('dispatch')
->willReturnCallback(
- function($eventId, $event) {
+ function ($eventId, $event) {
$this->assertSame($eventId, 'OCP\Federation\TrustedServerEvent::remove');
$this->assertInstanceOf('Symfony\Component\EventDispatcher\GenericEvent', $event);
/** @var \Symfony\Component\EventDispatcher\GenericEvent $event */