]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove unused members and imports 22564/head
authorJoas Schilling <coding@schilljs.com>
Tue, 8 Sep 2020 08:45:35 +0000 (10:45 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 8 Sep 2020 08:45:35 +0000 (10:45 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
core/Controller/AvatarController.php
tests/Core/Controller/AvatarControllerTest.php

index cbcb9783680f8c77ff9651a451b98315e0d8cd19..c94d98da13ee6901ea1dde0662f1e17dfb266067 100644 (file)
@@ -31,7 +31,6 @@
 namespace OC\Core\Controller;
 
 use OC\AppFramework\Utility\TimeFactory;
-use OCP\Accounts\IAccountManager;
 use OCP\AppFramework\Controller;
 use OCP\AppFramework\Http;
 use OCP\AppFramework\Http\DataDisplayResponse;
@@ -80,8 +79,6 @@ class AvatarController extends Controller {
 
        /** @var TimeFactory */
        protected $timeFactory;
-       /** @var IAccountManager */
-       private $accountManager;
 
        public function __construct($appName,
                                                                IRequest $request,
@@ -92,8 +89,7 @@ class AvatarController extends Controller {
                                                                IRootFolder $rootFolder,
                                                                ILogger $logger,
                                                                $userId,
-                                                               TimeFactory $timeFactory,
-                                                               IAccountManager $accountManager) {
+                                                               TimeFactory $timeFactory) {
                parent::__construct($appName, $request);
 
                $this->avatarManager = $avatarManager;
@@ -104,7 +100,6 @@ class AvatarController extends Controller {
                $this->logger = $logger;
                $this->userId = $userId;
                $this->timeFactory = $timeFactory;
-               $this->accountManager = $accountManager;
        }
 
 
index 678648fa17669c1fdd70822a8ee631e53282be9c..61f509b74285a6b3e8c47a28dc80dd8d9329d8f1 100644 (file)
@@ -33,9 +33,6 @@ namespace Tests\Core\Controller;
 
 use OC\AppFramework\Utility\TimeFactory;
 use OC\Core\Controller\AvatarController;
-use OCP\Accounts\IAccount;
-use OCP\Accounts\IAccountManager;
-use OCP\Accounts\IAccountProperty;
 use OCP\AppFramework\Http;
 use OCP\Files\File;
 use OCP\Files\IRootFolder;
@@ -49,7 +46,6 @@ use OCP\ILogger;
 use OCP\IRequest;
 use OCP\IUser;
 use OCP\IUserManager;
-use PHPUnit\Framework\MockObject\MockObject;
 
 /**
  * Class AvatarControllerTest
@@ -82,8 +78,6 @@ class AvatarControllerTest extends \Test\TestCase {
        private $request;
        /** @var TimeFactory|\PHPUnit\Framework\MockObject\MockObject */
        private $timeFactory;
-       /** @var IAccountManager|MockObject */
-       private $accountManager;
 
        protected function setUp(): void {
                parent::setUp();
@@ -98,7 +92,6 @@ class AvatarControllerTest extends \Test\TestCase {
                $this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder')->getMock();
                $this->logger = $this->getMockBuilder(ILogger::class)->getMock();
                $this->timeFactory = $this->getMockBuilder('OC\AppFramework\Utility\TimeFactory')->getMock();
-               $this->accountManager = $this->createMock(IAccountManager::class);
 
                $this->avatarMock = $this->getMockBuilder('OCP\IAvatar')->getMock();
                $this->userMock = $this->getMockBuilder(IUser::class)->getMock();
@@ -113,8 +106,7 @@ class AvatarControllerTest extends \Test\TestCase {
                        $this->rootFolder,
                        $this->logger,
                        'userid',
-                       $this->timeFactory,
-                       $this->accountManager
+                       $this->timeFactory
                );
 
                // Configure userMock