mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-06 03:34:54 +08:00
Merge branch 'constructor_property_promotion'
Signed-off-by: binsky <timo@binsky.org>
This commit is contained in:
commit
ca3966ed93
29 changed files with 174 additions and 300 deletions
|
@ -54,12 +54,10 @@ class Activity implements \OCP\Activity\IExtension {
|
|||
const SUBJECT_ITEM_RENAMED_SELF = 'item_renamed_self';
|
||||
|
||||
|
||||
protected $URLGenerator;
|
||||
protected $factory;
|
||||
|
||||
public function __construct(IURLGenerator $URLGenerator, IFactory $factory) {
|
||||
$this->URLGenerator = $URLGenerator;
|
||||
$this->factory = $factory;
|
||||
public function __construct(
|
||||
protected IURLGenerator $URLGenerator,
|
||||
protected IFactory $factory,
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,11 @@ class ExpireCredentials extends TimedJob {
|
|||
* @param IConfig $config
|
||||
* @param CronService $cronService
|
||||
*/
|
||||
public function __construct(ITimeFactory $timeFactory, protected IConfig $config, private CronService $cronService) {
|
||||
public function __construct(
|
||||
ITimeFactory $timeFactory,
|
||||
protected IConfig $config,
|
||||
private CronService $cronService,
|
||||
) {
|
||||
parent::__construct($timeFactory);
|
||||
|
||||
// Run once per minute
|
||||
|
|
|
@ -29,24 +29,18 @@ use OCP\IUserManager;
|
|||
|
||||
class AdminController extends ApiController {
|
||||
private $userId;
|
||||
private $vaultService;
|
||||
private $credentialService;
|
||||
private $fileService;
|
||||
private $revisionService;
|
||||
private $deleteVaultRequestService;
|
||||
private $config;
|
||||
private $userManager;
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
VaultService $vaultService,
|
||||
CredentialService $credentialService,
|
||||
FileService $fileService,
|
||||
CredentialRevisionService $revisionService,
|
||||
DeleteVaultRequestService $deleteVaultRequestService,
|
||||
IConfig $config,
|
||||
IUserManager $userManager
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
private VaultService $vaultService,
|
||||
private CredentialService $credentialService,
|
||||
private FileService $fileService,
|
||||
private CredentialRevisionService $revisionService,
|
||||
private DeleteVaultRequestService $deleteVaultRequestService,
|
||||
private IConfig $config,
|
||||
private IUserManager $userManager,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
|
@ -55,14 +49,7 @@ class AdminController extends ApiController {
|
|||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->userId = $UserId;
|
||||
$this->vaultService = $vaultService;
|
||||
$this->credentialService = $credentialService;
|
||||
$this->fileService = $fileService;
|
||||
$this->revisionService = $revisionService;
|
||||
$this->deleteVaultRequestService = $deleteVaultRequestService;
|
||||
|
||||
$this->config = $config;
|
||||
$this->userManager = $userManager;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,21 +29,16 @@ use OCP\IRequest;
|
|||
|
||||
class CredentialController extends ApiController {
|
||||
private $userId;
|
||||
private $credentialService;
|
||||
private $activityService;
|
||||
private $credentialRevisionService;
|
||||
private $sharingService;
|
||||
private $settings;
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
$userId,
|
||||
CredentialService $credentialService,
|
||||
ActivityService $activityService,
|
||||
CredentialRevisionService $credentialRevisionService,
|
||||
ShareService $sharingService,
|
||||
SettingsService $settings
|
||||
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$userId,
|
||||
private CredentialService $credentialService,
|
||||
private ActivityService $activityService,
|
||||
private CredentialRevisionService $credentialRevisionService,
|
||||
private ShareService $sharingService,
|
||||
private SettingsService $settings,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
|
@ -52,11 +47,6 @@ class CredentialController extends ApiController {
|
|||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->userId = $userId;
|
||||
$this->credentialService = $credentialService;
|
||||
$this->activityService = $activityService;
|
||||
$this->credentialRevisionService = $credentialRevisionService;
|
||||
$this->sharingService = $sharingService;
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,14 +19,14 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
class FileController extends ApiController {
|
||||
private $userId;
|
||||
private $fileService;
|
||||
private $logger;
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
FileService $fileService,
|
||||
LoggerInterface $logger) {
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
private FileService $fileService,
|
||||
private LoggerInterface $logger,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
$request,
|
||||
|
@ -34,8 +34,6 @@ class FileController extends ApiController {
|
|||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->userId = $UserId;
|
||||
$this->fileService = $fileService;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -25,17 +25,15 @@ use OCP\IURLGenerator;
|
|||
|
||||
class IconController extends ApiController {
|
||||
private $userId;
|
||||
private $credentialService;
|
||||
private $am;
|
||||
private $urlGenerator;
|
||||
const ICON_CACHE_OFFSET = 2592000; // 3600 * 24 * 30
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
CredentialService $credentialService,
|
||||
AppManager $am,
|
||||
IURLGenerator $urlGenerator
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
private CredentialService $credentialService,
|
||||
private AppManager $am,
|
||||
private IURLGenerator $urlGenerator,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
|
@ -44,9 +42,6 @@ class IconController extends ApiController {
|
|||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->userId = $UserId;
|
||||
$this->credentialService = $credentialService;
|
||||
$this->am = $am;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -21,18 +21,15 @@ use OCP\Notification\IManager;
|
|||
|
||||
class InternalController extends ApiController {
|
||||
private $userId;
|
||||
private $credentialService;
|
||||
private $config;
|
||||
private $manager;
|
||||
private $appManager;
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
CredentialService $credentialService,
|
||||
IConfig $config,
|
||||
IManager $IManager,
|
||||
IAppManager $appManager
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
private CredentialService $credentialService,
|
||||
private IConfig $config,
|
||||
private IManager $manager,
|
||||
private IAppManager $appManager,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
|
@ -41,10 +38,6 @@ class InternalController extends ApiController {
|
|||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->userId = $UserId;
|
||||
$this->credentialService = $credentialService;
|
||||
$this->config = $config;
|
||||
$this->manager = $IManager;
|
||||
$this->appManager = $appManager;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,24 +19,20 @@ use OCP\IL10N;
|
|||
use OCP\IRequest;
|
||||
|
||||
class SettingsController extends ApiController {
|
||||
private $userId;
|
||||
private $settings;
|
||||
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$userId,
|
||||
SettingsService $settings,
|
||||
IL10N $l) {
|
||||
private $userId,
|
||||
private SettingsService $settings,
|
||||
private IL10N $l,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
$request,
|
||||
'GET, POST, DELETE, PUT, PATCH, OPTIONS',
|
||||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->settings = $settings;
|
||||
$this->l = $l;
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,33 +36,24 @@ use OCP\Notification\IManager;
|
|||
|
||||
class ShareController extends ApiController {
|
||||
private $userId;
|
||||
private $activityService;
|
||||
private $groupManager;
|
||||
private $userManager;
|
||||
private $vaultService;
|
||||
private $shareService;
|
||||
private $credentialService;
|
||||
private $notificationService;
|
||||
private $fileService;
|
||||
private $settings;
|
||||
private $manager;
|
||||
|
||||
private $limit = 50;
|
||||
private $offset = 0;
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
IGroupManager $groupManager,
|
||||
IUserManager $userManager,
|
||||
ActivityService $activityService,
|
||||
VaultService $vaultService,
|
||||
ShareService $shareService,
|
||||
CredentialService $credentialService,
|
||||
NotificationService $notificationService,
|
||||
FileService $fileService,
|
||||
SettingsService $config,
|
||||
IManager $IManager
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
private IGroupManager $groupManager,
|
||||
private IUserManager $userManager,
|
||||
private ActivityService $activityService,
|
||||
private VaultService $vaultService,
|
||||
private ShareService $shareService,
|
||||
private CredentialService $credentialService,
|
||||
private NotificationService $notificationService,
|
||||
private FileService $fileService,
|
||||
private SettingsService $settings,
|
||||
private IManager $manager,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
|
@ -72,16 +63,6 @@ class ShareController extends ApiController {
|
|||
86400);
|
||||
|
||||
$this->userId = $UserId;
|
||||
$this->userManager = $userManager;
|
||||
$this->groupManager = $groupManager;
|
||||
$this->activityService = $activityService;
|
||||
$this->vaultService = $vaultService;
|
||||
$this->shareService = $shareService;
|
||||
$this->credentialService = $credentialService;
|
||||
$this->notificationService = $notificationService;
|
||||
$this->fileService = $fileService;
|
||||
$this->settings = $config;
|
||||
$this->manager = $IManager;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,11 +17,11 @@ use OCP\IL10N;
|
|||
use OCP\IRequest;
|
||||
|
||||
class TranslationController extends ApiController {
|
||||
private $trans;
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
IL10N $trans
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
private IL10N $trans,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
|
@ -29,7 +29,6 @@ class TranslationController extends ApiController {
|
|||
'GET, POST, DELETE, PUT, PATCH, OPTIONS',
|
||||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->trans = $trans;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,22 +26,18 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
class VaultController extends ApiController {
|
||||
private $userId;
|
||||
private $vaultService;
|
||||
private $credentialService;
|
||||
private $settings;
|
||||
private $fileService;
|
||||
private $logger;
|
||||
private $deleteVaultRequestService;
|
||||
|
||||
public function __construct($AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
VaultService $vaultService,
|
||||
CredentialService $credentialService,
|
||||
DeleteVaultRequestService $deleteVaultRequestService,
|
||||
SettingsService $settings,
|
||||
FileService $fileService,
|
||||
LoggerInterface $logger) {
|
||||
public function __construct(
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
$UserId,
|
||||
private VaultService $vaultService,
|
||||
private CredentialService $credentialService,
|
||||
private DeleteVaultRequestService $deleteVaultRequestService,
|
||||
private SettingsService $settings,
|
||||
private FileService $fileService,
|
||||
private LoggerInterface $logger,
|
||||
) {
|
||||
parent::__construct(
|
||||
$AppName,
|
||||
$request,
|
||||
|
@ -49,12 +45,6 @@ class VaultController extends ApiController {
|
|||
'Authorization, Content-Type, Accept',
|
||||
86400);
|
||||
$this->userId = $UserId;
|
||||
$this->vaultService = $vaultService;
|
||||
$this->credentialService = $credentialService;
|
||||
$this->deleteVaultRequestService = $deleteVaultRequestService;
|
||||
$this->settings = $settings;
|
||||
$this->fileService = $fileService;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,11 +33,12 @@ use OCP\IDBConnection;
|
|||
|
||||
class CredentialMapper extends QBMapper {
|
||||
const TABLE_NAME = 'passman_credentials';
|
||||
private Utils $utils;
|
||||
|
||||
public function __construct(IDBConnection $db, Utils $utils) {
|
||||
public function __construct(
|
||||
IDBConnection $db,
|
||||
private Utils $utils,
|
||||
) {
|
||||
parent::__construct($db, self::TABLE_NAME);
|
||||
$this->utils = $utils;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,11 +34,12 @@ use OCP\IDBConnection;
|
|||
|
||||
class FileMapper extends QBMapper {
|
||||
const TABLE_NAME = 'passman_files';
|
||||
private Utils $utils;
|
||||
|
||||
public function __construct(IDBConnection $db, Utils $utils) {
|
||||
public function __construct(
|
||||
IDBConnection $db,
|
||||
private Utils $utils,
|
||||
) {
|
||||
parent::__construct($db, self::TABLE_NAME);
|
||||
$this->utils = $utils;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,11 +33,12 @@ use OCP\IDBConnection;
|
|||
|
||||
class VaultMapper extends QBMapper {
|
||||
const TABLE_NAME = 'passman_vaults';
|
||||
private Utils $utils;
|
||||
|
||||
public function __construct(IDBConnection $db, Utils $utils) {
|
||||
public function __construct(
|
||||
IDBConnection $db,
|
||||
private Utils $utils,
|
||||
) {
|
||||
parent::__construct($db, self::TABLE_NAME);
|
||||
$this->utils = $utils;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,10 +9,9 @@ use OCP\IRequest;
|
|||
|
||||
class APIMiddleware extends Middleware {
|
||||
|
||||
private $request;
|
||||
|
||||
public function __construct(IRequest $request) {
|
||||
$this->request = $request;
|
||||
public function __construct(
|
||||
private IRequest $request,
|
||||
) {
|
||||
}
|
||||
|
||||
public function afterController($controller, $methodName, Response $response) {
|
||||
|
|
|
@ -39,35 +39,18 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
class ServerSideEncryption implements IRepairStep {
|
||||
|
||||
/** @var EncryptService */
|
||||
private $encryptService;
|
||||
|
||||
/** @var IDBConnection */
|
||||
private $db;
|
||||
|
||||
/** @var string */
|
||||
private $installedVersion;
|
||||
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
|
||||
/** @var CredentialService */
|
||||
private $credentialService;
|
||||
|
||||
/** @var CredentialRevisionService */
|
||||
private $revisionService;
|
||||
|
||||
/** @var FileService */
|
||||
private $fileService;
|
||||
|
||||
public function __construct(EncryptService $encryptService, IDBConnection $db, LoggerInterface $logger, CredentialService $credentialService, CredentialRevisionService $revisionService,
|
||||
FileService $fileService, IConfig $config) {
|
||||
$this->encryptService = $encryptService;
|
||||
$this->db = $db;
|
||||
$this->logger = $logger;
|
||||
$this->credentialService = $credentialService;
|
||||
$this->revisionService = $revisionService;
|
||||
$this->fileService = $fileService;
|
||||
public function __construct(
|
||||
private EncryptService $encryptService,
|
||||
private IDBConnection $db,
|
||||
private LoggerInterface $logger,
|
||||
private CredentialService $credentialService,
|
||||
private CredentialRevisionService $revisionService,
|
||||
private FileService $fileService,
|
||||
IConfig $config,
|
||||
) {
|
||||
$this->installedVersion = $config->getAppValue('passman', 'installed_version');
|
||||
}
|
||||
|
||||
|
|
|
@ -15,9 +15,6 @@ use OCP\Migration\SimpleMigrationStep;
|
|||
*/
|
||||
class Version02031335Date20211001122343 extends SimpleMigrationStep {
|
||||
|
||||
/** @var IDBConnection */
|
||||
protected $connection;
|
||||
|
||||
protected $oldColumn = 'favicon';
|
||||
protected $newColumn = 'icon';
|
||||
protected $dataMigrationRequired = false;
|
||||
|
@ -25,8 +22,9 @@ class Version02031335Date20211001122343 extends SimpleMigrationStep {
|
|||
/**
|
||||
* @param IDBConnection $connection
|
||||
*/
|
||||
public function __construct(IDBConnection $connection) {
|
||||
$this->connection = $connection;
|
||||
public function __construct(
|
||||
protected IDBConnection $connection,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -29,10 +29,9 @@ use OCP\Notification\INotifier;
|
|||
|
||||
class Notifier implements INotifier {
|
||||
|
||||
protected IFactory $factory;
|
||||
|
||||
public function __construct(IFactory $factory) {
|
||||
$this->factory = $factory;
|
||||
public function __construct(
|
||||
protected IFactory $factory,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,16 +42,13 @@ use OCP\Search\SearchResultEntry;
|
|||
|
||||
class Provider implements IProvider {
|
||||
|
||||
private IL10N $l10n;
|
||||
private IURLGenerator $urlGenerator;
|
||||
private IDBConnection $db;
|
||||
private SettingsService $settings;
|
||||
public function __construct(
|
||||
private IL10N $l10n,
|
||||
private IURLGenerator $urlGenerator,
|
||||
private IDBConnection $db,
|
||||
private SettingsService $settings,
|
||||
) {
|
||||
|
||||
public function __construct(IL10N $l10n, IURLGenerator $urlGenerator, IDBConnection $db, SettingsService $settings) {
|
||||
$this->l10n = $l10n;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->db = $db;
|
||||
$this->settings = $settings;
|
||||
}
|
||||
|
||||
public function getId(): string {
|
||||
|
|
|
@ -33,13 +33,13 @@ use OCP\IConfig;
|
|||
|
||||
class CredentialRevisionService {
|
||||
|
||||
private CredentialRevisionMapper $credentialRevisionMapper;
|
||||
private EncryptService $encryptService;
|
||||
private $server_key;
|
||||
|
||||
public function __construct(CredentialRevisionMapper $credentialRevisionMapper, EncryptService $encryptService, IConfig $config) {
|
||||
$this->credentialRevisionMapper = $credentialRevisionMapper;
|
||||
$this->encryptService = $encryptService;
|
||||
public function __construct(
|
||||
private CredentialRevisionMapper $credentialRevisionMapper,
|
||||
private EncryptService $encryptService,
|
||||
IConfig $config,
|
||||
) {
|
||||
$this->server_key = $config->getSystemValue('passwordsalt', '');
|
||||
}
|
||||
|
||||
|
|
|
@ -36,27 +36,17 @@ use OCP\IConfig;
|
|||
|
||||
class CredentialService {
|
||||
|
||||
private CredentialMapper $credentialMapper;
|
||||
private SharingACLMapper $sharingACL;
|
||||
private ActivityService $activityService;
|
||||
private ShareService $shareService;
|
||||
private EncryptService $encryptService;
|
||||
private CredentialRevisionService $credentialRevisionService;
|
||||
private $server_key;
|
||||
|
||||
public function __construct(CredentialMapper $credentialMapper,
|
||||
SharingACLMapper $sharingACL,
|
||||
ActivityService $activityService,
|
||||
ShareService $shareService,
|
||||
EncryptService $encryptService,
|
||||
CredentialRevisionService $credentialRevisionService,
|
||||
IConfig $config) {
|
||||
$this->credentialMapper = $credentialMapper;
|
||||
$this->sharingACL = $sharingACL;
|
||||
$this->activityService = $activityService;
|
||||
$this->shareService = $shareService;
|
||||
$this->encryptService = $encryptService;
|
||||
$this->credentialRevisionService = $credentialRevisionService;
|
||||
public function __construct(
|
||||
private CredentialMapper $credentialMapper,
|
||||
private SharingACLMapper $sharingACL,
|
||||
private ActivityService $activityService,
|
||||
private ShareService $shareService,
|
||||
private EncryptService $encryptService,
|
||||
private CredentialRevisionService $credentialRevisionService,
|
||||
IConfig $config,
|
||||
) {
|
||||
$this->server_key = $config->getSystemValue('passwordsalt', '');
|
||||
}
|
||||
|
||||
|
|
|
@ -32,20 +32,14 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
class CronService {
|
||||
|
||||
private CredentialService $credentialService;
|
||||
private LoggerInterface $logger;
|
||||
private Utils $utils;
|
||||
private NotificationService $notificationService;
|
||||
private ActivityService $activityService;
|
||||
private IDBConnection $db;
|
||||
|
||||
public function __construct(CredentialService $credentialService, LoggerInterface $logger, Utils $utils, NotificationService $notificationService, ActivityService $activityService, IDBConnection $db) {
|
||||
$this->credentialService = $credentialService;
|
||||
$this->logger = $logger;
|
||||
$this->utils = $utils;
|
||||
$this->notificationService = $notificationService;
|
||||
$this->activityService = $activityService;
|
||||
$this->db = $db;
|
||||
public function __construct(
|
||||
private CredentialService $credentialService,
|
||||
private LoggerInterface $logger,
|
||||
private Utils $utils,
|
||||
private NotificationService $notificationService,
|
||||
private ActivityService $activityService,
|
||||
private IDBConnection $db,
|
||||
) {
|
||||
}
|
||||
|
||||
public function expireCredentials() {
|
||||
|
|
|
@ -30,10 +30,9 @@ use OCP\AppFramework\Db\Entity;
|
|||
|
||||
class DeleteVaultRequestService {
|
||||
|
||||
private DeleteVaultRequestMapper $deleteVaultRequestMapper;
|
||||
|
||||
public function __construct(DeleteVaultRequestMapper $deleteVaultRequestMapper) {
|
||||
$this->deleteVaultRequestMapper = $deleteVaultRequestMapper;
|
||||
public function __construct(
|
||||
private DeleteVaultRequestMapper $deleteVaultRequestMapper,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,13 +34,13 @@ use OCP\IConfig;
|
|||
|
||||
class FileService {
|
||||
|
||||
private FileMapper $fileMapper;
|
||||
private EncryptService $encryptService;
|
||||
private $server_key;
|
||||
|
||||
public function __construct(FileMapper $fileMapper, EncryptService $encryptService, IConfig $config) {
|
||||
$this->fileMapper = $fileMapper;
|
||||
$this->encryptService = $encryptService;
|
||||
public function __construct(
|
||||
private FileMapper $fileMapper,
|
||||
private EncryptService $encryptService,
|
||||
IConfig $config,
|
||||
) {
|
||||
$this->server_key = $config->getSystemValue('passwordsalt', '');
|
||||
}
|
||||
|
||||
|
|
|
@ -28,13 +28,10 @@ use OCP\IURLGenerator;
|
|||
use OCP\Notification\IManager;
|
||||
|
||||
class NotificationService {
|
||||
|
||||
private IManager $manager;
|
||||
private IURLGenerator $urlGenerator;
|
||||
|
||||
public function __construct(IManager $IManager, IURLGenerator $urlGenerator) {
|
||||
$this->manager = $IManager;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
public function __construct(
|
||||
private IManager $manager,
|
||||
private IURLGenerator $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
function credentialExpiredNotification($credential) {
|
||||
|
|
|
@ -29,7 +29,6 @@ use OCP\IConfig;
|
|||
class SettingsService {
|
||||
|
||||
private $userId;
|
||||
private $config;
|
||||
private $appName;
|
||||
public $settings;
|
||||
|
||||
|
@ -44,9 +43,12 @@ class SettingsService {
|
|||
'settings_loaded'
|
||||
];
|
||||
|
||||
public function __construct($UserId, IConfig $config, $AppName) {
|
||||
public function __construct(
|
||||
$UserId,
|
||||
private IConfig $config,
|
||||
$AppName,
|
||||
) {
|
||||
$this->userId = $UserId;
|
||||
$this->config = $config;
|
||||
$this->appName = $AppName;
|
||||
$this->settings = [
|
||||
'link_sharing_enabled' => intval($this->config->getAppValue('passman', 'link_sharing_enabled', 1)),
|
||||
|
|
|
@ -38,28 +38,14 @@ use OCP\DB\IResult;
|
|||
use OCP\Notification\IManager;
|
||||
|
||||
class ShareService {
|
||||
private SharingACLMapper $sharingACL;
|
||||
private ShareRequestMapper $shareRequest;
|
||||
private CredentialMapper $credential;
|
||||
private CredentialRevisionService $revisions;
|
||||
private EncryptService $encryptService;
|
||||
private IManager $IManager;
|
||||
|
||||
|
||||
public function __construct(
|
||||
SharingACLMapper $sharingACL,
|
||||
ShareRequestMapper $shareRequest,
|
||||
CredentialMapper $credentials,
|
||||
CredentialRevisionService $revisions,
|
||||
EncryptService $encryptService,
|
||||
IManager $IManager
|
||||
private SharingACLMapper $sharingACL,
|
||||
private ShareRequestMapper $shareRequest,
|
||||
private CredentialMapper $credential,
|
||||
private CredentialRevisionService $revisions,
|
||||
private EncryptService $encryptService,
|
||||
private IManager $IManager,
|
||||
) {
|
||||
$this->sharingACL = $sharingACL;
|
||||
$this->shareRequest = $shareRequest;
|
||||
$this->credential = $credentials;
|
||||
$this->revisions = $revisions;
|
||||
$this->encryptService = $encryptService;
|
||||
$this->IManager = $IManager;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,10 +32,10 @@ use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
|||
|
||||
class VaultService {
|
||||
|
||||
private $vaultMapper;
|
||||
public function __construct(
|
||||
private VaultMapper $vaultMapper,
|
||||
) {
|
||||
|
||||
public function __construct(VaultMapper $vaultMapper) {
|
||||
$this->vaultMapper = $vaultMapper;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,22 +33,18 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
class Admin implements ISettings {
|
||||
|
||||
protected IConfig $config;
|
||||
private IL10N $l;
|
||||
private IAppManager $appManager;
|
||||
private LoggerInterface $logger;
|
||||
|
||||
/**
|
||||
* Admin constructor.
|
||||
* @param IConfig $config
|
||||
* @param IL10N $l
|
||||
* @param IAppManager $appManager
|
||||
*/
|
||||
public function __construct(IConfig $config, IL10N $l, IAppManager $appManager, LoggerInterface $logger) {
|
||||
$this->config = $config;
|
||||
$this->l = $l;
|
||||
$this->appManager = $appManager;
|
||||
$this->logger = $logger;
|
||||
public function __construct(
|
||||
protected IConfig $config,
|
||||
private IL10N $l,
|
||||
private IAppManager $appManager,
|
||||
private LoggerInterface $logger,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue