diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-06-24 15:24:16 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-06-24 15:39:52 +0200 |
commit | a9cfa72d1cf5eccb352b34eb823559ac52f8e22c (patch) | |
tree | 29335b912f39ca2f780a2c904d4b0cb97c533920 /apps/federation/lib/Command/SyncFederationAddressBooks.php | |
parent | b282fe1e6f5587a6440d170df245ad5acb8dc976 (diff) | |
download | nextcloud-server-a9cfa72d1cf5eccb352b34eb823559ac52f8e22c.tar.gz nextcloud-server-a9cfa72d1cf5eccb352b34eb823559ac52f8e22c.zip |
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 <carl@carlschwan.eu>
Diffstat (limited to 'apps/federation/lib/Command/SyncFederationAddressBooks.php')
-rw-r--r-- | apps/federation/lib/Command/SyncFederationAddressBooks.php | 15 |
1 files changed, 3 insertions, 12 deletions
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(); |