aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/UserMigration/ContactsMigrator.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/UserMigration/ContactsMigrator.php')
-rw-r--r--apps/dav/lib/UserMigration/ContactsMigrator.php34
1 files changed, 5 insertions, 29 deletions
diff --git a/apps/dav/lib/UserMigration/ContactsMigrator.php b/apps/dav/lib/UserMigration/ContactsMigrator.php
index 38c53a1f76e..96d623938a3 100644
--- a/apps/dav/lib/UserMigration/ContactsMigrator.php
+++ b/apps/dav/lib/UserMigration/ContactsMigrator.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright 2022 Christopher Ng <chrng8@gmail.com>
- *
- * @author Christopher Ng <chrng8@gmail.com>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\DAV\UserMigration;
@@ -54,10 +37,6 @@ class ContactsMigrator implements IMigrator, ISizeEstimationMigrator {
use TMigratorBasicVersionHandling;
- private CardDavBackend $cardDavBackend;
-
- private IL10N $l10n;
-
private SabreDavServer $sabreDavServer;
private const USERS_URI_ROOT = 'principals/users/';
@@ -71,12 +50,9 @@ class ContactsMigrator implements IMigrator, ISizeEstimationMigrator {
private const PATH_ROOT = Application::APP_ID . '/address_books/';
public function __construct(
- CardDavBackend $cardDavBackend,
- IL10N $l10n
+ private CardDavBackend $cardDavBackend,
+ private IL10N $l10n,
) {
- $this->cardDavBackend = $cardDavBackend;
- $this->l10n = $l10n;
-
$root = new RootCollection();
$this->sabreDavServer = new SabreDavServer(new CachingTree($root));
$this->sabreDavServer->addPlugin(new CardDAVPlugin());
@@ -268,7 +244,7 @@ class ContactsMigrator implements IMigrator, ISizeEstimationMigrator {
$vCard->serialize(),
);
} catch (Throwable $e) {
- $output->writeln("Error creating contact \"" . ($vCard->FN ?? 'null') . "\" from \"$filename\", skipping…");
+ $output->writeln('Error creating contact "' . ($vCard->FN ?? 'null') . "\" from \"$filename\", skipping…");
}
}