aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2023-06-20 10:12:52 +0200
committerGitHub <noreply@github.com>2023-06-20 10:12:52 +0200
commit5063bf37ed3e68041adb9a96f430a87d59106491 (patch)
tree721848d4b9984e3be4a129b5860e8140e4d4c0f7 /core
parent64c19ce3aab20cae15bd522428ae54548a76b78b (diff)
parentf63c52a396ccee0ffe52f975e6fb41b0da0520f3 (diff)
downloadnextcloud-server-5063bf37ed3e68041adb9a96f430a87d59106491.tar.gz
nextcloud-server-5063bf37ed3e68041adb9a96f430a87d59106491.zip
Merge pull request #38774 from fsamapoor/constructor_property_promotion_in_core_command_part8
Uses PHP8's constructor property promotion in core/Command/Log, /Security, and /SystemTag
Diffstat (limited to 'core')
-rw-r--r--core/Command/Log/File.php7
-rw-r--r--core/Command/Log/Manage.php7
-rw-r--r--core/Command/Security/ImportCertificate.php7
-rw-r--r--core/Command/Security/ListCertificates.php10
-rw-r--r--core/Command/Security/RemoveCertificate.php7
-rw-r--r--core/Command/Security/ResetBruteforceAttempts.php7
-rw-r--r--core/Command/SystemTag/Add.php7
-rw-r--r--core/Command/SystemTag/Delete.php7
-rw-r--r--core/Command/SystemTag/Edit.php7
-rw-r--r--core/Command/SystemTag/ListCommand.php7
10 files changed, 31 insertions, 42 deletions
diff --git a/core/Command/Log/File.php b/core/Command/Log/File.php
index 6d6e530fe9a..978115d5aeb 100644
--- a/core/Command/Log/File.php
+++ b/core/Command/Log/File.php
@@ -36,10 +36,9 @@ 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..7c25fdf8a6b 100644
--- a/core/Command/Log/Manage.php
+++ b/core/Command/Log/Manage.php
@@ -39,10 +39,9 @@ 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..a7e9bd94e4a 100644
--- a/core/Command/Security/ImportCertificate.php
+++ b/core/Command/Security/ImportCertificate.php
@@ -30,10 +30,9 @@ 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..7dcd2d02604 100644
--- a/core/Command/Security/RemoveCertificate.php
+++ b/core/Command/Security/RemoveCertificate.php
@@ -30,10 +30,9 @@ 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..c0bc265c8f5 100644
--- a/core/Command/Security/ResetBruteforceAttempts.php
+++ b/core/Command/Security/ResetBruteforceAttempts.php
@@ -30,10 +30,9 @@ 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..067cd00118a 100644
--- a/core/Command/SystemTag/Add.php
+++ b/core/Command/SystemTag/Add.php
@@ -31,10 +31,9 @@ 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..ed893ae037c 100644
--- a/core/Command/SystemTag/Delete.php
+++ b/core/Command/SystemTag/Delete.php
@@ -30,10 +30,9 @@ 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..111dc500e79 100644
--- a/core/Command/SystemTag/Edit.php
+++ b/core/Command/SystemTag/Edit.php
@@ -31,10 +31,9 @@ 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..c0f4eba241c 100644
--- a/core/Command/SystemTag/ListCommand.php
+++ b/core/Command/SystemTag/ListCommand.php
@@ -30,10 +30,9 @@ 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();
}