From d83944fd101ca46f53cdb11520ae3b011f62b2b8 Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Mon, 12 Jun 2023 19:16:09 +0330 Subject: Uses PHP8's constructor property promotion. in core/Command/Log, /Security, and /SystemTag classes. Signed-off-by: Faraz Samapoor --- core/Command/Security/ImportCertificate.php | 5 +---- core/Command/Security/ListCertificates.php | 10 ++++------ core/Command/Security/RemoveCertificate.php | 5 +---- core/Command/Security/ResetBruteforceAttempts.php | 5 +---- 4 files changed, 7 insertions(+), 18 deletions(-) (limited to 'core/Command/Security') 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(); } -- cgit v1.2.3