Skip to content
Permalink
Browse files

[CLEANUP] Fix a warning with newer PHPMD versions (#125)

  • Loading branch information
oliverklee committed Dec 5, 2019
1 parent 30c05be commit 5725af30a3d1ef01b9c33e75ce8e23561874787d
Showing with 4 additions and 4 deletions.
  1. +4 −4 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;
}

0 comments on commit 5725af3

Please sign in to comment.
You can’t perform that action at this time.