diff options
author | Faraz Samapoor <fsa@adlas.at> | 2023-06-12 19:16:09 +0330 |
---|---|---|
committer | Louis <6653109+artonge@users.noreply.github.com> | 2023-06-19 17:44:48 +0200 |
commit | d83944fd101ca46f53cdb11520ae3b011f62b2b8 (patch) | |
tree | 884d7d132d4f60ba1a2af30fd1e4b1fceacc8fc4 /core/Command/Security | |
parent | 81bb3362b24a621fb399877739e7bff35ec13eb7 (diff) | |
download | nextcloud-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/Security')
-rw-r--r-- | core/Command/Security/ImportCertificate.php | 5 | ||||
-rw-r--r-- | core/Command/Security/ListCertificates.php | 10 | ||||
-rw-r--r-- | core/Command/Security/RemoveCertificate.php | 5 | ||||
-rw-r--r-- | core/Command/Security/ResetBruteforceAttempts.php | 5 |
4 files changed, 7 insertions, 18 deletions
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(); } |