aboutsummaryrefslogtreecommitdiffstats
path: root/core/BackgroundJobs
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-23 23:03:56 +0330
committerFaraz Samapoor <fsa@adlas.at>2023-06-23 23:03:56 +0330
commite98cf3c37481ef92fbb2f50de16ea00d2958f3c3 (patch)
treecba89a58c0a9634e8d687a4d99a29b4158fa6aa8 /core/BackgroundJobs
parent877ddd28277e6bd263832209f4d22e713b4bdd87 (diff)
downloadnextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.tar.gz
nextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.zip
Uses PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'core/BackgroundJobs')
-rw-r--r--core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php11
-rw-r--r--core/BackgroundJobs/CheckForUserCertificates.php14
-rw-r--r--core/BackgroundJobs/CleanupLoginFlowV2.php8
-rw-r--r--core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php11
4 files changed, 20 insertions, 24 deletions
diff --git a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
index df5d8de8eb7..e9096c99b44 100644
--- a/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
+++ b/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php
@@ -32,13 +32,12 @@ use OCP\IConfig;
use Psr\Log\LoggerInterface;
class BackgroundCleanupUpdaterBackupsJob extends QueuedJob {
- protected IConfig $config;
- protected LoggerInterface $log;
-
- public function __construct(IConfig $config, LoggerInterface $log, ITimeFactory $time) {
+ public function __construct(
+ protected IConfig $config,
+ protected LoggerInterface $log,
+ ITimeFactory $time,
+ ) {
parent::__construct($time);
- $this->config = $config;
- $this->log = $log;
}
/**
diff --git a/core/BackgroundJobs/CheckForUserCertificates.php b/core/BackgroundJobs/CheckForUserCertificates.php
index 11b851fff94..123b67099b3 100644
--- a/core/BackgroundJobs/CheckForUserCertificates.php
+++ b/core/BackgroundJobs/CheckForUserCertificates.php
@@ -36,15 +36,13 @@ use OCP\IUser;
use OCP\IUserManager;
class CheckForUserCertificates extends QueuedJob {
- protected IConfig $config;
- private IUserManager $userManager;
- private IRootFolder $rootFolder;
-
- public function __construct(IConfig $config, IUserManager $userManager, IRootFolder $rootFolder, ITimeFactory $time) {
+ public function __construct(
+ protected IConfig $config,
+ private IUserManager $userManager,
+ private IRootFolder $rootFolder,
+ ITimeFactory $time,
+ ) {
parent::__construct($time);
- $this->config = $config;
- $this->userManager = $userManager;
- $this->rootFolder = $rootFolder;
}
/**
diff --git a/core/BackgroundJobs/CleanupLoginFlowV2.php b/core/BackgroundJobs/CleanupLoginFlowV2.php
index 27a5160a9d7..7a17672f99e 100644
--- a/core/BackgroundJobs/CleanupLoginFlowV2.php
+++ b/core/BackgroundJobs/CleanupLoginFlowV2.php
@@ -31,11 +31,11 @@ use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
class CleanupLoginFlowV2 extends TimedJob {
- private LoginFlowV2Mapper $loginFlowV2Mapper;
-
- public function __construct(ITimeFactory $time, LoginFlowV2Mapper $loginFlowV2Mapper) {
+ public function __construct(
+ ITimeFactory $time,
+ private LoginFlowV2Mapper $loginFlowV2Mapper,
+ ) {
parent::__construct($time);
- $this->loginFlowV2Mapper = $loginFlowV2Mapper;
$this->setInterval(3600);
}
diff --git a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php
index 76e0550830c..decfbc08ea2 100644
--- a/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php
+++ b/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php
@@ -32,13 +32,12 @@ use OCP\IUser;
use OCP\IUserManager;
class LookupServerSendCheckBackgroundJob extends QueuedJob {
- protected IConfig $config;
- private IUserManager $userManager;
-
- public function __construct(IConfig $config, IUserManager $userManager, ITimeFactory $time) {
+ public function __construct(
+ protected IConfig $config,
+ private IUserManager $userManager,
+ ITimeFactory $time,
+ ) {
parent::__construct($time);
- $this->config = $config;
- $this->userManager = $userManager;
}
public function run($arguments) {