diff options
author | Joas Schilling <coding@schilljs.com> | 2016-10-05 16:31:28 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-10-05 16:36:49 +0200 |
commit | 4db5b2a2c6737cb9377db3316af9e5fb1353055f (patch) | |
tree | 80912cef60e93ebc99bd3d24338248cd2366605b /settings/Controller | |
parent | 8b3deb00b3af145a3a27af04b1332a804e7d8da4 (diff) | |
download | nextcloud-server-4db5b2a2c6737cb9377db3316af9e5fb1353055f.tar.gz nextcloud-server-4db5b2a2c6737cb9377db3316af9e5fb1353055f.zip |
Use magic DI as much as possible
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'settings/Controller')
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 6 | ||||
-rw-r--r-- | settings/Controller/EncryptionController.php | 21 | ||||
-rw-r--r-- | settings/Controller/MailSettingsController.php | 25 |
3 files changed, 24 insertions, 28 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 5e6ad7859a7..58994f0d59c 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -60,14 +60,14 @@ class AuthSettingsController extends Controller { * @param IUserManager $userManager * @param ISession $session * @param ISecureRandom $random - * @param string $uid + * @param string $userId */ public function __construct($appName, IRequest $request, IProvider $tokenProvider, IUserManager $userManager, - ISession $session, ISecureRandom $random, $uid) { + ISession $session, ISecureRandom $random, $userId) { parent::__construct($appName, $request); $this->tokenProvider = $tokenProvider; $this->userManager = $userManager; - $this->uid = $uid; + $this->uid = $userId; $this->session = $session; $this->random = $random; } diff --git a/settings/Controller/EncryptionController.php b/settings/Controller/EncryptionController.php index b2757b0965f..cda50853fdc 100644 --- a/settings/Controller/EncryptionController.php +++ b/settings/Controller/EncryptionController.php @@ -23,14 +23,15 @@ namespace OC\Settings\Controller; + use OC\Files\View; use OCA\Encryption\Migration; +use OCP\IDBConnection; use OCP\IL10N; use OCP\AppFramework\Controller; use OCP\ILogger; use OCP\IRequest; use OCP\IConfig; -use OC\DB\Connection; use OCP\IUserManager; /** @@ -38,10 +39,10 @@ use OCP\IUserManager; */ class EncryptionController extends Controller { - /** @var \OCP\IL10N */ + /** @var IL10N */ private $l10n; - /** @var Connection */ + /** @var IDBConnection */ private $connection; /** @var IConfig */ @@ -53,15 +54,15 @@ class EncryptionController extends Controller { /** @var View */ private $view; - /** @var ILogger */ + /** @var ILogger */ private $logger; /** * @param string $appName * @param IRequest $request - * @param \OCP\IL10N $l10n - * @param \OCP\IConfig $config - * @param \OC\DB\Connection $connection + * @param IL10N $l10n + * @param IConfig $config + * @param IDBConnection $connection * @param IUserManager $userManager * @param View $view * @param ILogger $logger @@ -70,7 +71,7 @@ class EncryptionController extends Controller { IRequest $request, IL10N $l10n, IConfig $config, - Connection $connection, + IDBConnection $connection, IUserManager $userManager, View $view, ILogger $logger) { @@ -86,13 +87,13 @@ class EncryptionController extends Controller { /** * @param IConfig $config * @param View $view - * @param Connection $connection + * @param IDBConnection $connection * @param ILogger $logger * @return Migration */ protected function getMigration(IConfig $config, View $view, - Connection $connection, + IDBConnection $connection, ILogger $logger) { return new Migration($config, $view, $connection, $logger); } diff --git a/settings/Controller/MailSettingsController.php b/settings/Controller/MailSettingsController.php index 6ff12dec40c..84423aa8e29 100644 --- a/settings/Controller/MailSettingsController.php +++ b/settings/Controller/MailSettingsController.php @@ -24,11 +24,11 @@ namespace OC\Settings\Controller; -use OC\User\Session; -use \OCP\AppFramework\Controller; +use OCP\AppFramework\Controller; use OCP\IRequest; use OCP\IL10N; use OCP\IConfig; +use OCP\IUserSession; use OCP\Mail\IMailer; /** @@ -36,14 +36,12 @@ use OCP\Mail\IMailer; */ class MailSettingsController extends Controller { - /** @var \OCP\IL10N */ + /** @var IL10N */ private $l10n; - /** @var \OCP\IConfig */ + /** @var IConfig */ private $config; - /** @var Session */ + /** @var IUserSession */ private $userSession; - /** @var \OC_Defaults */ - private $defaults; /** @var IMailer */ private $mailer; /** @var string */ @@ -54,26 +52,23 @@ class MailSettingsController extends Controller { * @param IRequest $request * @param IL10N $l10n * @param IConfig $config - * @param Session $userSession - * @param \OC_Defaults $defaults + * @param IUserSession $userSession * @param IMailer $mailer - * @param string $defaultMailAddress + * @param string $fromMailAddress */ public function __construct($appName, IRequest $request, IL10N $l10n, IConfig $config, - Session $userSession, - \OC_Defaults $defaults, + IUserSession $userSession, IMailer $mailer, - $defaultMailAddress) { + $fromMailAddress) { parent::__construct($appName, $request); $this->l10n = $l10n; $this->config = $config; $this->userSession = $userSession; - $this->defaults = $defaults; $this->mailer = $mailer; - $this->defaultMailAddress = $defaultMailAddress; + $this->defaultMailAddress = $fromMailAddress; } /** |