From a9cfa72d1cf5eccb352b34eb823559ac52f8e22c Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 24 Jun 2022 15:24:16 +0200 Subject: Summer cleanup of the federation app - Use IEventDispatcher instead of deprecated symfony dispatcher - Use LoggerInterface where possible - Use php 7.4 properties - Add type hinting where possible - Move federation hooks to a seperate listener Signed-off-by: Carl Schwan --- .../federation/lib/Command/SyncFederationAddressBooks.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'apps/federation/lib/Command') diff --git a/apps/federation/lib/Command/SyncFederationAddressBooks.php b/apps/federation/lib/Command/SyncFederationAddressBooks.php index 045c3c72009..adb0b613680 100644 --- a/apps/federation/lib/Command/SyncFederationAddressBooks.php +++ b/apps/federation/lib/Command/SyncFederationAddressBooks.php @@ -28,16 +28,12 @@ use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use OCA\Federation\SyncFederationAddressBooks as SyncService; class SyncFederationAddressBooks extends Command { + private SyncService $syncService; - /** @var \OCA\Federation\SyncFederationAddressBooks */ - private $syncService; - - /** - * @param \OCA\Federation\SyncFederationAddressBooks $syncService - */ - public function __construct(\OCA\Federation\SyncFederationAddressBooks $syncService) { + public function __construct(SyncService $syncService) { parent::__construct(); $this->syncService = $syncService; @@ -49,11 +45,6 @@ class SyncFederationAddressBooks extends Command { ->setDescription('Synchronizes addressbooks of all federated clouds'); } - /** - * @param InputInterface $input - * @param OutputInterface $output - * @return int - */ protected function execute(InputInterface $input, OutputInterface $output): int { $progress = new ProgressBar($output); $progress->start(); -- cgit v1.2.3