From 5725af30a3d1ef01b9c33e75ce8e23561874787d Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 5 Dec 2019 15:52:32 +0100 Subject: [PATCH] [CLEANUP] Fix a warning with newer PHPMD versions (#125) --- src/Controller/SessionController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/SessionController.php b/src/Controller/SessionController.php index 2085f7e..963c282 100644 --- a/src/Controller/SessionController.php +++ b/src/Controller/SessionController.php @@ -35,7 +35,7 @@ class SessionController extends FOSRestController implements ClassResourceInterf /** * @var AdministratorTokenRepository */ - private $administratorTokenRepository = null; + private $tokenRepository = null; /** * @param Authentication $authentication @@ -49,7 +49,7 @@ public function __construct( ) { $this->authentication = $authentication; $this->administratorRepository = $administratorRepository; - $this->administratorTokenRepository = $tokenRepository; + $this->tokenRepository = $tokenRepository; } /** @@ -96,7 +96,7 @@ public function deleteAction(Request $request, AdministratorToken $token): View throw new AccessDeniedHttpException('You do not have access to this session.', null, 1519831644); } - $this->administratorTokenRepository->remove($token); + $this->tokenRepository->remove($token); return View::create(); } @@ -131,7 +131,7 @@ private function createAndPersistToken(Administrator $administrator): Administra $token->setAdministrator($administrator); $token->generateExpiry(); $token->generateKey(); - $this->administratorTokenRepository->save($token); + $this->tokenRepository->save($token); return $token; }