Merge pull request #8336 from nextcloud/cleanup-unused-parameter
Cleanup unused parameter
This commit is contained in:
commit
cf83eb5e77
|
@ -27,7 +27,6 @@ use OCP\AppFramework\Controller;
|
|||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\Collaboration\AutoComplete\IManager;
|
||||
use OCP\Collaboration\Collaborators\ISearch;
|
||||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
use OCP\Share;
|
||||
|
||||
|
@ -36,21 +35,17 @@ class AutoCompleteController extends Controller {
|
|||
private $collaboratorSearch;
|
||||
/** @var IManager */
|
||||
private $autoCompleteManager;
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
|
||||
public function __construct(
|
||||
$appName,
|
||||
IRequest $request,
|
||||
ISearch $collaboratorSearch,
|
||||
IManager $autoCompleteManager,
|
||||
IConfig $config
|
||||
IManager $autoCompleteManager
|
||||
) {
|
||||
parent::__construct($appName, $request);
|
||||
|
||||
$this->collaboratorSearch = $collaboratorSearch;
|
||||
$this->autoCompleteManager = $autoCompleteManager;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -152,10 +152,6 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
return $c->query('ServerContainer')->getWebRoot();
|
||||
});
|
||||
|
||||
$this->registerService('fromMailAddress', function() {
|
||||
return Util::getDefaultEmailAddress('no-reply');
|
||||
});
|
||||
|
||||
$this->registerService('OC_Defaults', function ($c) {
|
||||
return $c->getServer()->getThemingDefaults();
|
||||
});
|
||||
|
|
|
@ -47,8 +47,6 @@ class MailSettingsController extends Controller {
|
|||
private $userSession;
|
||||
/** @var IMailer */
|
||||
private $mailer;
|
||||
/** @var string */
|
||||
private $defaultMailAddress;
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
|
@ -57,21 +55,18 @@ class MailSettingsController extends Controller {
|
|||
* @param IConfig $config
|
||||
* @param IUserSession $userSession
|
||||
* @param IMailer $mailer
|
||||
* @param string $fromMailAddress
|
||||
*/
|
||||
public function __construct($appName,
|
||||
IRequest $request,
|
||||
IL10N $l10n,
|
||||
IConfig $config,
|
||||
IUserSession $userSession,
|
||||
IMailer $mailer,
|
||||
$fromMailAddress) {
|
||||
IMailer $mailer) {
|
||||
parent::__construct($appName, $request);
|
||||
$this->l10n = $l10n;
|
||||
$this->config = $config;
|
||||
$this->userSession = $userSession;
|
||||
$this->mailer = $mailer;
|
||||
$this->defaultMailAddress = $fromMailAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,7 +45,6 @@ use OC\Security\IdentityProof\Manager;
|
|||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\Files\Config\IUserMountCache;
|
||||
use OCP\Encryption\IEncryptionModule;
|
||||
|
@ -61,7 +60,6 @@ use OCP\IUserManager;
|
|||
use OCP\IUserSession;
|
||||
use OCP\Mail\IMailer;
|
||||
use OCP\IAvatarManager;
|
||||
use OCP\Security\ICrypto;
|
||||
use OCP\Security\ISecureRandom;
|
||||
use OCP\Util;
|
||||
use OC\Settings\BackgroundJobs\VerifyUserData;
|
||||
|
@ -100,10 +98,6 @@ class UsersController extends Controller {
|
|||
private $secureRandom;
|
||||
/** @var NewUserMailHelper */
|
||||
private $newUserMailHelper;
|
||||
/** @var ITimeFactory */
|
||||
private $timeFactory;
|
||||
/** @var ICrypto */
|
||||
private $crypto;
|
||||
/** @var Manager */
|
||||
private $keyManager;
|
||||
/** @var IJobList */
|
||||
|
@ -133,8 +127,6 @@ class UsersController extends Controller {
|
|||
* @param AccountManager $accountManager
|
||||
* @param ISecureRandom $secureRandom
|
||||
* @param NewUserMailHelper $newUserMailHelper
|
||||
* @param ITimeFactory $timeFactory
|
||||
* @param ICrypto $crypto
|
||||
* @param Manager $keyManager
|
||||
* @param IJobList $jobList
|
||||
* @param IUserMountCache $userMountCache
|
||||
|
@ -156,8 +148,6 @@ class UsersController extends Controller {
|
|||
AccountManager $accountManager,
|
||||
ISecureRandom $secureRandom,
|
||||
NewUserMailHelper $newUserMailHelper,
|
||||
ITimeFactory $timeFactory,
|
||||
ICrypto $crypto,
|
||||
Manager $keyManager,
|
||||
IJobList $jobList,
|
||||
IUserMountCache $userMountCache,
|
||||
|
@ -176,8 +166,6 @@ class UsersController extends Controller {
|
|||
$this->accountManager = $accountManager;
|
||||
$this->secureRandom = $secureRandom;
|
||||
$this->newUserMailHelper = $newUserMailHelper;
|
||||
$this->timeFactory = $timeFactory;
|
||||
$this->crypto = $crypto;
|
||||
$this->keyManager = $keyManager;
|
||||
$this->jobList = $jobList;
|
||||
$this->userMountCache = $userMountCache;
|
||||
|
|
|
@ -23,11 +23,9 @@
|
|||
|
||||
namespace Tests\Core\Controller;
|
||||
|
||||
|
||||
use OC\Core\Controller\AutoCompleteController;
|
||||
use OCP\Collaboration\AutoComplete\IManager;
|
||||
use OCP\Collaboration\Collaborators\ISearch;
|
||||
use OCP\IConfig;
|
||||
use OCP\IRequest;
|
||||
use Test\TestCase;
|
||||
|
||||
|
@ -36,8 +34,6 @@ class AutoCompleteControllerTest extends TestCase {
|
|||
protected $collaboratorSearch;
|
||||
/** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $autoCompleteManager;
|
||||
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
|
||||
protected $config;
|
||||
/** @var AutoCompleteController */
|
||||
protected $controller;
|
||||
|
||||
|
@ -48,14 +44,12 @@ class AutoCompleteControllerTest extends TestCase {
|
|||
$request = $this->createMock(IRequest::class);
|
||||
$this->collaboratorSearch = $this->createMock(ISearch::class);
|
||||
$this->autoCompleteManager = $this->createMock(IManager::class);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
|
||||
$this->controller = new AutoCompleteController(
|
||||
'core',
|
||||
$request,
|
||||
$this->collaboratorSearch,
|
||||
$this->autoCompleteManager,
|
||||
$this->config
|
||||
$this->autoCompleteManager
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ use OC\SubAdmin;
|
|||
use OCP\App\IAppManager;
|
||||
use OCP\AppFramework\Http;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\Files\Config\IUserMountCache;
|
||||
use OCP\Encryption\IEncryptionModule;
|
||||
|
@ -38,7 +37,6 @@ use OCP\IUserManager;
|
|||
use OCP\IUserSession;
|
||||
use OCP\Mail\IEMailTemplate;
|
||||
use OCP\Mail\IMailer;
|
||||
use OCP\Security\ICrypto;
|
||||
use OCP\Security\ISecureRandom;
|
||||
use OC\User\User;
|
||||
use Test\Util\User\Dummy;
|
||||
|
@ -74,12 +72,8 @@ class UsersControllerTest extends \Test\TestCase {
|
|||
private $accountManager;
|
||||
/** @var ISecureRandom | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $secureRandom;
|
||||
/** @var ITimeFactory | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $timeFactory;
|
||||
/** @var NewUserMailHelper|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $newUserMailHelper;
|
||||
/** @var ICrypto | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $crypto;
|
||||
/** @var IJobList | \PHPUnit_Framework_MockObject_MockObject */
|
||||
private $jobList;
|
||||
/** @var \OC\Security\IdentityProof\Manager |\PHPUnit_Framework_MockObject_MockObject */
|
||||
|
@ -105,11 +99,7 @@ class UsersControllerTest extends \Test\TestCase {
|
|||
$this->avatarManager = $this->createMock(IAvatarManager::class);
|
||||
$this->accountManager = $this->createMock(AccountManager::class);
|
||||
$this->secureRandom = $this->createMock(ISecureRandom::class);
|
||||
$this->timeFactory = $this->createMock(ITimeFactory::class);
|
||||
$this->crypto = $this->createMock(ICrypto::class);
|
||||
$this->newUserMailHelper = $this->createMock(NewUserMailHelper::class);
|
||||
$this->timeFactory = $this->createMock(ITimeFactory::class);
|
||||
$this->crypto = $this->createMock(ICrypto::class);
|
||||
$this->securityManager = $this->getMockBuilder(\OC\Security\IdentityProof\Manager::class)->disableOriginalConstructor()->getMock();
|
||||
$this->jobList = $this->createMock(IJobList::class);
|
||||
$this->encryptionManager = $this->createMock(IManager::class);
|
||||
|
@ -163,8 +153,6 @@ class UsersControllerTest extends \Test\TestCase {
|
|||
$this->accountManager,
|
||||
$this->secureRandom,
|
||||
$this->newUserMailHelper,
|
||||
$this->timeFactory,
|
||||
$this->crypto,
|
||||
$this->securityManager,
|
||||
$this->jobList,
|
||||
$this->userMountCache,
|
||||
|
@ -190,8 +178,6 @@ class UsersControllerTest extends \Test\TestCase {
|
|||
$this->accountManager,
|
||||
$this->secureRandom,
|
||||
$this->newUserMailHelper,
|
||||
$this->timeFactory,
|
||||
$this->crypto,
|
||||
$this->securityManager,
|
||||
$this->jobList,
|
||||
$this->userMountCache,
|
||||
|
|
Loading…
Reference in New Issue