in core/Command and /TwoFactorAuth classes. Signed-off-by: Faraz Samapoor <fsa@adlas.at>tags/v28.0.0beta1
@@ -29,11 +29,8 @@ use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
class Check extends Base { | |||
private SystemConfig $config; | |||
public function __construct(SystemConfig $config) { | |||
public function __construct(private SystemConfig $config) { | |||
parent::__construct(); | |||
$this->config = $config; | |||
} | |||
protected function configure() { |
@@ -33,14 +33,11 @@ use Symfony\Component\Console\Input\InputOption; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
class Status extends Base { | |||
private IConfig $config; | |||
private Defaults $themingDefaults; | |||
public function __construct(IConfig $config, Defaults $themingDefaults) { | |||
public function __construct( | |||
private IConfig $config, | |||
private Defaults $themingDefaults, | |||
) { | |||
parent::__construct('status'); | |||
$this->config = $config; | |||
$this->themingDefaults = $themingDefaults; | |||
} | |||
protected function configure() { |
@@ -32,12 +32,8 @@ use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
class Cleanup extends Base { | |||
private IRegistry $registry; | |||
public function __construct(IRegistry $registry) { | |||
public function __construct(private IRegistry $registry) { | |||
parent::__construct(); | |||
$this->registry = $registry; | |||
} | |||
protected function configure() { |
@@ -29,12 +29,11 @@ use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
class Disable extends Base { | |||
private ProviderManager $manager; | |||
public function __construct(ProviderManager $manager, IUserManager $userManager) { | |||
public function __construct( | |||
private ProviderManager $manager, | |||
protected IUserManager $userManager, | |||
) { | |||
parent::__construct('twofactorauth:disable'); | |||
$this->manager = $manager; | |||
$this->userManager = $userManager; | |||
} | |||
protected function configure() { |
@@ -29,12 +29,11 @@ use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
class Enable extends Base { | |||
private ProviderManager $manager; | |||
public function __construct(ProviderManager $manager, IUserManager $userManager) { | |||
public function __construct( | |||
private ProviderManager $manager, | |||
protected IUserManager $userManager, | |||
) { | |||
parent::__construct('twofactorauth:enable'); | |||
$this->manager = $manager; | |||
$this->userManager = $userManager; | |||
} | |||
protected function configure() { |
@@ -35,12 +35,8 @@ use Symfony\Component\Console\Input\InputOption; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
class Enforce extends Command { | |||
private MandatoryTwoFactor $mandatoryTwoFactor; | |||
public function __construct(MandatoryTwoFactor $mandatoryTwoFactor) { | |||
public function __construct(private MandatoryTwoFactor $mandatoryTwoFactor) { | |||
parent::__construct(); | |||
$this->mandatoryTwoFactor = $mandatoryTwoFactor; | |||
} | |||
protected function configure() { |
@@ -33,13 +33,11 @@ use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
class State extends Base { | |||
private IRegistry $registry; | |||
public function __construct(IRegistry $registry, IUserManager $userManager) { | |||
public function __construct( | |||
private IRegistry $registry, | |||
protected IUserManager $userManager, | |||
) { | |||
parent::__construct('twofactorauth:state'); | |||
$this->registry = $registry; | |||
$this->userManager = $userManager; | |||
} | |||
protected function configure() { |
@@ -62,15 +62,12 @@ class Upgrade extends Command { | |||
public const ERROR_INVALID_ARGUMENTS = 4; | |||
public const ERROR_FAILURE = 5; | |||
private IConfig $config; | |||
private LoggerInterface $logger; | |||
private Installer $installer; | |||
public function __construct(IConfig $config, LoggerInterface $logger, Installer $installer) { | |||
public function __construct( | |||
private IConfig $config, | |||
private LoggerInterface $logger, | |||
private Installer $installer, | |||
) { | |||
parent::__construct(); | |||
$this->config = $config; | |||
$this->logger = $logger; | |||
$this->installer = $installer; | |||
} | |||
protected function configure() { |