mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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
This commit is contained in:
commit
5063bf37ed
10 changed files with 31 additions and 42 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue