Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-04-09 23:20:49 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-04-10 09:26:16 +0300
commit8cc33c1f5c0e6f5abf5bd73ab4a9ade31a540731 (patch)
tree3b974783a2379b2867b787f3a9eef43620841882 /lib
parentc9a325afa58e8358ad64c250bec171a1448fcbaa (diff)
Smal cleanup of the AccountsController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/AccountsController.php23
1 files changed, 4 insertions, 19 deletions
diff --git a/lib/Controller/AccountsController.php b/lib/Controller/AccountsController.php
index ec6010694..094def02f 100644
--- a/lib/Controller/AccountsController.php
+++ b/lib/Controller/AccountsController.php
@@ -46,7 +46,6 @@ use OCP\AppFramework\Http;
use OCP\IL10N;
use OCP\ILogger;
use OCP\IRequest;
-use OCP\Security\ICrypto;
class AccountsController extends Controller {
@@ -65,9 +64,6 @@ class AccountsController extends Controller {
/** @var IL10N */
private $l10n;
- /** @var ICrypto */
- private $crypto;
-
/** @var AliasesService */
private $aliasesService;
@@ -77,17 +73,7 @@ class AccountsController extends Controller {
/** @var SetupService */
private $setup;
- /**
- * @param string $appName
- * @param IRequest $request
- * @param AccountService $accountService
- * @param $UserId
- * @param ILogger $logger
- * @param IL10N $l10n
- * @param ICrypto $crypto
- * @param SetupService $setup
- */
- public function __construct($appName, IRequest $request, AccountService $accountService, GroupsIntegration $groupsIntegration, $UserId, ILogger $logger, IL10N $l10n, ICrypto $crypto, AliasesService $aliasesService, IMailTransmission $mailTransmission, SetupService $setup
+ public function __construct(string $appName, IRequest $request, AccountService $accountService, GroupsIntegration $groupsIntegration, $UserId, ILogger $logger, IL10N $l10n, AliasesService $aliasesService, IMailTransmission $mailTransmission, SetupService $setup
) {
parent::__construct($appName, $request);
$this->accountService = $accountService;
@@ -95,7 +81,6 @@ class AccountsController extends Controller {
$this->currentUserId = $UserId;
$this->logger = $logger;
$this->l10n = $l10n;
- $this->crypto = $crypto;
$this->aliasesService = $aliasesService;
$this->mailTransmission = $mailTransmission;
$this->setup = $setup;
@@ -172,7 +157,7 @@ class AccountsController extends Controller {
$errorMessage = null;
try {
if ($autoDetect) {
- $account = $this->setup->createNewAutoconfiguredAccount($accountName, $emailAddress, $password);
+ $account = $this->setup->createNewAutoConfiguredAccount($accountName, $emailAddress, $password);
} else {
$account = $this->setup->createNewAccount($accountName, $emailAddress, $imapHost, $imapPort, $imapSslMode, $imapUser, $imapPassword, $smtpHost, $smtpPort, $smtpSslMode, $smtpUser, $smtpPassword, $this->currentUserId, $id);
}
@@ -201,7 +186,7 @@ class AccountsController extends Controller {
*
* @return JSONResponse
*/
- public function updateSignature(int $accountId, string $signature = null) {
+ public function updateSignature(int $accountId, string $signature = null): JSONResponse {
$this->accountService->updateSignature($accountId, $this->currentUserId, $signature);
return new JSONResponse();
}
@@ -244,7 +229,7 @@ class AccountsController extends Controller {
$errorMessage = null;
try {
if ($autoDetect) {
- $account = $this->setup->createNewAutoconfiguredAccount($accountName, $emailAddress, $password);
+ $account = $this->setup->createNewAutoConfiguredAccount($accountName, $emailAddress, $password);
} else {
$account = $this->setup->createNewAccount($accountName, $emailAddress, $imapHost, $imapPort, $imapSslMode, $imapUser, $imapPassword, $smtpHost, $smtpPort, $smtpSslMode, $smtpUser, $smtpPassword, $this->currentUserId);
}