diff --git a/apps/federation/command/syncfederationaddressbooks.php b/apps/federation/command/syncfederationaddressbooks.php index aff54fa0901..61703d9d4e4 100644 --- a/apps/federation/command/syncfederationaddressbooks.php +++ b/apps/federation/command/syncfederationaddressbooks.php @@ -14,7 +14,7 @@ class SyncFederationAddressBooks extends Command { private $syncService; /** - * @param DbHandler $dbHandler + * @param \OCA\Federation\SyncFederationAddressBooks $syncService */ function __construct(\OCA\Federation\SyncFederationAddressBooks $syncService) { parent::__construct(); @@ -31,6 +31,7 @@ class SyncFederationAddressBooks extends Command { /** * @param InputInterface $input * @param OutputInterface $output + * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { @@ -46,5 +47,7 @@ class SyncFederationAddressBooks extends Command { $progress->finish(); $output->writeln(''); + + return 0; } } diff --git a/apps/federation/lib/syncfederationaddressbooks.php b/apps/federation/lib/syncfederationaddressbooks.php index f9f402ea031..86fc4179dc4 100644 --- a/apps/federation/lib/syncfederationaddressbooks.php +++ b/apps/federation/lib/syncfederationaddressbooks.php @@ -18,12 +18,16 @@ class SyncFederationAddressBooks { /** * @param DbHandler $dbHandler + * @param SyncService $syncService */ - function __construct(DbHandler $dbHandler, $syncService) { + function __construct(DbHandler $dbHandler, SyncService $syncService) { $this->syncService = $syncService; $this->dbHandler = $dbHandler; } + /** + * @param \Closure $callback + */ public function syncThemAll(\Closure $callback) { $trustedServers = $this->dbHandler->getAllServer(); diff --git a/apps/federation/tests/lib/syncfederationaddressbookstest.php b/apps/federation/tests/lib/syncfederationaddressbookstest.php index 6932c1e1360..770896535fa 100644 --- a/apps/federation/tests/lib/syncfederationaddressbookstest.php +++ b/apps/federation/tests/lib/syncfederationaddressbookstest.php @@ -63,4 +63,4 @@ class SyncFederationAddressbooksTest extends \Test\TestCase { }); $this->assertEquals(2, count($this->callBacks)); } -} \ No newline at end of file +}