chore: Fix DI for Encryption\DecryptAll command

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

@ -9,6 +9,7 @@ declare(strict_types=1);
* @author Björn Schießle <bjoern@schiessle.org>
* @author Christian Kampka <christian@kampka.net>
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Côme Chilliet <come.chilliet@nextcloud.com>
* @author Daniel Calviño Sánchez <danxuliu@gmail.com>
* @author Daniel Kesselberg <mail@danielkesselberg.de>
* @author Denis Mosolov <denismosolov@gmail.com>

@ -31,6 +31,7 @@ namespace OC\Encryption;
use OC\Encryption\Exceptions\DecryptionFailedException;
use OC\Files\View;
use OCP\Encryption\IEncryptionModule;
use OCP\Encryption\IManager;
use OCP\IUserManager;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputInterface;
@ -43,31 +44,14 @@ class DecryptAll {
/** @var InputInterface */
protected $input;
/** @var Manager */
protected $encryptionManager;
/** @var IUserManager */
protected $userManager;
/** @var View */
protected $rootView;
/** @var array files which couldn't be decrypted */
protected $failed;
/**
* @param Manager $encryptionManager
* @param IUserManager $userManager
* @param View $rootView
*/
public function __construct(
Manager $encryptionManager,
IUserManager $userManager,
View $rootView
protected IManager $encryptionManager,
protected IUserManager $userManager,
protected View $rootView
) {
$this->encryptionManager = $encryptionManager;
$this->userManager = $userManager;
$this->rootView = $rootView;
$this->failed = [];
}

@ -39,34 +39,17 @@ use OCP\IL10N;
use Psr\Log\LoggerInterface;
class Manager implements IManager {
/** @var array */
protected $encryptionModules;
/** @var IConfig */
protected $config;
protected LoggerInterface $logger;
/** @var Il10n */
protected $l;
/** @var View */
protected $rootView;
/** @var Util */
protected $util;
/** @var ArrayCache */
protected $arrayCache;
public function __construct(IConfig $config, LoggerInterface $logger, IL10N $l10n, View $rootView, Util $util, ArrayCache $arrayCache) {
protected array $encryptionModules;
public function __construct(
protected IConfig $config,
protected LoggerInterface $logger,
protected IL10N $l,
protected View $rootView,
protected Util $util,
protected ArrayCache $arrayCache,
) {
$this->encryptionModules = [];
$this->config = $config;
$this->logger = $logger;
$this->l = $l10n;
$this->rootView = $rootView;
$this->util = $util;
$this->arrayCache = $arrayCache;
}
/**

Loading…
Cancel
Save