aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail
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/sharebymail
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/sharebymail')
-rw-r--r--apps/sharebymail/lib/Activity.php27
-rw-r--r--apps/sharebymail/lib/Capabilities.php20
-rw-r--r--apps/sharebymail/lib/Settings/Admin.php13
-rw-r--r--apps/sharebymail/lib/Settings/SettingsManager.php8
4 files changed, 20 insertions, 48 deletions
diff --git a/apps/sharebymail/lib/Activity.php b/apps/sharebymail/lib/Activity.php
index be9deeb7290..ae3407c1e2b 100644
--- a/apps/sharebymail/lib/Activity.php
+++ b/apps/sharebymail/lib/Activity.php
@@ -16,23 +16,9 @@ use OCP\IUserManager;
use OCP\L10N\IFactory;
class Activity implements IProvider {
- /** @var IFactory */
- protected $languageFactory;
-
/** @var IL10N */
protected $l;
- /** @var IURLGenerator */
- protected $url;
-
- /** @var IManager */
- protected $activityManager;
-
- /** @var IUserManager */
- protected $userManager;
- /** @var IContactsManager */
- protected $contactsManager;
-
/** @var array */
protected $contactNames = [];
@@ -50,12 +36,13 @@ class Activity implements IProvider {
* @param IUserManager $userManager
* @param IContactsManager $contactsManager
*/
- public function __construct(IFactory $languageFactory, IURLGenerator $url, IManager $activityManager, IUserManager $userManager, IContactsManager $contactsManager) {
- $this->languageFactory = $languageFactory;
- $this->url = $url;
- $this->activityManager = $activityManager;
- $this->userManager = $userManager;
- $this->contactsManager = $contactsManager;
+ public function __construct(
+ protected IFactory $languageFactory,
+ protected IURLGenerator $url,
+ protected IManager $activityManager,
+ protected IUserManager $userManager,
+ protected IContactsManager $contactsManager,
+ ) {
}
/**
diff --git a/apps/sharebymail/lib/Capabilities.php b/apps/sharebymail/lib/Capabilities.php
index ff6f634747b..5b489b7d790 100644
--- a/apps/sharebymail/lib/Capabilities.php
+++ b/apps/sharebymail/lib/Capabilities.php
@@ -15,21 +15,11 @@ use OCP\Share\IManager;
class Capabilities implements ICapability {
- /** @var IManager */
- private $manager;
-
- /** @var SettingsManager */
- private $settingsManager;
-
- /** @var IAppManager */
- private $appManager;
-
- public function __construct(IManager $manager,
- SettingsManager $settingsManager,
- IAppManager $appManager) {
- $this->manager = $manager;
- $this->settingsManager = $settingsManager;
- $this->appManager = $appManager;
+ public function __construct(
+ private IManager $manager,
+ private SettingsManager $settingsManager,
+ private IAppManager $appManager,
+ ) {
}
/**
diff --git a/apps/sharebymail/lib/Settings/Admin.php b/apps/sharebymail/lib/Settings/Admin.php
index 5fdf633bea1..2bd58f7307f 100644
--- a/apps/sharebymail/lib/Settings/Admin.php
+++ b/apps/sharebymail/lib/Settings/Admin.php
@@ -11,14 +11,11 @@ use OCP\IL10N;
use OCP\Settings\IDelegatedSettings;
class Admin implements IDelegatedSettings {
- private SettingsManager $settingsManager;
- private IL10N $l;
- private IInitialState $initialState;
-
- public function __construct(SettingsManager $settingsManager, IL10N $l, IInitialState $initialState) {
- $this->settingsManager = $settingsManager;
- $this->l = $l;
- $this->initialState = $initialState;
+ public function __construct(
+ private SettingsManager $settingsManager,
+ private IL10N $l,
+ private IInitialState $initialState,
+ ) {
}
/**
diff --git a/apps/sharebymail/lib/Settings/SettingsManager.php b/apps/sharebymail/lib/Settings/SettingsManager.php
index c58f4950e91..d487bd2ac43 100644
--- a/apps/sharebymail/lib/Settings/SettingsManager.php
+++ b/apps/sharebymail/lib/Settings/SettingsManager.php
@@ -12,15 +12,13 @@ use OCP\IConfig;
class SettingsManager {
- /** @var IConfig */
- private $config;
-
private $sendPasswordByMailDefault = 'yes';
private $replyToInitiatorDefault = 'yes';
- public function __construct(IConfig $config) {
- $this->config = $config;
+ public function __construct(
+ private IConfig $config,
+ ) {
}
/**