chore: use DI for Command\Security\ListCertificates

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/43203/head
Côme Chilliet 4 months ago
parent f4a267536a
commit 46f729b63b
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A

@ -26,16 +26,20 @@ use OC\Core\Command\Base;
use OCP\ICertificate;
use OCP\ICertificateManager;
use OCP\IL10N;
use OCP\L10N\IFactory as IL10NFactory;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ListCertificates extends Base {
protected IL10N $l;
public function __construct(
protected ICertificateManager $certificateManager,
protected IL10N $l,
IL10NFactory $l10nFactory,
) {
parent::__construct();
$this->l = $l10nFactory->get('core');
}
protected function configure() {

@ -180,7 +180,7 @@ if ($config->getSystemValueBool('installed', false)) {
$application->add(Server::get(Command\SystemTag\Add::class));
$application->add(Server::get(Command\SystemTag\Edit::class));
$application->add(new Command\Security\ListCertificates(\OC::$server->getCertificateManager(), \OC::$server->getL10N('core')));
$application->add(Server::get(Command\Security\ListCertificates::class));
$application->add(Server::get(Command\Security\ImportCertificate::class));
$application->add(Server::get(Command\Security\RemoveCertificate::class));
$application->add(Server::get(Command\Security\BruteforceAttempts::class));

Loading…
Cancel
Save