aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command
diff options
context:
space:
mode:
authorFaraz Samapoor <fsa@adlas.at>2023-06-12 19:16:09 +0330
committerLouis <6653109+artonge@users.noreply.github.com>2023-06-19 17:44:48 +0200
commitd83944fd101ca46f53cdb11520ae3b011f62b2b8 (patch)
tree884d7d132d4f60ba1a2af30fd1e4b1fceacc8fc4 /core/Command
parent81bb3362b24a621fb399877739e7bff35ec13eb7 (diff)
downloadnextcloud-server-d83944fd101ca46f53cdb11520ae3b011f62b2b8.tar.gz
nextcloud-server-d83944fd101ca46f53cdb11520ae3b011f62b2b8.zip
Uses PHP8's constructor property promotion.
in core/Command/Log, /Security, and /SystemTag classes. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'core/Command')
-rw-r--r--core/Command/Log/File.php5
-rw-r--r--core/Command/Log/Manage.php5
-rw-r--r--core/Command/Security/ImportCertificate.php5
-rw-r--r--core/Command/Security/ListCertificates.php10
-rw-r--r--core/Command/Security/RemoveCertificate.php5
-rw-r--r--core/Command/Security/ResetBruteforceAttempts.php5
-rw-r--r--core/Command/SystemTag/Add.php5
-rw-r--r--core/Command/SystemTag/Delete.php5
-rw-r--r--core/Command/SystemTag/Edit.php5
-rw-r--r--core/Command/SystemTag/ListCommand.php5
10 files changed, 13 insertions, 42 deletions
diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php
index 6d6e530fe9a..4e3dc97a546 100644
--- a/core/Command/Log/File.php
+++ b/core/Command/Log/File.php
@@ -36,10 +36,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class File extends Command implements Completion\CompletionAwareInterface {
- protected IConfig $config;
-
- public function __construct(IConfig $config) {
- $this->config = $config;
+ public function __construct(protected IConfig $config) {
parent::__construct();
}
diff --git a/core/Command/Log/Manage.php b/core/Command/Log/Manage.php
index 63a8efde370..500bc1e8a52 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -39,10 +39,7 @@ class Manage extends Command implements CompletionAwareInterface {
public const DEFAULT_LOG_LEVEL = 2;
public const DEFAULT_TIMEZONE = 'UTC';
- protected IConfig $config;
-
- public function __construct(IConfig $config) {
- $this->config = $config;
+ public function __construct(protected IConfig $config) {
parent::__construct();
}
diff --git a/core/Command/Security/ImportCertificate.php b/core/Command/Security/ImportCertificate.php
index 9db7889e307..f3a44face48 100644
--- a/core/Command/Security/ImportCertificate.php
+++ b/core/Command/Security/ImportCertificate.php
@@ -30,10 +30,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ImportCertificate extends Base {
- protected ICertificateManager $certificateManager;
-
- public function __construct(ICertificateManager $certificateManager) {
- $this->certificateManager = $certificateManager;
+ public function __construct(protected ICertificateManager $certificateManager) {
parent::__construct();
}
diff --git a/core/Command/Security/ListCertificates.php b/core/Command/Security/ListCertificates.php
index 15dd1812077..96063fb5b61 100644
--- a/core/Command/Security/ListCertificates.php
+++ b/core/Command/Security/ListCertificates.php
@@ -31,12 +31,10 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ListCertificates extends Base {
- protected ICertificateManager $certificateManager;
- protected IL10N $l;
-
- public function __construct(ICertificateManager $certificateManager, IL10N $l) {
- $this->certificateManager = $certificateManager;
- $this->l = $l;
+ public function __construct(
+ protected ICertificateManager $certificateManager,
+ protected IL10N $l,
+ ) {
parent::__construct();
}
diff --git a/core/Command/Security/RemoveCertificate.php b/core/Command/Security/RemoveCertificate.php
index 2f9c6ff978a..51ddfc98111 100644
--- a/core/Command/Security/RemoveCertificate.php
+++ b/core/Command/Security/RemoveCertificate.php
@@ -30,10 +30,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class RemoveCertificate extends Base {
- protected ICertificateManager $certificateManager;
-
- public function __construct(ICertificateManager $certificateManager) {
- $this->certificateManager = $certificateManager;
+ public function __construct(protected ICertificateManager $certificateManager) {
parent::__construct();
}
diff --git a/core/Command/Security/ResetBruteforceAttempts.php b/core/Command/Security/ResetBruteforceAttempts.php
index 8def0873bdf..a203d1daa10 100644
--- a/core/Command/Security/ResetBruteforceAttempts.php
+++ b/core/Command/Security/ResetBruteforceAttempts.php
@@ -30,10 +30,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ResetBruteforceAttempts extends Base {
- protected Throttler $throttler;
-
- public function __construct(Throttler $throttler) {
- $this->throttler = $throttler;
+ public function __construct(protected Throttler $throttler) {
parent::__construct();
}
diff --git a/core/Command/SystemTag/Add.php b/core/Command/SystemTag/Add.php
index f4fb80eb70a..7df8d5e03eb 100644
--- a/core/Command/SystemTag/Add.php
+++ b/core/Command/SystemTag/Add.php
@@ -31,10 +31,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class Add extends Base {
- protected ISystemTagManager $systemTagManager;
-
- public function __construct(ISystemTagManager $systemTagManager) {
- $this->systemTagManager = $systemTagManager;
+ public function __construct(protected ISystemTagManager $systemTagManager) {
parent::__construct();
}
diff --git a/core/Command/SystemTag/Delete.php b/core/Command/SystemTag/Delete.php
index 4c1145ae1b4..a23b09d4e56 100644
--- a/core/Command/SystemTag/Delete.php
+++ b/core/Command/SystemTag/Delete.php
@@ -30,10 +30,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class Delete extends Base {
- protected ISystemTagManager $systemTagManager;
-
- public function __construct(ISystemTagManager $systemTagManager) {
- $this->systemTagManager = $systemTagManager;
+ public function __construct(protected ISystemTagManager $systemTagManager) {
parent::__construct();
}
diff --git a/core/Command/SystemTag/Edit.php b/core/Command/SystemTag/Edit.php
index 7ed933c3b35..d3c68a2b76e 100644
--- a/core/Command/SystemTag/Edit.php
+++ b/core/Command/SystemTag/Edit.php
@@ -31,10 +31,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class Edit extends Base {
- protected ISystemTagManager $systemTagManager;
-
- public function __construct(ISystemTagManager $systemTagManager) {
- $this->systemTagManager = $systemTagManager;
+ public function __construct(protected ISystemTagManager $systemTagManager) {
parent::__construct();
}
diff --git a/core/Command/SystemTag/ListCommand.php b/core/Command/SystemTag/ListCommand.php
index 7993eb87891..c968fb14ef2 100644
--- a/core/Command/SystemTag/ListCommand.php
+++ b/core/Command/SystemTag/ListCommand.php
@@ -30,10 +30,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class ListCommand extends Base {
- protected ISystemTagManager $systemTagManager;
-
- public function __construct(ISystemTagManager $systemTagManager) {
- $this->systemTagManager = $systemTagManager;
+ public function __construct(protected ISystemTagManager $systemTagManager) {
parent::__construct();
}