aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Migration
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2024-10-22 12:47:45 +0200
committerGitHub <noreply@github.com>2024-10-22 12:47:45 +0200
commit070adc1131fcd5476e4a93ebf28be6f409c5a992 (patch)
tree1e8e2238a22d544c370f1ac804426ed675c5eacf /apps/dav/lib/Migration
parent582af10e0be1b22ebde0429b756f62107d8e8083 (diff)
parente8426996f59ab6dbf0c94adee8f410cbd572b11a (diff)
downloadnextcloud-server-070adc1131fcd5476e4a93ebf28be6f409c5a992.tar.gz
nextcloud-server-070adc1131fcd5476e4a93ebf28be6f409c5a992.zip
Merge pull request #48790 from nextcloud/refactor/apps/constructor-property-promotion
Diffstat (limited to 'apps/dav/lib/Migration')
-rw-r--r--apps/dav/lib/Migration/BuildSocialSearchIndex.php20
-rw-r--r--apps/dav/lib/Migration/ChunkCleanup.php23
-rw-r--r--apps/dav/lib/Migration/RegenerateBirthdayCalendars.php14
-rw-r--r--apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php13
-rw-r--r--apps/dav/lib/Migration/RemoveObjectProperties.php8
-rw-r--r--apps/dav/lib/Migration/Version1008Date20181105104826.php8
-rw-r--r--apps/dav/lib/Migration/Version1008Date20181105110300.php8
-rw-r--r--apps/dav/lib/Migration/Version1025Date20240308063933.php11
8 files changed, 32 insertions, 73 deletions
diff --git a/apps/dav/lib/Migration/BuildSocialSearchIndex.php b/apps/dav/lib/Migration/BuildSocialSearchIndex.php
index 16100196e1b..5fab3f4ef77 100644
--- a/apps/dav/lib/Migration/BuildSocialSearchIndex.php
+++ b/apps/dav/lib/Migration/BuildSocialSearchIndex.php
@@ -13,26 +13,16 @@ use OCP\Migration\IRepairStep;
class BuildSocialSearchIndex implements IRepairStep {
- /** @var IDBConnection */
- private $db;
-
- /** @var IJobList */
- private $jobList;
-
- /** @var IConfig */
- private $config;
-
/**
* @param IDBConnection $db
* @param IJobList $jobList
* @param IConfig $config
*/
- public function __construct(IDBConnection $db,
- IJobList $jobList,
- IConfig $config) {
- $this->db = $db;
- $this->jobList = $jobList;
- $this->config = $config;
+ public function __construct(
+ private IDBConnection $db,
+ private IJobList $jobList,
+ private IConfig $config,
+ ) {
}
/**
diff --git a/apps/dav/lib/Migration/ChunkCleanup.php b/apps/dav/lib/Migration/ChunkCleanup.php
index 96e84984700..681b38404b9 100644
--- a/apps/dav/lib/Migration/ChunkCleanup.php
+++ b/apps/dav/lib/Migration/ChunkCleanup.php
@@ -21,23 +21,12 @@ use OCP\Migration\IRepairStep;
class ChunkCleanup implements IRepairStep {
- /** @var IConfig */
- private $config;
- /** @var IUserManager */
- private $userManager;
- /** @var IRootFolder */
- private $rootFolder;
- /** @var IJobList */
- private $jobList;
-
- public function __construct(IConfig $config,
- IUserManager $userManager,
- IRootFolder $rootFolder,
- IJobList $jobList) {
- $this->config = $config;
- $this->userManager = $userManager;
- $this->rootFolder = $rootFolder;
- $this->jobList = $jobList;
+ public function __construct(
+ private IConfig $config,
+ private IUserManager $userManager,
+ private IRootFolder $rootFolder,
+ private IJobList $jobList,
+ ) {
}
public function getName(): string {
diff --git a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
index 94ef7e8a13b..14037801eb4 100644
--- a/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
+++ b/apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
@@ -13,20 +13,14 @@ use OCP\Migration\IRepairStep;
class RegenerateBirthdayCalendars implements IRepairStep {
- /** @var IJobList */
- private $jobList;
-
- /** @var IConfig */
- private $config;
-
/**
* @param IJobList $jobList
* @param IConfig $config
*/
- public function __construct(IJobList $jobList,
- IConfig $config) {
- $this->jobList = $jobList;
- $this->config = $config;
+ public function __construct(
+ private IJobList $jobList,
+ private IConfig $config,
+ ) {
}
/**
diff --git a/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php b/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php
index 0122ed37b06..e2b2b701e74 100644
--- a/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php
+++ b/apps/dav/lib/Migration/RemoveDeletedUsersCalendarSubscriptions.php
@@ -15,12 +15,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
class RemoveDeletedUsersCalendarSubscriptions implements IRepairStep {
- /** @var IDBConnection */
- private $connection;
-
- /** @var IUserManager */
- private $userManager;
-
/** @var int */
private $progress = 0;
@@ -29,9 +23,10 @@ class RemoveDeletedUsersCalendarSubscriptions implements IRepairStep {
private const SUBSCRIPTIONS_CHUNK_SIZE = 1000;
- public function __construct(IDBConnection $connection, IUserManager $userManager) {
- $this->connection = $connection;
- $this->userManager = $userManager;
+ public function __construct(
+ private IDBConnection $connection,
+ private IUserManager $userManager,
+ ) {
}
/**
diff --git a/apps/dav/lib/Migration/RemoveObjectProperties.php b/apps/dav/lib/Migration/RemoveObjectProperties.php
index b87eb82af19..3f505ecb1e2 100644
--- a/apps/dav/lib/Migration/RemoveObjectProperties.php
+++ b/apps/dav/lib/Migration/RemoveObjectProperties.php
@@ -15,16 +15,14 @@ class RemoveObjectProperties implements IRepairStep {
private const ME_CARD_PROPERTY = '{http://calendarserver.org/ns/}me-card';
private const CALENDAR_TRANSP_PROPERTY = '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp';
- /** @var IDBConnection */
- private $connection;
-
/**
* RemoveObjectProperties constructor.
*
* @param IDBConnection $connection
*/
- public function __construct(IDBConnection $connection) {
- $this->connection = $connection;
+ public function __construct(
+ private IDBConnection $connection,
+ ) {
}
/**
diff --git a/apps/dav/lib/Migration/Version1008Date20181105104826.php b/apps/dav/lib/Migration/Version1008Date20181105104826.php
index 6447372ee5f..82612307cbb 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105104826.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105104826.php
@@ -17,16 +17,14 @@ use OCP\Migration\SimpleMigrationStep;
class Version1008Date20181105104826 extends SimpleMigrationStep {
- /** @var IDBConnection */
- private $connection;
-
/**
* Version1008Date20181105104826 constructor.
*
* @param IDBConnection $connection
*/
- public function __construct(IDBConnection $connection) {
- $this->connection = $connection;
+ public function __construct(
+ private IDBConnection $connection,
+ ) {
}
/**
diff --git a/apps/dav/lib/Migration/Version1008Date20181105110300.php b/apps/dav/lib/Migration/Version1008Date20181105110300.php
index 37d0c12ce43..72e8dee1bf8 100644
--- a/apps/dav/lib/Migration/Version1008Date20181105110300.php
+++ b/apps/dav/lib/Migration/Version1008Date20181105110300.php
@@ -17,16 +17,14 @@ use OCP\Migration\SimpleMigrationStep;
class Version1008Date20181105110300 extends SimpleMigrationStep {
- /** @var IDBConnection */
- private $connection;
-
/**
* Version1008Date20181105110300 constructor.
*
* @param IDBConnection $connection
*/
- public function __construct(IDBConnection $connection) {
- $this->connection = $connection;
+ public function __construct(
+ private IDBConnection $connection,
+ ) {
}
/**
diff --git a/apps/dav/lib/Migration/Version1025Date20240308063933.php b/apps/dav/lib/Migration/Version1025Date20240308063933.php
index 3a68760762b..d84acf8fea9 100644
--- a/apps/dav/lib/Migration/Version1025Date20240308063933.php
+++ b/apps/dav/lib/Migration/Version1025Date20240308063933.php
@@ -20,13 +20,10 @@ use OCP\Migration\SimpleMigrationStep;
class Version1025Date20240308063933 extends SimpleMigrationStep {
- private IAppConfig $appConfig;
- private IDBConnection $db;
-
- public function __construct(IAppConfig $appConfig,
- IDBConnection $db) {
- $this->db = $db;
- $this->appConfig = $appConfig;
+ public function __construct(
+ private IAppConfig $appConfig,
+ private IDBConnection $db,
+ ) {
}
/**