diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-13 22:25:21 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-19 12:42:41 +0300 |
commit | 1ccb36a0f1169a416669498d23d8dab1305f5f45 (patch) | |
tree | 89a87f422ff2ec56509b1b5a65a5a59b5a118cb3 /apps/oauth2 | |
parent | b6182489be8cc0820b3138e25afda912b9a98d9f (diff) |
Cleanup Controller
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/oauth2')
-rw-r--r-- | apps/oauth2/lib/Controller/SettingsController.php | 8 | ||||
-rw-r--r-- | apps/oauth2/tests/Controller/SettingsControllerTest.php | 6 |
2 files changed, 1 insertions, 13 deletions
diff --git a/apps/oauth2/lib/Controller/SettingsController.php b/apps/oauth2/lib/Controller/SettingsController.php index 202db0b1835..34d88c3fe40 100644 --- a/apps/oauth2/lib/Controller/SettingsController.php +++ b/apps/oauth2/lib/Controller/SettingsController.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> * @@ -27,14 +28,10 @@ use OCA\OAuth2\Db\Client; use OCA\OAuth2\Db\ClientMapper; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\JSONResponse; -use OCP\AppFramework\Http\RedirectResponse; use OCP\IRequest; -use OCP\IURLGenerator; use OCP\Security\ISecureRandom; class SettingsController extends Controller { - /** @var IURLGenerator */ - private $urlGenerator; /** @var ClientMapper */ private $clientMapper; /** @var ISecureRandom */ @@ -49,7 +46,6 @@ class SettingsController extends Controller { /** * @param string $appName * @param IRequest $request - * @param IURLGenerator $urlGenerator * @param ClientMapper $clientMapper * @param ISecureRandom $secureRandom * @param AccessTokenMapper $accessTokenMapper @@ -57,14 +53,12 @@ class SettingsController extends Controller { */ public function __construct(string $appName, IRequest $request, - IURLGenerator $urlGenerator, ClientMapper $clientMapper, ISecureRandom $secureRandom, AccessTokenMapper $accessTokenMapper, DefaultTokenMapper $defaultTokenMapper ) { parent::__construct($appName, $request); - $this->urlGenerator = $urlGenerator; $this->secureRandom = $secureRandom; $this->clientMapper = $clientMapper; $this->accessTokenMapper = $accessTokenMapper; diff --git a/apps/oauth2/tests/Controller/SettingsControllerTest.php b/apps/oauth2/tests/Controller/SettingsControllerTest.php index b0c6035cddb..5dddbc65e4c 100644 --- a/apps/oauth2/tests/Controller/SettingsControllerTest.php +++ b/apps/oauth2/tests/Controller/SettingsControllerTest.php @@ -27,17 +27,13 @@ use OCA\OAuth2\Db\AccessTokenMapper; use OCA\OAuth2\Db\Client; use OCA\OAuth2\Db\ClientMapper; use OCP\AppFramework\Http\JSONResponse; -use OCP\AppFramework\Http\RedirectResponse; use OCP\IRequest; -use OCP\IURLGenerator; use OCP\Security\ISecureRandom; use Test\TestCase; class SettingsControllerTest extends TestCase { /** @var IRequest|\PHPUnit_Framework_MockObject_MockObject */ private $request; - /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ - private $urlGenerator; /** @var ClientMapper|\PHPUnit_Framework_MockObject_MockObject */ private $clientMapper; /** @var ISecureRandom|\PHPUnit_Framework_MockObject_MockObject */ @@ -53,7 +49,6 @@ class SettingsControllerTest extends TestCase { parent::setUp(); $this->request = $this->createMock(IRequest::class); - $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->clientMapper = $this->createMock(ClientMapper::class); $this->secureRandom = $this->createMock(ISecureRandom::class); $this->accessTokenMapper = $this->createMock(AccessTokenMapper::class); @@ -62,7 +57,6 @@ class SettingsControllerTest extends TestCase { $this->settingsController = new SettingsController( 'oauth2', $this->request, - $this->urlGenerator, $this->clientMapper, $this->secureRandom, $this->accessTokenMapper, |