fix(controller): Migrate to new constructors
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
a3f144c3a0
Коммит
1d74f5c62c
|
@ -20,27 +20,14 @@ use OCP\IUserManager;
|
|||
use OCP\Notification\IManager;
|
||||
|
||||
class APIController extends OCSController {
|
||||
/** @var ITimeFactory */
|
||||
protected $timeFactory;
|
||||
|
||||
/** @var IUserManager */
|
||||
protected $userManager;
|
||||
|
||||
/** @var IManager */
|
||||
protected $notificationManager;
|
||||
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
ITimeFactory $timeFactory,
|
||||
IUserManager $userManager,
|
||||
IManager $notificationManager,
|
||||
protected ITimeFactory $timeFactory,
|
||||
protected IUserManager $userManager,
|
||||
protected IManager $notificationManager,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
|
||||
$this->timeFactory = $timeFactory;
|
||||
$this->userManager = $userManager;
|
||||
$this->notificationManager = $notificationManager;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,35 +32,16 @@ use OCP\IUserSession;
|
|||
*/
|
||||
#[OpenAPI(scope: 'push')]
|
||||
class PushController extends OCSController {
|
||||
/** @var IDBConnection */
|
||||
private $db;
|
||||
|
||||
/** @var ISession */
|
||||
private $session;
|
||||
|
||||
/** @var IUserSession */
|
||||
private $userSession;
|
||||
|
||||
/** @var IProvider */
|
||||
private $tokenProvider;
|
||||
|
||||
/** @var Manager */
|
||||
private $identityProof;
|
||||
|
||||
public function __construct(string $appName,
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
IDBConnection $db,
|
||||
ISession $session,
|
||||
IUserSession $userSession,
|
||||
IProvider $tokenProvider,
|
||||
Manager $identityProof) {
|
||||
protected IDBConnection $db,
|
||||
protected ISession $session,
|
||||
protected IUserSession $userSession,
|
||||
protected IProvider $tokenProvider,
|
||||
protected Manager $identityProof,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
|
||||
$this->db = $db;
|
||||
$this->session = $session;
|
||||
$this->userSession = $userSession;
|
||||
$this->tokenProvider = $tokenProvider;
|
||||
$this->identityProof = $identityProof;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,19 +20,14 @@ use OCP\IConfig;
|
|||
use OCP\IRequest;
|
||||
|
||||
class SettingsController extends OCSController {
|
||||
protected IConfig $config;
|
||||
protected SettingsMapper $settingsMapper;
|
||||
protected string $userId;
|
||||
|
||||
public function __construct(string $appName,
|
||||
public function __construct(
|
||||
string $appName,
|
||||
IRequest $request,
|
||||
IConfig $config,
|
||||
SettingsMapper $settingsMapper,
|
||||
string $userId) {
|
||||
protected IConfig $config,
|
||||
protected SettingsMapper $settingsMapper,
|
||||
protected string $userId,
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->config = $config;
|
||||
$this->settingsMapper = $settingsMapper;
|
||||
$this->userId = $userId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче